new JProgressBar()
public function JProgressBar(orient:Number, min:Number, max:Number)
JProgressBar(orient:Number, min:Number, max:Number)
JProgressBar(orient:Number)
JProgressBar()
orient | (optional)the desired orientation of the progress bar,
just can be JProgressBar.HORIZONTAL or JProgressBar.VERTICAL ,
default is JProgressBar.HORIZONTAL
|
min | (optional)the minimum value of the progress bar, default is 0 |
max | (optional)the maximum value of the progress bar, default is 100 |
static public ON_STATE_CHANGED:String
static public HORIZONTAL:Number
static public VERTICAL:Number
public function updateUI():Void
Description copied from Component
Resets the UI property to a value from the current look and feel.
Component
subclasses must override this method
like this:
public void updateUI() { setUI((SliderUI)UIManager.getUI(this); }
public function setUI(newUI:ProgressBarUI):Void
Description copied from Component
Sets the look and feel delegate for this component.
Component
subclasses generally override this method
to narrow the argument type. For example, in JSlider
:
public void setUI(SliderUI newUI) { super.setUI(newUI); }
Additionally Component
subclasses must provide a
getUI
method that returns the correct type. For example:
public SliderUI getUI() { return (SliderUI)ui; }
public function getUIClassID():String
Description copied from Component
Returns the UIDefaults
key used to
look up the name of the org.aswing.plaf.ComponentUI
class that defines the look and feel
for this component. Most applications will never need to
call this method. Subclasses of Component
that support
pluggable look and feel should override this method to
return a UIDefaults
key that maps to the
ComponentUI
subclass that defines their look and feel.
public function getModel():BoundedRangeModel
Returns the data model used by this progress bar.
the BoundedRangeModel
currently in use
public function setModel(newModel:BoundedRangeModel):Void
Sets the data model used by the JProgressBar
.
newModel | the BoundedRangeModel to use
|
public function getIcon():Icon
Returns the icon used by this progress bar.
the Icon
currently in use
public function setIcon(icon:Icon):Void
Sets the icon used by the JProgressBar
.
Genarally the LookAndFeel UI for JProgressBar
will set
a icon to paint the progress, if you want a custom icon, you can
set a new icon by this method, and your custom icon should paint the
progress by the model data or indeterminate property.
icon | the Icon to paint the progress.
|
public function getString():String
Returns the current value of the progress string.
the value of the progress string
public function setString(s:String):Void
Sets the value of the progress string. By default,
this string is null
, will paint nothing text.
s | the value of the progress string |
public function getOrientation():Number
Returns JProgressBar.VERTICAL
or
JProgressBar.HORIZONTAL
, depending on the orientation
of the progress bar. The default orientation is
HORIZONTAL
.
HORIZONTAL
or VERTICAL
public function setOrientation(newOrientation:Number):Void
Sets 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.
newOrientation | HORIZONTAL or VERTICAL
|
public function getPercentComplete():Number
Returns the percent complete for the progress bar. Note that this number is between 0.0 and 1.0.
the percent complete for this progress bar
public function getValue():Number
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.
the current value of the progress bar
public function getMinimum():Number
Returns the progress bar's minimum value,
which is stored in the progress bar's BoundedRangeModel
.
By default, the minimum value is 0
.
the progress bar's minimum value
public function getMaximum():Number
Returns the progress bar's maximum value,
which is stored in the progress bar's BoundedRangeModel
.
By default, the maximum value is 100
.
the progress bar's maximum value
public function setValue(n:Number):Void
Sets the progress bar's current 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 new value is different from the previous value, all change listeners are notified.
n | the new value |
public function setMinimum(n:Number):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.
n | the new minimum |
public function setMaximum(n:Number):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.
n | the new maximum |
public function setIndeterminate(newValue:Boolean):Void
Sets the indeterminate
property of the progress bar,
which 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.
newValue | true if the progress bar
should change to indeterminate mode;
false if it should revert to normal.
|
public function isIndeterminate():Boolean
Returns the value of the indeterminate
property.
the value of the indeterminate
property