|
||||||||||
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 String |
ALIGN_KEY
|
static String |
EMBEDDED_KEY
|
static String |
HEIGHT_KEY
|
static String |
ID_KEY
|
static String |
INLINE_STYLE_KEY
|
static String |
SHORT_DESC_KEY
|
static String |
STYLE_CLASS_KEY
|
static String |
WIDTH_KEY
|
Constructor Summary | |
---|---|
Icon()
|
Method Summary | |
---|---|
Integer |
getImageHeight(RenderingContext arc)
Returns the height of the image. |
Object |
getImageURI(javax.faces.context.FacesContext context,
RenderingContext arc)
Returns a URI to the image that is used as the icon's content. |
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. |
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,
Map<String,? extends 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 String SHORT_DESC_KEY
public static final String ALIGN_KEY
public static final String WIDTH_KEY
public static final String HEIGHT_KEY
public static final String EMBEDDED_KEY
public static final String ID_KEY
public static final String STYLE_CLASS_KEY
public static final String INLINE_STYLE_KEY
Constructor Detail |
---|
public Icon()
Method Detail |
---|
public abstract void renderIcon(javax.faces.context.FacesContext context, RenderingContext arc, Map<String,? extends Object> attrs) throws 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".
IOException
public Object getImageURI(javax.faces.context.FacesContext context, RenderingContext arc)
context
- FacesContextarc
- The RenderingContext for the
current request.public Integer getImageWidth(RenderingContext arc)
arc
- RenderingContextpublic Integer getImageHeight(RenderingContext arc)
arc
- RenderingContextpublic InputStream openStream(javax.faces.context.FacesContext context, RenderingContext arc) throws IOException
context
- FacesContextarc
- The RenderingContext for the
current request.
IOException
public boolean isNull()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |