Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--com.sun.java.swing.JComponent | +--com.sun.java.swing.JProgressBar
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Inner Class Summary | |
JProgressBar.AccessibleJProgressBar
The class used to obtain the accessible role for this object. |
|
JProgressBar.ModelListener
|
Inner classes inherited from class com.sun.java.swing.JComponent | |
JComponent.AccessibleJComponent |
Field Summary | |
BoundedRangeModel | barModel
|
ChangeEvent | changeEvent
Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar. |
ChangeListener | changeListener
|
int | orientation
|
boolean | paintBorder
|
Fields inherited from class com.sun.java.swing.JComponent | |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
JProgressBar()
Creates a horizontal progress bar with a border. |
Method Summary | |
void | addChangeListener(ChangeListener l)
Adds a ChangeListener to the button. |
ChangeListener | createChangeListener()
|
void | fireStateChanged()
Notify all listeners that have registered interest for notification on this event type. |
AccessibleContext | getAccessibleContext()
Get the AccessibleContext associated with this JComponent |
int | getMaximum()
Returns the model's maximum value. |
int | getMinimum()
Returns the model's minimum value. |
BoundedRangeModel | getModel()
Returns the data model used by the JProgressBar. |
int | getOrientation()
Returns JProgressBar. |
java.lang.String | getUIClassID()
Returns the name of the L&F class that renders this component. |
com.sun.java.swing.plaf.ProgressBarUI | getUI()
Returns the L&F object that renders this component. |
int | getValue()
Returns the model's current value. |
boolean | isBorderPainted()
Returns true if the progress bar has a border or false if it does not. |
void | paintBorder(java.awt.Graphics g)
Paint the progress bar's border if BorderPainted property is true. |
void | removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button. |
void | setBorderPainted(boolean b)
Sets whether the progress bar should have a border. |
void | setMaximum(int n)
Sets the model's maximum to x. |
void | setMinimum(int n)
Sets the model's minimum to x. |
void | setModel(BoundedRangeModel newModel)
Sets the data model used by the JProgressBar. |
void | setOrientation(int newOrientation)
Sets the progress bar's orientation to newOrientation, which must be JProgressBar. |
void | setUI(com.sun.java.swing.plaf.ProgressBarUI ui)
Sets the L&F object that renders this component. |
void | setValue(int n)
Sets the model's current value to x. |
void | update(java.awt.Graphics g)
Overridden to call paint without filling the background. |
void | updateUI()
Notification from the UIFactory that the L&F has changed. |
Methods inherited from class java.awt.Container | |
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected int orientation
protected boolean paintBorder
protected BoundedRangeModel barModel
protected transient ChangeEvent changeEvent
protected ChangeListener changeListener
Constructor Detail |
public JProgressBar()
Method Detail |
public void update(java.awt.Graphics g)
public int getOrientation()
JProgressBar.VERTICAL
or
JProgressBar.HORIZONTAL
, depending on the orientation
of the progress bar. The default orientation is
HORIZONTAL
.public void setOrientation(int newOrientation)
JProgressBar.VERTICAL
or
JProgressBar.HORIZONTAL
. The default orientation
is HORIZONTAL
.
newOrientation
- HORIZONTAL or VERTICALpublic boolean isBorderPainted()
public void setBorderPainted(boolean b)
b
- true if the progress bar should have a borderprotected void paintBorder(java.awt.Graphics g)
g
- the Graphics context within which to paint the borderpublic com.sun.java.swing.plaf.ProgressBarUI getUI()
public void setUI(com.sun.java.swing.plaf.ProgressBarUI ui)
ui
- the ProgressBarUI L&F objectpublic void updateUI()
public java.lang.String getUIClassID()
protected ChangeListener createChangeListener()
public void addChangeListener(ChangeListener l)
l
- the ChangeListener to addpublic void removeChangeListener(ChangeListener l)
l
- the ChangeListener to removeprotected void fireStateChanged()
public BoundedRangeModel getModel()
public void setModel(BoundedRangeModel newModel)
newModel
- the BoundedRangeModel to usepublic int getValue()
public int getMinimum()
public int getMaximum()
public void setValue(int n)
IllegalArgumentException
and the value is not changed.
Notifies any listeners if the data changes.
x
- the new valuepublic void setMinimum(int n)
Notifies any listeners if the data changes.
x
- the new minimumpublic void setMaximum(int n)
Notifies any listeners if the data changes.
x
- the new maximumpublic AccessibleContext getAccessibleContext()
Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |