A progress indicator (or progress bar) bar indicates that one or more operations is under way and shows users what proportion of the operation has been completed. The progress indicator consists of a rectangular bar that fills as the operation progresses. Another application for the progress indicator is to use it as a gauge to show the actual value, for example a temperature.
barColor
Defines the color of the bar which moves inside the progress indicator. Following bar colors are available (specified color is based on the standard style sheet):
CRITICAL
Bar in progress bar has orange color.
NEGATIVE
Bar in progress bar has red color.
NEUTRAL
Bar in progress bar has blue color.
POSITIVE
Bar in progress bar has green color.
displayValue
Defines the text that is displayed left aligned in the progress bar.
id
Identification name of the progress indicator.
percentValue
Defines the value in percent that the the bar inside the progress indicator should display. The value specified must be greater than 0. If you do not set this attribute an empty frame, with no progress bar inside, is displayed.
showValue
A boolean value. If set to "true" the text defined with the 'displayValue' attribute is displayed together with the progress bar. If set to 'false' only the progress bar is displayed.
tooltip
Defines the hint of the progress bar which is displayed as the mouse cursor passes over the progress bar, or as the mouse button is pressed but not released.
width
Defines the width of the progress bar.
Attributes |
M |
Values |
Usage |
---|---|---|---|
barColor |
CRITICAL NEGATIVE NEUTRAL POSITIVE |
Taglib barColor="POSITIVE" Classlib setBarColor(ProgressIndicatorBarColor.POSITIVE) |
|
displayValue |
String |
Taglib displayValue="Positive" Classlib setDisplayValue("Positive") |
|
id |
* |
String (cs) |
Taglib id="progressBar" Classlib Defined with progressBar object. |
percentValue |
String Numeric |
Taglib percentValue="20" Classlib setPercentValue(20) |
|
showValue |
FALSE TRUE (d) |
Taglib showValue="FALSE" Classlib setShowValue(false) |
|
tooltip |
String |
Taglib tooltip="pressure in valve 1" Classlib setTooltip("pressure in valve 1") |
|
width |
Unit (100) |
Taglib width="125px" Classlib setWidth("125px") |
using the taglib
<hbj:progressIndicator id="myProgressIndicator1" percentValue="75" displayValue="Critical" barColor="CRITICAL" width="300px" /> <hbj:progressIndicator id="myProgressIndicator2" percentValue="10" displayValue="Negative" barColor="NEGATIVE" width="300px" /> <hbj:progressIndicator id="myProgressIndicator3" percentValue="50" displayValue="Neutral" barColor="NEUTRAL" width="300px" /> <hbj:progressIndicator id="myProgressIndicator4" percentValue="90" displayValue="Positive" barColor="POSITIVE" width="300px" />
using the classlib
Form form = (Form) this.getForm(); ProgressBar pb1 = new ProgressBar(); pb1.setPercentValue("75"); pb1.setDisplayValue("Critical"); pb1.setBarColor(ProgressIndicatorBarColor.CRITICAL); pb1.setWidth("300px"); form.addComponent(pb1); ProgressBar pb2 = new ProgressBar(); pb2.setPercentValue("10"); pb2.setDisplayValue("Negative"); pb2.setBarColor(ProgressIndicatorBarColor.NEGATIVE); pb2.setWidth("300px"); form.addComponent(pb2); ProgressBar pb3 = new ProgressBar(); pb3.setPercentValue("50"); pb3.setDisplayValue("Neutral"); pb3.setBarColor(ProgressIndicatorBarColor.NEUTRAL); pb3.setWidth("300px"); form.addComponent(pb3); ProgressBar pb4 = new ProgressBar(); pb4.setPercentValue("90"); pb4.setDisplayValue("Positive"); pb4.setBarColor(ProgressIndicatorBarColor.POSITIVE); pb4.setWidth("300px"); form.addComponent(pb4);
Result