Progress Bar
Overview
It is a bar that can demonstrate the progress of a particular request or a loading of an event. You can have text that indicates the current status of the ProgressBar and can be used both horizontally and vertically.
Source code
Attributes
Type
Name
Description
int
max
Progress Bar maximum value.
int
value
Current value of progress Bar.
String
prefix
It is the text that appears to the left of the value, remembering that the text output is prefix + value + sufix
String
suffix
It is the text that appears to the right of the value, remembering that the text output is prefix + value + suffix
boolean
drawText
It will indicate if the text will be displayed in progress bar or not, by default it comes as false.
boolean
drawValue
It will indicate if the value will be displayed in the progress bar.
Methods
Type
Name
Description
Constructor
ProgressBar()
Instances a ProgressBar with the minimum values 0 and maximum value 100.
Constructor
ProgressBar(int min, int max)
Instances a ProgressBar with the values passed in the variables min and max.
Void
setEndless()
Use in a horizontal ProgressBar to leave it without end.
Void
setValue(int n)
Updates the current progressbar value and draws the ProgressBar with the updated state.
Void
setValue(int value, String prefix, String suffix)
Updates the current value of progressBar and draws it again with the updated state and with texts before the value and after the value.
References
See the Java Docs for more information.
You can check the example contained in the SDK, in tc.samples.api.ui ProgressBarSample.
Last updated