GNU Classpath (0.20) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JProgressBar
Property | Stored in | Bound? |
---|---|---|
borderPainted | progressBar | yes |
changeListeners | progressBar | no |
indeterminate | progressBar | yes |
maximum | model | no |
minimum | model | no |
model | progressBar | no |
orientation | progressBar | yes |
percentComplete | progressBar | no |
string | progressBar | yes |
stringPainted | progressBar | yes |
value | model | no |
Nested Class Summary | |
protected class |
|
Nested classes/interfaces inherited from class javax.swing.JComponent | |
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container | |
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component | |
Component.AccessibleAWTComponent , Component.BltBufferStrategy , Component.FlipBufferStrategy |
Field Summary | |
protected ChangeEvent |
|
protected ChangeListener |
|
protected BoundedRangeModel |
|
protected int |
|
protected boolean |
|
protected boolean |
|
protected String |
|
Fields inherited from class javax.swing.JComponent | |
TOOL_TIP_TEXT_KEY , UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW , accessibleContext , listenerList , ui |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver | |
ABORT , ALLBITS , ERROR , FRAMEBITS , HEIGHT , PROPERTIES , SOMEBITS , WIDTH |
Fields inherited from interface javax.swing.SwingConstants | |
BOTTOM , CENTER , EAST , HORIZONTAL , LEADING , LEFT , NEXT , NORTH , NORTH_EAST , NORTH_WEST , PREVIOUS , RIGHT , SOUTH , SOUTH_EAST , SOUTH_WEST , TOP , TRAILING , VERTICAL , WEST |
Constructor Summary | |
| |
| |
| |
| |
|
Method Summary | |
void |
|
protected ChangeListener |
|
protected void |
|
AccessibleContext |
|
ChangeListener[] |
|
int |
|
int |
|
BoundedRangeModel |
|
int |
|
double |
|
String |
|
ProgressBarUI |
|
String |
|
int |
|
boolean |
|
boolean |
|
boolean |
|
protected void |
|
protected String |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
public JProgressBar()
Creates a new horizontally oriented JProgressBar object with a minimum of 0 and a maximum of 100.
public JProgressBar(int orientation)
Creates a new JProgressBar object with a minimum of 0, a maximum of 100, and the given orientation.
- Parameters:
orientation
- The orientation of the JProgressBar.
- Throws:
IllegalArgumentException
- iforientation
is not eitherSwingConstants.HORIZONTAL
orSwingConstants.VERTICAL
.
public JProgressBar(int minimum, int maximum)
Creates a new horizontally oriented JProgressBar object with the given minimum and maximum.
- Parameters:
minimum
- The minimum of the JProgressBar.maximum
- The maximum of the JProgressBar.
public JProgressBar(int orientation, int minimum, int maximum)
Creates a new JProgressBar object with the given minimum, maximum, and orientation.
- Parameters:
orientation
- The orientation of the JProgressBar.minimum
- The minimum of the JProgressBar.maximum
- The maximum of the JProgressBar.
- Throws:
IllegalArgumentException
- iforientation
is not eitherSwingConstants.HORIZONTAL
orSwingConstants.VERTICAL
.
public JProgressBar(BoundedRangeModel model)
Creates a new horizontally oriented JProgressBar object with the given model.
- Parameters:
model
- The model to be used with the JProgressBar.
public void addChangeListener(ChangeListener listener)
This method adds a ChangeListener to this JProgressBar.
- Parameters:
listener
- The ChangeListener to add to this JProgressBar.
protected ChangeListener createChangeListener()
This method returns a ChangeListener that gets registered model. By default, the ChangeListener, propagates the ChangeEvents to the ChangeListeners of the JProgressBar.
- Returns:
- A new ChangeListener.
protected void fireStateChanged()
This method is called when the JProgressBar receives a ChangeEvent from its model. This simply propagates the event (changing the source to the JProgressBar) to the JProgressBar's listeners.
public AccessibleContext getAccessibleContext()
DOCUMENT ME!
- Specified by:
- getAccessibleContext in interface Accessible
- Overrides:
- getAccessibleContext in interface JComponent
- Returns:
- DOCUMENT ME!
public ChangeListener[] getChangeListeners()
This method returns an array of all ChangeListeners listening to this progress bar.
- Returns:
- An array of ChangeListeners listening to this progress bar.
public int getMaximum()
This method returns the maximum value of this JProgressBar.
- Returns:
- The maximum value of this JProgressBar.
public int getMinimum()
This method returns the minimum value of this JProgressBar.
- Returns:
- The minimum value of this JProgressBar.
public BoundedRangeModel getModel()
This method returns the model used with this JProgressBar.
- Returns:
- The model used with this JProgressBar.
public int getOrientation()
This method returns the orientation of the JProgressBar.
- Returns:
- The orientation of the JProgressBar.
public double getPercentComplete()
This method returns the percent of the bar that is "complete". (This is the amount value / (max - min)).
- Returns:
- DOCUMENT ME!
public String getString()
This method returns the string that is painted if the stringPainted property is set to true. If there is no string set, it will return a string containing the JProgressBar's value as a percent.
- Returns:
- The string that is painted.
public ProgressBarUI getUI()
This method returns the JProgressBar's UI delegate.
- Returns:
- This JProgressBar's UI delegate.
public String getUIClassID()
This method returns the identifier to allow the UIManager to pick the correct class to act as the UI for this JProgressBar.
- Overrides:
- getUIClassID in interface JComponent
- Returns:
- The UIClassID: "ProgressBarUI".
public int getValue()
This method returns the current value of the JProgressBar.
- Returns:
- The current value of the JProgressBar.
public boolean isBorderPainted()
This method returns whether the border is painted.
- Returns:
- Whether the border is painted.
public boolean isIndeterminate()
This method returns whether the JProgressBar is indeterminate.
- Returns:
- Whether this JProgressBar is indeterminate.
public boolean isStringPainted()
This method returns whether the progressString will be painted.
- Returns:
- Whether the string is painted.
protected void paintBorder(Graphics graphics)
This method paints the border of the JProgressBar
- Overrides:
- paintBorder in interface JComponent
- Parameters:
graphics
- The graphics object to paint with.
protected String paramString()
This method returns a string that can be used to describe this JProgressBar. This method is usually only used for debugging purposes.
- Overrides:
- paramString in interface JComponent
- Returns:
- A string that describes this JProgressBar.
public void removeChangeListener(ChangeListener listener)
This method removes a ChangeListener from this JProgressBar.
- Parameters:
listener
- The ChangeListener to remove from this JProgressBar.
public void setBorderPainted(boolean painted)
This method changes the borderPainted property.
- Parameters:
painted
- Whether the border is painted.
public void setIndeterminate(boolean newValue)
This method changes the indeterminate property. If the JProgressBar is determinate, it paints a percentage of the bar described by its value. If it is indeterminate, it simply bounces a box between the ends of the bar; the value of the JProgressBar is ignored.
- Parameters:
newValue
- Whether the JProgressBar is indeterminate.
public void setMaximum(int maximum)
This method sets the maximum value of this JProgressBar.
- Parameters:
maximum
- The maximum value of this JProgressBar.
public void setMinimum(int minimum)
This method sets the minimum value of this JProgressBar.
- Parameters:
minimum
- The minimum value of this JProgressBar.
public void setModel(BoundedRangeModel model)
This method changes the model property for this JProgressBar.
- Parameters:
model
- The model to use with this JProgressBar.
public void setOrientation(int orientation)
This method changes the orientation property. The orientation of the JProgressBar can be either horizontal or vertical.
- Parameters:
orientation
- The orientation of the JProgressBar.
public void setString(String string)
This method changes the string property. The string given will be the one painted. If you want to revert to the default string given, set the string to null.
- Parameters:
string
- The string to be painted.
public void setStringPainted(boolean painted)
This method changes the stringPainted property.
- Parameters:
painted
- Whether the string is painted.
public void setUI(ProgressBarUI ui)
This method changes the UI property for this JProgressBar.
- Parameters:
ui
- The new UI delegate.
public void setValue(int value)
This method sets the value of the JProgressBar.
- Parameters:
value
- The value of the JProgressBar.
public void updateUI()
This method reverts the UI delegate for this JProgressBar to the default for this Look and Feel.
- Overrides:
- updateUI in interface JComponent
GNU Classpath (0.20) |