class org.aswing.JProgressBar extends Component
Interfaces | |||
![]() | Orientable |
|
A component that, by default, displays an integer value within a bounded interval.
A progress bar typically communicates the progress of some work by displaying its percentage of completion and possibly a textual display of this percentage. @author paling
![]() | Show Events | Hide Events
|
Class Fields
Instance Fields
var indeterminate:Bool
Determines whether the progress bar is in determinate or indeterminate mode.
An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occurring.
By default, this property is false
.
An indeterminate progress bar will start a Timer
to
call repaint continuously when it is displayable, it make the progress can paint continuously.
Make sure the current Icon
for this bar support indeterminate
if you set indeterminate to true.
var orientation:Int
The progress bar's orientation to newOrientation
,
which must be JProgressBar.VERTICAL
or
JProgressBar.HORIZONTAL
. The default orientation
is HORIZONTAL
.
Note that If the orientation is set to VERTICAL
,
the progress string can only be displayable when the progress bar's font
is a embedFonts.
@see org.aswing.ASFont#getEmbedFonts()
The progress bar's current value
(stored in the progress bar's data model).
The data model (a BoundedRangeModel
instance)
handles any mathematical
issues arising from assigning faulty values.
If the new value is different from the previous value, all change listeners are notified.
function new(?orient:Int = 0, ?min:Int = 0, ?max:Int = 100): Void
orient | (optional)the desired orientation of the progress bar,
just can be |
min | (optional)the minimum value of the progress bar, default is 0 |
max | (optional)the maximum value of the progress bar, default is 100 |
function getMaximum(): Int
Returns the progress bar's maximum value,
which is stored in the progress bar's BoundedRangeModel
.
By default, the maximum value is 100
.
@see #setMaximum() @see org.aswing.BoundedRangeModel#getMaximum()
returns | the progress bar's maximum value |
function getMinimum(): Int
Returns the progress bar's minimum value,
which is stored in the progress bar's BoundedRangeModel
.
By default, the minimum value is 0
.
@see #setMinimum() @see org.aswing.BoundedRangeModel#getMinimum()
returns | the progress bar's minimum value |
function getPercentComplete(): Float
Returns the percent complete for the progress bar. Note that this number is between 0.0 and 1.0.
returns | the percent complete for this progress bar |
Returns the progress bar's current value,
which is stored in the progress bar's BoundedRangeModel
.
The value is always between the
minimum and maximum values, inclusive. By default, the
value is initialized to be equal to the minimum value.
@see #setValue() @see org.aswing.BoundedRangeModel#getValue()
returns | the current value of the progress bar |
function setMaximum(n:Int): Void
Sets the progress bar's maximum value
(stored in the progress bar's data model) to n
.
The underlying BoundedRangeModel
handles any mathematical
issues arising from assigning faulty values.
If the maximum value is different from the previous maximum, all change listeners are notified.
@see #getMaximum() @see #addChangeListener() @see org.aswing.BoundedRangeModel#setMaximum()
n | the new maximum |
function setMinimum(n:Int): Void
Sets the progress bar's minimum value
(stored in the progress bar's data model) to n
.
The data model (a BoundedRangeModel
instance)
handles any mathematical
issues arising from assigning faulty values.
If the minimum value is different from the previous minimum, all change listeners are notified.
@see #getMinimum() @see #addChangeListener() @see org.aswing.BoundedRangeModel#setMinimum()
n | the new minimum |