com.sun.webui.jsf.component
Class ImageComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIGraphic
              extended by com.sun.webui.jsf.component.ImageComponent
All Implemented Interfaces:
javax.faces.component.StateHolder
Direct Known Subclasses:
Alarm, Icon

public class ImageComponent
extends javax.faces.component.UIGraphic

The ImageComponent is used to display in inline graphic image.


Field Summary
 
Fields inherited from class javax.faces.component.UIGraphic
COMPONENT_FAMILY, COMPONENT_TYPE
 
Constructor Summary
ImageComponent()
          Construct a new ImageComponent.
 
Method Summary
 java.lang.String getAlign()
          Specifies the position of the image with respect to its context.
 java.lang.String getAlt()
          Alternative textual description of the image rendered by this component.
 int getBorder()
          Specifies the width of the img border in pixels.
 java.lang.String getFamily()
          Return the family for this component.
 int getHeight()
          Image height override.
 int getHspace()
          Specifies the amount of white space in pixels to be inserted to the left and right of the image.
 java.lang.String getHtmlTemplate()
          Get alternative HTML template to be used by this component.
 java.lang.String getIcon()
          The identifier of the desired theme image.
 java.lang.String getLongDesc()
          A verbose description of this image.
 java.lang.String getOnClick()
          Scripting code executed when a mouse click occurs over this component.
 java.lang.String getOnDblClick()
          Scripting code executed when a mouse double click occurs over this component.
 java.lang.String getOnMouseDown()
          Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
 java.lang.String getOnMouseMove()
          Scripting code executed when the user moves the mouse pointer while over the component.
 java.lang.String getOnMouseOut()
          Scripting code executed when a mouse out movement occurs over this component.
 java.lang.String getOnMouseOver()
          Scripting code executed when the user moves the mouse pointer into the boundary of this component.
 java.lang.String getOnMouseUp()
          Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
 java.lang.String getRendererType()
           
 java.lang.String getStyle()
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getStyleClass()
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 java.lang.String getToolTip()
          Sets the value of the title attribute for the HTML element.
 java.lang.String getUrl()
          Absolute or relative URL to the image to be rendered.
 java.lang.Object getValue()
           
 javax.el.ValueExpression getValueExpression(java.lang.String name)
          Return the ValueExpression stored for the specified name (if any), respecting any property aliases.
 int getVspace()
          Specifies the amount of white space in pixels to be inserted above and below the image.
 int getWidth()
          Image width override.
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 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.
 void setAlign(java.lang.String align)
          Specifies the position of the image with respect to its context.
 void setAlt(java.lang.String alt)
          Alternative textual description of the image rendered by this component.
 void setBorder(int border)
          Specifies the width of the img border in pixels.
 void setHeight(int height)
          Image height override.
 void setHspace(int hspace)
          Specifies the amount of white space in pixels to be inserted to the left and right of the image.
 void setHtmlTemplate(java.lang.String htmlTemplate)
          Set alternative HTML template to be used by this component.
 void setIcon(java.lang.String icon)
          The identifier of the desired theme image.
 void setId(java.lang.String id)
          The component identifier for this component.
 void setLongDesc(java.lang.String longDesc)
          A verbose description of this image.
 void setOnClick(java.lang.String onClick)
          Scripting code executed when a mouse click occurs over this component.
 void setOnDblClick(java.lang.String onDblClick)
          Scripting code executed when a mouse double click occurs over this component.
 void setOnMouseDown(java.lang.String onMouseDown)
          Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.
 void setOnMouseMove(java.lang.String onMouseMove)
          Scripting code executed when the user moves the mouse pointer while over the component.
 void setOnMouseOut(java.lang.String onMouseOut)
          Scripting code executed when a mouse out movement occurs over this component.
 void setOnMouseOver(java.lang.String onMouseOver)
          Scripting code executed when the user moves the mouse pointer into the boundary of this component.
 void setOnMouseUp(java.lang.String onMouseUp)
          Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.
 void setRendered(boolean rendered)
          Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page.
 void setStyle(java.lang.String style)
          CSS style(s) to be applied to the outermost HTML element when this component is rendered.
 void setStyleClass(java.lang.String styleClass)
          CSS style class(es) to be applied to the outermost HTML element when this component is rendered.
 void setToolTip(java.lang.String toolTip)
          Sets the value of the title attribute for the HTML element.
 void setUrl(java.lang.String url)
          Absolute or relative URL to the image to be rendered.
 void setValueExpression(java.lang.String name, javax.el.ValueExpression binding)
          Set the ValueExpression stored for the specified name (if any), respecting any property aliases.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void setVspace(int vspace)
          Specifies the amount of white space in pixels to be inserted above and below the image.
 void setWidth(int width)
          Image width override.
 
