|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIGraphic
com.sun.webui.jsf.component.ImageComponent
com.sun.webui.jsf.component.Alarm
public class Alarm
The Alarm component is used to display a theme-specific image to indicate the condition of an object.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_SEVERITY
Default severity, SEVERITY_OK. |
static java.lang.String |
SEVERITY_CRITICAL
Critical alarm severity. |
static java.lang.String |
SEVERITY_DOWN
Down alarm severity. |
static java.lang.String |
SEVERITY_MAJOR
Major alarm severity. |
static java.lang.String |
SEVERITY_MINOR
Minor alarm severity. |
static java.lang.String |
SEVERITY_OK
Ok alarm severity. |
Fields inherited from class javax.faces.component.UIGraphic |
---|
COMPONENT_FAMILY, COMPONENT_TYPE |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
Alarm()
Default constructor. |
|
Alarm(java.lang.String severity)
Deprecated. |
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Return zero if the severity of o1 equals o2 ,
negative 1 if the severity o1 is less than o2 ,
positive 1 if the severity o1 is greater than
o2 . |
void |
encodeBegin(javax.faces.context.FacesContext context)
|
boolean |
equals(java.lang.Object o)
Override equals() returns false if object is not an instance of Alarm. |
java.lang.String |
getAlt()
Alternative textual description of the image rendered by this component. |
static java.util.List<com.sun.webui.jsf.model.Indicator> |
getDefaultIndicators()
Returns a cloned list of the default indicators that can be modified without affecting the default list. |
java.lang.String |
getFamily()
Return the family for this component. |
java.lang.String |
getHtmlTemplate()
Get alternative HTML template to be used by this component. |
java.util.List<com.sun.webui.jsf.model.Indicator> |
getIndicators()
Return a List of Indicators supported
by this Alarm . |
java.lang.String |
getOnClick()
Scripting code that is executed when a mouse click occurs over this component. |
java.lang.String |
getOnDblClick()
Scripting code that is executed when a mouse double click occurs over this component. |
java.lang.String |
getOnKeyDown()
Scripting code that is executed when the user presses down on a key while the component has focus. |
java.lang.String |
getOnKeyPress()
Scripting code that is executed when the user presses and releases a key while the component has focus. |
java.lang.String |
getOnKeyUp()
Scripting code that is executed when the user releases a key while the component has focus. |
java.lang.String |
getOnMouseDown()
Scripting code that is executed when the user presses a mouse button while the mouse pointer is on the component. |
java.lang.String |
getOnMouseMove()
Scripting code that is executed when the user moves the mouse pointer while over the component. |
java.lang.String |
getOnMouseOut()
Scripting code that is executed when a mouse out movement occurs over this component. |
java.lang.String |
getOnMouseOver()
Scripting code that is executed when the user moves the mouse pointer into the boundary of this component. |
java.lang.String |
getOnMouseUp()
Scripting code that is executed when the user releases a mouse button while the mouse pointer is on the component. |
java.lang.String |
getRendererType()
|
java.lang.String |
getSeverity()
Specifies the severity of the alarm. |
java.lang.String |
getStyle()
CSS style or styles to be applied to the outermost HTML element when this component is rendered. |
java.lang.String |
getStyleClass()
CSS style class or classes to be applied to the outermost HTML element when this component is rendered. |
java.lang.String |
getText()
The text description of the alarm. |
java.lang.String |
getTextPosition()
Specifies where the text will be placed relative to the image. |
java.lang.String |
getToolTip()
Sets the value of the title attribute for the HTML element. |
java.lang.Object |
getValue()
|
boolean |
isVisible()
Indicates 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 |
setAlt(java.lang.String alt)
Alternative textual description of the image rendered by this component. |
void |
setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component. |
void |
setId(java.lang.String id)
The component identifier for this component. |
void |
setIndicators(java.util.List<com.sun.webui.jsf.model.Indicator> indicators)
Set the list of indicators supported by this alarm. |
void |
setOnClick(java.lang.String onClick)
Scripting code that is executed when a mouse click occurs over this component. |
void |
setOnDblClick(java.lang.String onDblClick)
Scripting code that is executed when a mouse double click occurs over this component. |
void |
setOnKeyDown(java.lang.String onKeyDown)
Scripting code that is executed when the user presses down on a key while the component has focus. |
void |
setOnKeyPress(java.lang.String onKeyPress)
Scripting code that is executed when the user presses and releases a key while the component has focus. |
void |
setOnKeyUp(java.lang.String onKeyUp)
Scripting code that is executed when the user releases a key while the component has focus. |
void |
setOnMouseDown(java.lang.String onMouseDown)
Scripting code that is executed when the user presses a mouse button while the mouse pointer is on the component. |
void |
setOnMouseMove(java.lang.String onMouseMove)
Scripting code that is executed when the user moves the mouse pointer while over the component. |
void |
setOnMouseOut(java.lang.String onMouseOut)
Scripting code that is executed when a mouse out movement occurs over this component. |
void |
setOnMouseOver(java.lang.String onMouseOver)
Scripting code that is executed when the user moves the mouse pointer into the boundary of this component. |
void |
setOnMouseUp(java.lang.String onMouseUp)
Scripting code that is 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 |
setSeverity(java.lang.String severity)
Specifies the severity of the alarm. |
void |
setStyle(java.lang.String style)
CSS style or styles to be applied to the outermost HTML element when this component is rendered. |
void |
setStyleClass(java.lang.String styleClass)
CSS style class or classes to be applied to the outermost HTML element when this component is rendered. |
void |
setText(java.lang.String text)
The text description of the alarm. |
void |
setTextPosition(java.lang.String textPosition)
Specifies where the text will be placed relative to the image. |
void |
setToolTip(java.lang.String toolTip)
Sets the value of the title attribute for the HTML element. |
void |
setVisible(boolean visible)
Indicates whether the component should be viewable by the user in the rendered HTML page. |
Methods inherited from class com.sun.webui.jsf.component.ImageComponent |
---|
getAlign, getBorder, getHeight, getHspace, getIcon, getLongDesc, getUrl, getValueExpression, getVspace, getWidth, setAlign, setBorder, setHeight, setHspace, setIcon, setLongDesc, setUrl, setValueExpression, setVspace, setWidth |
Methods inherited from class javax.faces.component.UIGraphic |
---|
getValueBinding, setValue, setValueBinding |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
broadcast, decode, 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 |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEVERITY_DOWN
public static final java.lang.String SEVERITY_CRITICAL
public static final java.lang.String SEVERITY_MAJOR
public static final java.lang.String SEVERITY_MINOR
public static final java.lang.String SEVERITY_OK
public static final java.lang.String DEFAULT_SEVERITY
Constructor Detail |
---|
public Alarm()
public Alarm(java.lang.String severity)
Method Detail |
---|
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class ImageComponent
public java.lang.String getRendererType()
getRendererType
in class ImageComponent
public java.lang.String getHtmlTemplate()
getHtmlTemplate
in class ImageComponent
public void setHtmlTemplate(java.lang.String htmlTemplate)
setHtmlTemplate
in class ImageComponent
public static java.util.List<com.sun.webui.jsf.model.Indicator> getDefaultIndicators()
Typically this method is called by an application that
wants to add a an application defined Indicator
or replace a default Indicator
. An application
first call
List list = Alarm.getDefaultIndicators();
and them add and/or replace an Indicator
.
list.add(appMostSevere); // Add an application indicator
To replace an indicator it must removed first. An indicator
is equal to another indicator if their "type" attributes are the
equal. If appOkIndicator
has type = "ok" this call will
remove the default "ok" indicator.
list.remove(appOkIndicator);// remove default
After the default indicator is removed add the replacement.
list.add(appOkIndicator); // add the replacement
In order for the Alarm component to utilize the modified list
the application can have a value expression for the
indicators
property in which the application returns the
modified list, or calls the setIndicators(list)
method to assign the modified list.
public int compare(java.lang.Object o1, java.lang.Object o2)
o1
equals o2
,
negative 1 if the severity o1
is less than o2
,
positive 1 if the severity o1
is greater than
o2
.
compare
in interface java.util.Comparator
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
equals
in class java.lang.Object
public void encodeBegin(javax.faces.context.FacesContext context) throws java.io.IOException
encodeBegin
in class javax.faces.component.UIComponentBase
java.io.IOException
public void setId(java.lang.String id)
setId
in class ImageComponent
public java.util.List<com.sun.webui.jsf.model.Indicator> getIndicators()
List
of Indicators
supported
by this Alarm
. If indicators
has not been
set explicitly by the application and if there is no value
expression, a list of default alarm indicators obtained by
calling DefaultAlarmIndicators.getIndicators()
is
returned. If the application modifies this list, it must call
setIndicators
or add a value expression that resolves
to the modified list in order to persist the change, otherwise
this method will continue to return a list of default
alarm indicators.
public void setIndicators(java.util.List<com.sun.webui.jsf.model.Indicator> indicators)
public void setRendered(boolean rendered)
setRendered
in class ImageComponent
public java.lang.Object getValue()
getValue
in class ImageComponent
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.
getAlt
in class ImageComponent
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.
setAlt
in class ImageComponent
getAlt()
public java.lang.String getOnClick()
Scripting code that is executed when a mouse click occurs over this component.
getOnClick
in class ImageComponent
public void setOnClick(java.lang.String onClick)
Scripting code that is executed when a mouse click occurs over this component.
setOnClick
in class ImageComponent
getOnClick()
public java.lang.String getOnDblClick()
Scripting code that is executed when a mouse double click occurs over this component.
getOnDblClick
in class ImageComponent
public void setOnDblClick(java.lang.String onDblClick)
Scripting code that is executed when a mouse double click occurs over this component.
setOnDblClick
in class ImageComponent
getOnDblClick()
public java.lang.String getOnKeyDown()
Scripting code that is executed when the user presses down on a key while the component has focus.
public void setOnKeyDown(java.lang.String onKeyDown)
Scripting code that is executed when the user presses down on a key while the component has focus.
getOnKeyDown()
public java.lang.String getOnKeyPress()
Scripting code that is executed when the user presses and releases a key while the component has focus.
public void setOnKeyPress(java.lang.String onKeyPress)
Scripting code that is executed when the user presses and releases a key while the component has focus.
getOnKeyPress()
public java.lang.String getOnKeyUp()
Scripting code that is executed when the user releases a key while the component has focus.
public void setOnKeyUp(java.lang.String onKeyUp)
Scripting code that is executed when the user releases a key while the component has focus.
getOnKeyUp()
public java.lang.String getOnMouseDown()
Scripting code that is executed when the user presses a mouse button while the mouse pointer is on the component.
getOnMouseDown
in class ImageComponent
public void setOnMouseDown(java.lang.String onMouseDown)
Scripting code that is executed when the user presses a mouse button while the mouse pointer is on the component.
setOnMouseDown
in class ImageComponent
getOnMouseDown()
public java.lang.String getOnMouseMove()
Scripting code that is executed when the user moves the mouse pointer while over the component.
getOnMouseMove
in class ImageComponent
public void setOnMouseMove(java.lang.String onMouseMove)
Scripting code that is executed when the user moves the mouse pointer while over the component.
setOnMouseMove
in class ImageComponent
getOnMouseMove()
public java.lang.String getOnMouseOut()
Scripting code that is executed when a mouse out movement occurs over this component.
getOnMouseOut
in class ImageComponent
public void setOnMouseOut(java.lang.String onMouseOut)
Scripting code that is executed when a mouse out movement occurs over this component.
setOnMouseOut
in class ImageComponent
getOnMouseOut()
public java.lang.String getOnMouseOver()
Scripting code that is executed when the user moves the mouse pointer into the boundary of this component.
getOnMouseOver
in class ImageComponent
public void setOnMouseOver(java.lang.String onMouseOver)
Scripting code that is executed when the user moves the mouse pointer into the boundary of this component.
setOnMouseOver
in class ImageComponent
getOnMouseOver()
public java.lang.String getOnMouseUp()
Scripting code that is executed when the user releases a mouse button while the mouse pointer is on the component.
getOnMouseUp
in class ImageComponent
public void setOnMouseUp(java.lang.String onMouseUp)
Scripting code that is executed when the user releases a mouse button while the mouse pointer is on the component.
setOnMouseUp
in class ImageComponent
getOnMouseUp()
public java.lang.String getSeverity()
Specifies the severity of the alarm. Valid values are:
public void setSeverity(java.lang.String severity)
Specifies the severity of the alarm. default set of severity values are:
getSeverity()
public java.lang.String getStyle()
CSS style or styles to be applied to the outermost HTML element when this component is rendered.
getStyle
in class ImageComponent
public void setStyle(java.lang.String style)
CSS style or styles to be applied to the outermost HTML element when this component is rendered.
setStyle
in class ImageComponent
getStyle()
public java.lang.String getStyleClass()
CSS style class or classes to be applied to the outermost HTML element when this component is rendered.
getStyleClass
in class ImageComponent
public void setStyleClass(java.lang.String styleClass)
CSS style class or classes to be applied to the outermost HTML element when this component is rendered.
setStyleClass
in class ImageComponent
getStyleClass()
public java.lang.String getText()
The text description of the alarm.
public void setText(java.lang.String text)
The text description of the alarm.
getText()
public java.lang.String getTextPosition()
Specifies where the text will be placed relative to the image. The valid values currently are "right" or "left". By default, text is placed to the right of the image.
public void setTextPosition(java.lang.String textPosition)
Specifies where the text will be placed relative to the image. The valid values currently are "right" or "left". By default, text is placed to the right of the image.
getTextPosition()
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.
getToolTip
in class ImageComponent
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.
setToolTip
in class ImageComponent
getToolTip()
public boolean isVisible()
Indicates 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, is true, so HTML for the component HTML is included and visible to the user. If the Alarm component is not visible, it can still be processed on subsequent form submissions because the HTML is present.
isVisible
in class ImageComponent
public void setVisible(boolean visible)
Indicates 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, is true, so HTML for the component HTML is included and visible to the user. If the Alarm component is not visible, it can still be processed on subsequent form submissions because the HTML is present.
setVisible
in class ImageComponent
isVisible()
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class ImageComponent
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
saveState
in interface javax.faces.component.StateHolder
saveState
in class ImageComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |