com.sun.rave.web.ui.component
Class IconBase

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byjavax.faces.component.UIComponentBase
          extended byjavax.faces.component.UIGraphic
              extended bycom.sun.rave.web.ui.component.ImageComponentBase
                  extended bycom.sun.rave.web.ui.component.ImageComponent
                      extended bycom.sun.rave.web.ui.component.IconBase
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
Icon

public abstract class IconBase
extends ImageComponent

Use the ui:icon tag to display a theme-specific image in the rendered HTML page. The icon attribute used in the ui:icon tag is a key value that is mapped to a URL in theme properties file. The key is used to look up the appropriate image source and related attributes from the current theme. By specifying a key, you avoid the need to specify predefined constants such as height and width. The image can also be seamlessly changed when a different theme is selected.

Note: currently the list of icons that you can use is not publicly supported, but the icon names are specified in the /com/sun/rave/web/ui/suntheme/SunTheme.properties file. The names are listed as resource keys of the format image.ICON_NAME. Use only the part of the key that follows image. For example, if the key is image.ALARM_CRITICAL_SMALL, you should specify ALARM_CRITICAL_SMALL as the value of the icon attribute of the ui:icon tag. A list of supported icon values will be published in the near future.

HTML Elements and Layout

The rendered HTML page displays an XHTML compliant <img> element with any applicable element attributes. Some attributes are determined by the theme, and others can be specified through the ui:icon tag attributes.

Theme Identifiers

TBD.

Client Side Javascript Functions

None.

Examples

Example 1: Create an icon

<ui:icon icon="ALARM_CRITICAL_SMALL" />

This will generate the following img element:
  
<img src="com_sun_rave_web_ui/images/alarms/alarm_critical_small.gif" height="10" width="10" />

Auto-generated component class. Do NOT modify; all changes will be lost!


Field Summary
 
Fields inherited from class javax.faces.component.UIGraphic
COMPONENT_FAMILY, COMPONENT_TYPE
 
Constructor Summary
IconBase()
          Construct a new IconBase.
 
Method Summary
 java.lang.String getFamily()
          Return the family for this component.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 
Methods inherited from class com.sun.rave.web.ui.component.ImageComponentBase
getAlign, getAlt, getBorder, getHeight, getHspace, getIcon, getLongDesc, getOnClick, getOnDblClick, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getStyle, getStyleClass, getToolTip, getUrl, getValueBinding, getVspace, getWidth, isVisible, setAlign, setAlt, setBorder, setHeight, setHspace, setIcon, setLongDesc, setOnClick, setOnDblClick, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStyle, setStyleClass, setToolTip, setUrl, setValueBinding, setVisible, setVspace, setWidth
 
Methods inherited from class javax.faces.component.UIGraphic
getValue, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconBase

public IconBase()

Construct a new IconBase.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class ImageComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class ImageComponentBase

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class ImageComponentBase