Methods inherited from class javax.faces.component.UIGraphic
getValueBinding, setValue, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageComponent

public ImageComponent()

Construct a new ImageComponent.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class javax.faces.component.UIGraphic

getRendererType

public java.lang.String getRendererType()
Overrides:
getRendererType in class javax.faces.component.UIComponentBase

setId

public void setId(java.lang.String id)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.

Overrides:
setId in class javax.faces.component.UIComponentBase

setRendered

public void setRendered(boolean rendered)
Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.

Overrides:
setRendered in class javax.faces.component.UIComponentBase

getValueExpression

public javax.el.ValueExpression getValueExpression(java.lang.String name)

Return the ValueExpression stored for the specified name (if any), respecting any property aliases.

Overrides:
getValueExpression in class javax.faces.component.UIGraphic
Parameters:
name - Name of value binding expression to retrieve

setValueExpression

public void setValueExpression(java.lang.String name,
                               javax.el.ValueExpression binding)

Set the ValueExpression stored for the specified name (if any), respecting any property aliases.

Overrides:
setValueExpression in class javax.faces.component.UIGraphic
Parameters:
name - Name of value binding to set
binding - ValueExpression to set, or null to remove

getValue

public java.lang.Object getValue()
Overrides:
getValue in class javax.faces.component.UIGraphic

getAlign

public java.lang.String getAlign()

Specifies the position of the image with respect to its context. Valid values are: bottom (the default); middle; top; left; right.


setAlign

public void setAlign(java.lang.String align)

Specifies the position of the image with respect to its context. Valid values are: bottom (the default); middle; top; left; right.

See Also:
getAlign()

getAlt

public java.lang.String getAlt()

Alternative textual description of the image rendered by this component. The alt text can be used by screen readers and in tool tips, and when image display is turned off in the web browser.


setAlt

public void setAlt(java.lang.String alt)

Alternative textual description of the image rendered by this component. The alt text can be used by screen readers and in tool tips, and when image display is turned off in the web browser.

See Also:
getAlt()

getBorder

public int getBorder()

Specifies the width of the img border in pixels. The default value for this attribute depends on the web browser.


setBorder

public void setBorder(int border)

Specifies the width of the img border in pixels. The default value for this attribute depends on the web browser.

See Also:
getBorder()

getHeight

public int getHeight()

Image height override. When specified, the width and height attributes tell web browsers to override the natural image or object size in favor of these values, specified in pixels. Some browsers might not support this behavior.


setHeight

public void setHeight(int height)

Image height override. When specified, the width and height attributes tell web browsers to override the natural image or object size in favor of these values, specified in pixels. Some browsers might not support this behavior.

See Also:
getHeight()

getHspace

public int getHspace()

Specifies the amount of white space in pixels to be inserted to the left and right of the image. The default value is not specified but is generally a small, non-zero size.


setHspace

public void setHspace(int hspace)

Specifies the amount of white space in pixels to be inserted to the left and right of the image. The default value is not specified but is generally a small, non-zero size.

See Also:
getHspace()

getIcon

public java.lang.String getIcon()

The identifier of the desired theme image.


setIcon

public void setIcon(java.lang.String icon)

The identifier of the desired theme image.

See Also:
getIcon()

getLongDesc

public java.lang.String getLongDesc()

A verbose description of this image.


setLongDesc

public void setLongDesc(java.lang.String longDesc)

A verbose description of this image.

See Also:
getLongDesc()

getOnClick

public java.lang.String getOnClick()

Scripting code executed when a mouse click occurs over this component.


setOnClick

public void setOnClick(java.lang.String onClick)

Scripting code executed when a mouse click occurs over this component.

See Also:
getOnClick()

getOnDblClick

public java.lang.String getOnDblClick()

Scripting code executed when a mouse double click occurs over this component.


setOnDblClick

public void setOnDblClick(java.lang.String onDblClick)

Scripting code executed when a mouse double click occurs over this component.

See Also:
getOnDblClick()

getOnMouseDown

public java.lang.String getOnMouseDown()

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.


setOnMouseDown

public void setOnMouseDown(java.lang.String onMouseDown)

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseDown()

getOnMouseMove

public java.lang.String getOnMouseMove()

Scripting code executed when the user moves the mouse pointer while over the component.


setOnMouseMove

public void setOnMouseMove(java.lang.String onMouseMove)

Scripting code executed when the user moves the mouse pointer while over the component.

See Also:
getOnMouseMove()

getOnMouseOut

public java.lang.String getOnMouseOut()

Scripting code executed when a mouse out movement occurs over this component.


setOnMouseOut

public void setOnMouseOut(java.lang.String onMouseOut)

Scripting code executed when a mouse out movement occurs over this component.

See Also:
getOnMouseOut()

getOnMouseOver

public java.lang.String getOnMouseOver()

Scripting code executed when the user moves the mouse pointer into the boundary of this component.


setOnMouseOver

public void setOnMouseOver(java.lang.String onMouseOver)

Scripting code executed when the user moves the mouse pointer into the boundary of this component.

See Also:
getOnMouseOver()

getOnMouseUp

public java.lang.String getOnMouseUp()

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.


setOnMouseUp

public void setOnMouseUp(java.lang.String onMouseUp)

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.

See Also:
getOnMouseUp()

getStyle

public java.lang.String getStyle()

CSS style(s) to be applied to the outermost HTML element when this component is rendered.


setStyle

public void setStyle(java.lang.String style)

CSS style(s) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyle()

getStyleClass

public java.lang.String getStyleClass()

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.


setStyleClass

public void setStyleClass(java.lang.String styleClass)

CSS style class(es) to be applied to the outermost HTML element when this component is rendered.

See Also:
getStyleClass()

getToolTip

public java.lang.String getToolTip()

Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.


setToolTip

public void setToolTip(java.lang.String toolTip)

Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the HTML element.

See Also:
getToolTip()

getUrl

public java.lang.String getUrl()

Absolute or relative URL to the image to be rendered.

Overrides:
getUrl in class javax.faces.component.UIGraphic

setUrl

public void setUrl(java.lang.String url)

Absolute or relative URL to the image to be rendered.

Overrides:
setUrl in class javax.faces.component.UIGraphic
See Also:
getUrl()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

See Also:
isVisible()

getVspace

public int getVspace()

Specifies the amount of white space in pixels to be inserted above and below the image. The default value is not specified but is generally a small, non-zero size.


setVspace

public void setVspace(int vspace)

Specifies the amount of white space in pixels to be inserted above and below the image. The default value is not specified but is generally a small, non-zero size.

See Also:
getVspace()

getWidth

public int getWidth()

Image width override. When specified, the width and height attributes tell web browsers to override the natural image or object size in favor of these values, specified in pixels. Some browsers might not support this behavior.


setWidth

public void setWidth(int width)

Image width override. When specified, the width and height attributes tell web browsers to override the natural image or object size in favor of these values, specified in pixels. Some browsers might not support this behavior.

See Also:
getWidth()

getHtmlTemplate

public java.lang.String getHtmlTemplate()
Get alternative HTML template to be used by this component.


setHtmlTemplate

public void setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component.


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 javax.faces.component.UIGraphic

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 javax.faces.component.UIGraphic


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.