|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.trinidad.skin.Icon
org.apache.myfaces.trinidadinternal.skin.icon.BaseImageIcon
public abstract class BaseImageIcon
A base class for ImageIcon implementations. The base class produces the full image URI by combining a subclass-specific base URI with an image URI that is specified when the BaseImageIcon instance is created. This allows subclasses to implement different strategies for determining the base image URI - eg. ContextImageIcon uses the servlet context path. Subclasses must implement the getBaseURI() method, which provides the base URI to prepend to the image URI.
| Field Summary |
|---|
| Fields inherited from class org.apache.myfaces.trinidad.skin.Icon |
|---|
ALIGN_KEY, EMBEDDED_KEY, HEIGHT_KEY, ID_KEY, INLINE_STYLE_KEY, SHORT_DESC_KEY, STYLE_CLASS_KEY, WIDTH_KEY |
| Constructor Summary | |
|---|---|
BaseImageIcon(java.lang.String uri,
java.lang.String rtlURI,
java.lang.Integer width,
java.lang.Integer height,
java.lang.String styleClass,
org.apache.myfaces.trinidad.style.Style inlineStyle)
Creates an image Icon which has a different image URI depending on the reading direction. |
|
| Method Summary | |
|---|---|
protected abstract java.lang.String |
getBaseURI(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns the base URI to prepend to the icon name. |
java.lang.Integer |
getImageHeight(org.apache.myfaces.trinidad.context.RenderingContext arc)
Implementation of Icon.getImageHeight(). |
java.lang.Object |
getImageURI(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc)
Implementation of ImageIcon.getImageURI(). |
java.lang.Integer |
getImageWidth(org.apache.myfaces.trinidad.context.RenderingContext arc)
Implementation of Icon.getImageWidth(). |
protected java.lang.String |
getRelativeURI(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns the URI of the image relative to the base URI. |
void |
renderIcon(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc,
java.util.Map<java.lang.String,? extends java.lang.Object> attrs)
Implementation of Icon.renderIcon(). |
| Methods inherited from class org.apache.myfaces.trinidad.skin.Icon |
|---|
isNull, openStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseImageIcon(java.lang.String uri,
java.lang.String rtlURI,
java.lang.Integer width,
java.lang.Integer height,
java.lang.String styleClass,
org.apache.myfaces.trinidad.style.Style inlineStyle)
uri - The URI to the image to use when the
reading direction is left-to-right.rtlURI - The URI to the image to use when
the reading direction is right-to-left.width - The width of the imageheight - The height of the imagestyleClass - The style class for the imageinlineStyle - The inline style for the image| Method Detail |
|---|
public java.lang.Object getImageURI(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc)
getImageURI in class org.apache.myfaces.trinidad.skin.Iconpublic java.lang.Integer getImageWidth(org.apache.myfaces.trinidad.context.RenderingContext arc)
getImageWidth in class org.apache.myfaces.trinidad.skin.Iconpublic java.lang.Integer getImageHeight(org.apache.myfaces.trinidad.context.RenderingContext arc)
getImageHeight in class org.apache.myfaces.trinidad.skin.Icon
public void renderIcon(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc,
java.util.Map<java.lang.String,? extends java.lang.Object> attrs)
throws java.io.IOException
renderIcon in class org.apache.myfaces.trinidad.skin.Iconjava.io.IOException
protected abstract java.lang.String getBaseURI(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc)
protected java.lang.String getRelativeURI(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RenderingContext arc)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||