Class WProgressBar
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractWComponent
-
- com.github.bordertech.wcomponents.WBeanComponent
-
- com.github.bordertech.wcomponents.WProgressBar
-
- All Implemented Interfaces:
AjaxTarget
,BeanAware
,BeanBound
,BeanProviderBound
,DataBound
,Labelable
,WComponent
,WebComponent
,Serializable
public class WProgressBar extends WBeanComponent implements AjaxTarget, Labelable
WProgressBar is a component for displaying progress bars. The number of steps in the progress bar is configurable, and the progress bar's value can either be set manually, or sourced from an Integer bean.
- Since:
- 1.0.0
- Author:
- Yiannis Paschalidis, Mark Reeves
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WProgressBar.ProgressBarType
Progress bar types.static class
WProgressBar.UnitType
Deprecated.- not implemented in HTML spec - do not usestatic class
WProgressBar.WProgressBarModel
The component model that holds progress bar's state.-
Nested classes/interfaces inherited from class com.github.bordertech.wcomponents.AbstractWComponent
AbstractWComponent.WComponentRef
-
-
Field Summary
Fields Modifier and Type Field Description static WProgressBar.ProgressBarType
DEFAULT_TYPE
The default type for a WProgressBar.-
Fields inherited from interface com.github.bordertech.wcomponents.WComponent
DEFAULT_APPLICATION_ID, DEFAULT_INTERNAL_ID, DEFAULT_NO_ID, ID_CONTEXT_SEPERATOR, ID_FRAMEWORK_ASSIGNED_SEPERATOR, ID_VALIDATION_PATTERN
-
-
Constructor Summary
Constructors Constructor Description WProgressBar()
Creates a normal progress bar.WProgressBar(int max)
Creates a progress bar with the given maximum value.WProgressBar(WProgressBar.ProgressBarType type)
Creates a progress bar with the given bar type.WProgressBar(WProgressBar.ProgressBarType type, int max)
Creates a progress bar with the given bar type and max value.WProgressBar(WProgressBar.ProgressBarType type, WProgressBar.UnitType unitType)
WProgressBar(WProgressBar.ProgressBarType type, WProgressBar.UnitType unitType, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected WProgressBar.WProgressBarModel
getComponentModel()
Returns the effective component model for this component.int
getMax()
protected WProgressBar.WProgressBarModel
getOrCreateComponentModel()
Retrieves the model for this component so that it can be modified.WProgressBar.ProgressBarType
getProgressBarType()
String
getText()
Deprecated.progress elements contain no text useAbstractWComponent.getToolTip()
insteadWProgressBar.UnitType
getUnitType()
Deprecated.unitType not supported in HTML specint
getValue()
Retrieves the value of the progress bar.protected WProgressBar.WProgressBarModel
newComponentModel()
Creates a new Component model appropriate for this component.void
setMax(int max)
Sets the maximum value of the progress bar.void
setProgressBarType(WProgressBar.ProgressBarType type)
Sets the progress bar type.void
setText(String text)
Deprecated.progress bars contain no text useAbstractWComponent.setToolTip(java.lang.String, java.io.Serializable...)
insteadvoid
setUnitType(WProgressBar.UnitType unitType)
Deprecated.unitType not supported in HTML spec - now a no-opvoid
setValue(int value)
Sets the value of the progress bar for the given context.String
toString()
Creates a String representation of this component; usually for debugging purposes.-
Methods inherited from class com.github.bordertech.wcomponents.WBeanComponent
addBeanToScratchMap, doUpdateBeanValue, getBean, getBeanFromScratchMap, getBeanId, getBeanProperty, getBeanProvider, getBeanScratchMap, getBeanValue, getData, isBeanInScratchMap, isChanged, isSearchAncestors, isUseRequestScopeScratchMap, removeBeanFromScratchMap, resetData, setBean, setBeanId, setBeanProperty, setBeanProvider, setData, setSearchAncestors, updateBeanValue
-
Methods inherited from class com.github.bordertech.wcomponents.AbstractWComponent
addHtmlClass, addHtmlClass, addNotify, afterPaint, assertAddSupported, beforePaint, createErrorDiagnostic, createErrorDiagnostic, forward, getAccessibleText, getAttribute, getBaseUrl, getDefaultModel, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getParent, getScratchMap, getTabIndex, getTag, getTemplate, getTemplateMarkUp, getToolTip, handleRequest, hasNoComponentModel, hasTabIndex, initialiseComponentModel, invokeLater, invokeLaters, isDebugStructure, isDefaultState, isFlagSet, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, paint, paintComponent, preparePaint, preparePaintComponent, removeAttribute, removeComponentModel, removeHtmlClass, removeHtmlClass, removeNotify, replaceWComponent, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFlag, setFocussed, setHidden, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showErrorIndicatorsForComponent, showWarningIndicators, showWarningIndicatorsForComponent, tidyUpUIContext, tidyUpUIContextForTree, validate, validateComponent, writeReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.WComponent
addHtmlClass, addHtmlClass, forward, getAccessibleText, getAttribute, getBaseUrl, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getParent, getTabIndex, getTag, getToolTip, handleRequest, hasTabIndex, invokeLater, isDefaultState, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, paint, preparePaint, removeAttribute, removeHtmlClass, removeHtmlClass, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFocussed, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showWarningIndicators, tidyUpUIContextForTree, validate
-
-
-
-
Field Detail
-
DEFAULT_TYPE
public static final WProgressBar.ProgressBarType DEFAULT_TYPE
The default type for a WProgressBar.
-
-
Constructor Detail
-
WProgressBar
public WProgressBar()
Creates a normal progress bar.
-
WProgressBar
public WProgressBar(int max)
Creates a progress bar with the given maximum value.- Parameters:
max
- the maximum value
-
WProgressBar
@Deprecated public WProgressBar(WProgressBar.ProgressBarType type, WProgressBar.UnitType unitType)
Creates a progress bar with the given bar type.- Parameters:
type
- the progress bar type.unitType
- the display unit type.
-
WProgressBar
public WProgressBar(WProgressBar.ProgressBarType type)
Creates a progress bar with the given bar type.- Parameters:
type
- the progress bar type.
-
WProgressBar
@Deprecated public WProgressBar(WProgressBar.ProgressBarType type, WProgressBar.UnitType unitType, int max)
Creates a progress bar with the given bar type, unit type and max value.- Parameters:
type
- the progress bar type.unitType
- the display unit type.max
- the maximum value
-
WProgressBar
public WProgressBar(WProgressBar.ProgressBarType type, int max)
Creates a progress bar with the given bar type and max value.- Parameters:
type
- the progress bar type.max
- the maximum value
-
-
Method Detail
-
getMax
public int getMax()
- Returns:
- the maximum value of the progress bar.
-
setMax
public final void setMax(int max)
Sets the maximum value of the progress bar.- Parameters:
max
- the maximum allowable value.
-
setValue
public void setValue(int value)
Sets the value of the progress bar for the given context.- Parameters:
value
- the progress bar value.
-
getValue
public int getValue()
Retrieves the value of the progress bar.- Returns:
- the progress bar's value for the context.
-
getProgressBarType
public WProgressBar.ProgressBarType getProgressBarType()
- Returns:
- the progress bar type.
-
setProgressBarType
public final void setProgressBarType(WProgressBar.ProgressBarType type)
Sets the progress bar type.- Parameters:
type
- the progress bar type.
-
getUnitType
@Deprecated public final WProgressBar.UnitType getUnitType()
Deprecated.unitType not supported in HTML specRetrieves the display unit type.- Returns:
- the unit type.
-
setUnitType
@Deprecated public void setUnitType(WProgressBar.UnitType unitType)
Deprecated.unitType not supported in HTML spec - now a no-opSets the display unit type.- Parameters:
unitType
- the unit type.
-
getText
@Deprecated public String getText()
Deprecated.progress elements contain no text useAbstractWComponent.getToolTip()
instead- Returns:
- the progress bar text.
-
setText
@Deprecated public void setText(String text)
Deprecated.progress bars contain no text useAbstractWComponent.setToolTip(java.lang.String, java.io.Serializable...)
insteadSets the progress bar text.- Parameters:
text
- the text to set.
-
toString
public String toString()
Description copied from class:AbstractWComponent
Creates a String representation of this component; usually for debugging purposes.- Overrides:
toString
in classAbstractWComponent
- Returns:
- a String representation of this component.
-
newComponentModel
protected WProgressBar.WProgressBarModel newComponentModel()
Creates a new Component model appropriate for this component.- Overrides:
newComponentModel
in classWBeanComponent
- Returns:
- a new WProgressBarModel.
-
getOrCreateComponentModel
protected WProgressBar.WProgressBarModel getOrCreateComponentModel()
Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.- Overrides:
getOrCreateComponentModel
in classWBeanComponent
- Returns:
- the model for this component
-
getComponentModel
protected WProgressBar.WProgressBarModel getComponentModel()
Returns the effective component model for this component. Subclass may override this method to narrow the return type to their specific model type.- Overrides:
getComponentModel
in classWBeanComponent
- Returns:
- the effective component model
-
-