|
||||||||||
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.UIOutput
com.sun.webui.jsf.component.ProgressBar
public class ProgressBar
The ProgressBar component is used to create a progress indicator.
Progress Bar component consists of three progress bar designs: "Simple Determinate", "Indeterminate" and a "Busy" indicator. The "Simple Determinate" and "Indeterminate" progress bars are represented as graphical bars. The "Simple Determinate" progress bar is used to represent the percentage of given task that has been completed. The "Indeterminate" progress bar is used when estimates of task completion cannot be provided, yet the task is being performed. Progress bars may also include a textual description of the operation; a textual description of the current operation status; and any related controls such as a "Pause", "Resume" and/or "Cancel" buttons to halt the associated task or job. The "Busy" indicator is used when space is very constrained.
In the rendered HTML page, the progressbar is created with
<div>
elements. The progress consists of the following
areas:
An optional textual "operation description" element that describes the overall operation being monitored.
A dynamic, graphical "progress animation" element that updates as the operation progresses and has a default height of 14 pixels and width of 184 pixels.
An optional log message textarea that can be used to display log messages.
An optional control element that can be used to provide a stop control, pause and resume controls, cancel control or the like (customizable by developer)
An optional textual "status" element that provides a dynamic, written description of the current state of the operation.
Field Summary | |
---|---|
static java.lang.String |
BOTTOMTASK_CONTROL_FACET
The facet name for the left control. |
static java.lang.String |
BOTTOMTEXT_FACET
The facet name for the bottom text. |
static java.lang.String |
BUSY_ICON_ID
The component id for the actions separator icon. |
static java.lang.String |
BUSY_INDICATOR
|
static java.lang.String |
DETERMINATE
|
static java.lang.String |
INDETERMINATE
|
static java.lang.String |
RIGHTTASK_CONTROL_FACET
The facet name for the right control. |
static java.lang.String |
TASK_CANCELED
|
static java.lang.String |
TASK_COMPLETED
|
static java.lang.String |
TASK_FAILED
|
static java.lang.String |
TASK_NOT_STARTED
|
static java.lang.String |
TASK_PAUSED
|
static java.lang.String |
TASK_RESUMED
|
static java.lang.String |
TASK_RUNNING
|
static java.lang.String |
TASK_STOPPED
|
static java.lang.String |
TOPTEXT_FACET
The facet name for the top text. |
Fields inherited from class javax.faces.component.UIOutput |
---|
COMPONENT_FAMILY, COMPONENT_TYPE |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
ProgressBar()
Creates a new instance of ProgressBar |
Method Summary | |
---|---|
javax.faces.component.UIComponent |
getBusyIcon()
Deprecated. |
javax.faces.context.FacesContext |
getContext()
|
javax.faces.convert.Converter |
getConverter()
|
java.lang.String |
getDescription()
Text to describe the operation that is monitored by the progress bar. |
java.lang.String |
getFailedStateText()
Text to be displayed along with an icon when the task fails. |
java.lang.String |
getFamily()
Return the family for this component. |
int |
getHeight()
Number of pixels for the height of the progress bar animation. |
java.lang.String |
getHtmlTemplate()
Get alternative HTML template to be used by this component. |
java.lang.String |
getLogMessage()
Text to be displayed in a text area at the bottom of the progress bar component. |
javax.faces.component.UIComponent |
getLogMsgComponent(ProgressBar component)
This function creates one textarea component for displaying log messages. |
int |
getProgress()
An integer that indicates the completion percentage of the task. |
java.lang.String |
getProgressImageUrl()
URL to an image to use instead of the default image for the progress indicator. |
int |
getRefreshRate()
The number of milliseconds between updates to the progress bar. |
java.lang.String |
getRendererType()
|
java.lang.String |
getStatus()
Text to be displayed at the bottom of the progress bar, for the status of the operation. |
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. |
int |
getTabIndex()
Position of this element in the tabbing order of the current document. |
java.lang.String |
getTaskState()
A string representing the state of the task associated with this progress bar. |
java.lang.String |
getToolTip()
Sets the value of the title attribute for the HTML element. |
java.lang.String |
getType()
Type of progress bar. |
java.lang.Object |
getValue()
|
int |
getWidth()
Number of pixels for the width of the progress bar animation. |
boolean |
isOverlayAnimation()
Set to true to display the operation progress text superimposed on the progress bar animation. |
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 |
setDescription(java.lang.String description)
Text to describe the operation that is monitored by the progress bar. |
void |
setFailedStateText(java.lang.String failedStateText)
Text to be displayed along with an icon when the task fails. |
void |
setHeight(int height)
Number of pixels for the height of the progress bar animation. |
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 |
setLogMessage(java.lang.String logMessage)
Text to be displayed in a text area at the bottom of the progress bar component. |
void |
setOverlayAnimation(boolean overlayAnimation)
Set to true to display the operation progress text superimposed on the progress bar animation. |
void |
setProgress(int progress)
An integer that indicates the completion percentage of the task. |
void |
setProgressImageUrl(java.lang.String progressImageUrl)
URL to an image to use instead of the default image for the progress indicator. |
void |
setRefreshRate(int refreshRate)
The number of milliseconds between updates to the progress bar. |
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 |
setStatus(java.lang.String status)
Text to be displayed at the bottom of the progress bar, for the status of the operation. |
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 |
setTabIndex(int tabIndex)
Position of this element in the tabbing order of the current document. |
void |
setTaskState(java.lang.String taskState)
A string representing the state of the task associated with this progress bar. |
void |
setToolTip(java.lang.String toolTip)
Sets the value of the title attribute for the HTML element. |
void |
setType(java.lang.String type)
Type of progress bar. |
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 |
setWidth(int width)
Number of pixels for the width of the progress bar animation. |
Methods inherited from class javax.faces.component.UIOutput |
---|
getLocalValue, setConverter, setValue |
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, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression |
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 |
Field Detail |
---|
public static final java.lang.String TOPTEXT_FACET
public static final java.lang.String BOTTOMTEXT_FACET
public static final java.lang.String RIGHTTASK_CONTROL_FACET
public static final java.lang.String BOTTOMTASK_CONTROL_FACET
public static java.lang.String TASK_COMPLETED
public static java.lang.String TASK_PAUSED
public static java.lang.String TASK_STOPPED
public static java.lang.String TASK_RUNNING
public static java.lang.String TASK_RESUMED
public static java.lang.String TASK_CANCELED
public static java.lang.String TASK_FAILED
public static java.lang.String TASK_NOT_STARTED
public static java.lang.String DETERMINATE
public static java.lang.String INDETERMINATE
public static java.lang.String BUSY_INDICATOR
public static final java.lang.String BUSY_ICON_ID
Constructor Detail |
---|
public ProgressBar()
Method Detail |
---|
public javax.faces.context.FacesContext getContext()
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class javax.faces.component.UIOutput
public java.lang.String getRendererType()
getRendererType
in class javax.faces.component.UIComponentBase
public javax.faces.component.UIComponent getBusyIcon()
public void setId(java.lang.String id)
setId
in class javax.faces.component.UIComponentBase
public void setRendered(boolean rendered)
setRendered
in class javax.faces.component.UIComponentBase
public java.lang.Object getValue()
getValue
in interface javax.faces.component.ValueHolder
getValue
in class javax.faces.component.UIOutput
public javax.faces.convert.Converter getConverter()
getConverter
in interface javax.faces.component.ValueHolder
getConverter
in class javax.faces.component.UIOutput
public javax.faces.component.UIComponent getLogMsgComponent(ProgressBar component)
public java.lang.String getHtmlTemplate()
public void setHtmlTemplate(java.lang.String htmlTemplate)
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.
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.
getToolTip()
public java.lang.String getDescription()
Text to describe the operation that is monitored by the progress bar.
public void setDescription(java.lang.String description)
Text to describe the operation that is monitored by the progress bar.
getDescription()
public java.lang.String getFailedStateText()
Text to be displayed along with an icon when the task fails.
public void setFailedStateText(java.lang.String failedStateText)
Text to be displayed along with an icon when the task fails.
getFailedStateText()
public int getHeight()
Number of pixels for the height of the progress bar animation. The default is 14.
public void setHeight(int height)
Number of pixels for the height of the progress bar animation. The default is 14.
getHeight()
public java.lang.String getLogMessage()
Text to be displayed in a text area at the bottom of the progress bar component.
public void setLogMessage(java.lang.String logMessage)
Text to be displayed in a text area at the bottom of the progress bar component.
getLogMessage()
public boolean isOverlayAnimation()
Set to true to display the operation progress text superimposed on the progress bar animation.
public void setOverlayAnimation(boolean overlayAnimation)
Set to true to display the operation progress text superimposed on the progress bar animation.
isOverlayAnimation()
public int getProgress()
An integer that indicates the completion percentage of the task.
public void setProgress(int progress)
An integer that indicates the completion percentage of the task.
getProgress()
public java.lang.String getProgressImageUrl()
URL to an image to use instead of the default image for the progress indicator.
public void setProgressImageUrl(java.lang.String progressImageUrl)
URL to an image to use instead of the default image for the progress indicator.
getProgressImageUrl()
public int getRefreshRate()
The number of milliseconds between updates to the progress bar.
public void setRefreshRate(int refreshRate)
The number of milliseconds between updates to the progress bar.
getRefreshRate()
public java.lang.String getStatus()
Text to be displayed at the bottom of the progress bar, for the status of the operation.
public void setStatus(java.lang.String status)
Text to be displayed at the bottom of the progress bar, for the status of the operation.
getStatus()
public java.lang.String getStyle()
CSS style or styles to be applied to the outermost HTML element when this component is rendered.
public void setStyle(java.lang.String style)
CSS style or styles to be applied to the outermost HTML element when this component is rendered.
getStyle()
public java.lang.String getStyleClass()
CSS style class or classes to be applied to the outermost HTML element when this component is rendered.
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.
getStyleClass()
public int getTabIndex()
Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.
public void setTabIndex(int tabIndex)
Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.
getTabIndex()
public java.lang.String getTaskState()
A string representing the state of the task associated with this progress bar. Default value for taskState is not_started. Valid values are:
not_started
running
paused
resumed
stopped
canceled
failed
completed
public void setTaskState(java.lang.String taskState)
A string representing the state of the task associated with this progress bar. Valid values are:
not_started
running
paused
resumed
stopped
canceled
failed
completed
getTaskState()
public java.lang.String getType()
Type of progress bar. Value must be one of the following:
"DETERMINATE" for horizontal bar showing percent complete
"INDETERMINATE" for horizontal bar without percent complete
"BUSY" for simple activity indicator
public void setType(java.lang.String type)
Type of progress bar. Value must be one of the following:
"DETERMINATE" for horizontal bar showing percent complete
"INDETERMINATE" for horizontal bar without percent complete
"BUSY" for simple activity indicator
getType()
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.
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.
isVisible()
public int getWidth()
Number of pixels for the width of the progress bar animation. The default is 184.
public void setWidth(int width)
Number of pixels for the width of the progress bar animation. The default is 184.
getWidth()
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 javax.faces.component.UIOutput
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 javax.faces.component.UIOutput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |