|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.skin.Icon
public abstract class Icon
An object which represents a customizable icon that is capable of rendering itself. Icons objects are registered with a Skin via the Skin.registerIcon() method and are retrieved by Renderers via Skin.getIcon(). Customizers can override icons declaratively in the skin css file.
Icon implementations which are capable of providing an image representation of the icon should override getImageURI(), getImageWidth() and getImageHeight(). The default implementations of these methods return null, which is an acceptable default for Icons which do not make use of images (ie. for text-based Icon implementations).
Field Summary | |
---|---|
static java.lang.String |
ALIGN_KEY
|
static java.lang.String |
EMBEDDED_KEY
|
static java.lang.String |
HEIGHT_KEY
|
static java.lang.String |
ID_KEY
|
static java.lang.String |
INLINE_STYLE_KEY
|
static java.lang.String |
SHORT_DESC_KEY
|
static java.lang.String |
STYLE_CLASS_KEY
|
static java.lang.String |
WIDTH_KEY
|
Constructor Summary | |
---|---|
Icon()
|
Method Summary | |
---|---|
java.lang.Integer |
getImageHeight(RenderingContext arc)
Returns the height of the image. |
java.lang.Object |
getImageURI(javax.faces.context.FacesContext context,
RenderingContext arc)
Returns a URI to the image that is used as the icon's content. |
java.lang.Integer |
getImageWidth(RenderingContext arc)
Returns the width of the image. |
boolean |
isNull()
Returns true if the icon is non-existent, and will render no content at all. |
java.io.InputStream |
openStream(javax.faces.context.FacesContext context,
RenderingContext arc)
Returns an InputStream which provides access to the image data for image-based Icons. |
abstract void |
renderIcon(javax.faces.context.FacesContext context,
RenderingContext arc,
java.util.Map<java.lang.String,java.lang.Object> attrs)
Renders the Icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SHORT_DESC_KEY
public static final java.lang.String ALIGN_KEY
public static final java.lang.String WIDTH_KEY
public static final java.lang.String HEIGHT_KEY
public static final java.lang.String EMBEDDED_KEY
public static final java.lang.String ID_KEY
public static final java.lang.String STYLE_CLASS_KEY
public static final java.lang.String INLINE_STYLE_KEY
Constructor Detail |
---|
public Icon()
Method Detail |
---|
public abstract void renderIcon(javax.faces.context.FacesContext context, RenderingContext arc, java.util.Map<java.lang.String,java.lang.Object> attrs) throws java.io.IOException
context
- FacesContextarc
- The RenderingContext for the
current request.attrs
- A Map which which provides access to
values that might be useful to Icon implementations,
such as "id" and "shortDesc".
java.io.IOException
public java.lang.Object getImageURI(javax.faces.context.FacesContext context, RenderingContext arc)
context
- FacesContextarc
- The RenderingContext for the
current request.public java.lang.Integer getImageWidth(RenderingContext arc)
arc
- RenderingContextpublic java.lang.Integer getImageHeight(RenderingContext arc)
arc
- RenderingContextpublic java.io.InputStream openStream(javax.faces.context.FacesContext context, RenderingContext arc) throws java.io.IOException
context
- FacesContextarc
- The RenderingContext for the
current request.
java.io.IOException
public boolean isNull()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |