planetj.gui
Class CMProgressBar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JProgressBar
                          |
                          +--planetj.gui.CMProgressBar
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants

public class CMProgressBar
extends JProgressBar

Insert the type's description here. Creation date: (4/25/02 9:03:11 AM)

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CMProgressBar()
          CMProgressBar constructor comment.
CMProgressBar(BoundedRangeModel newModel)
          CMProgressBar constructor comment.
CMProgressBar(int orient)
          CMProgressBar constructor comment.
CMProgressBar(int min, int max)
          CMProgressBar constructor comment.
CMProgressBar(int orient, int min, int max)
          CMProgressBar constructor comment.
 
Method Summary
 void beginCount(int increment, int rate, int maxValue)
          Starts a thread to begin "counting" progress on the progress bar.
 void beginExponentialCount(int increment, int initialRate, int factor, int maxValue)
          Starts a thread to begin "counting" progress on the progress bar.
 void completeCount()
          Completes the progress count (advances the count immediately to its final value) if one is in progress
 void finish()
          Sets the progress bar's value to its maximum (any count in progress is halted)
 void haltCount()
          Stops the progress count (if one is in progress)
 boolean isCounting()
          Tests if a progress count in currently in progress
 void reset()
          Resets the progress bar's value.
 void setValue(int value)
          Sets the progress bar's value.
 
Methods inherited from class javax.swing.JProgressBar
addChangeListener, getAccessibleContext, getChangeListeners, getMaximum, getMinimum, getModel, getOrientation, getPercentComplete, getString, getUI, getUIClassID, getValue, isBorderPainted, isIndeterminate, isStringPainted, removeChangeListener, setBorderPainted, setIndeterminate, setMaximum, setMinimum, setModel, setOrientation, setString, setStringPainted, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMProgressBar

public CMProgressBar()
CMProgressBar constructor comment.


CMProgressBar

public CMProgressBar(int orient)
CMProgressBar constructor comment.

Parameters:
orient - int

CMProgressBar

public CMProgressBar(int min,
                     int max)
CMProgressBar constructor comment.

Parameters:
min - int
max - int

CMProgressBar

public CMProgressBar(int orient,
                     int min,
                     int max)
CMProgressBar constructor comment.

Parameters:
orient - int
min - int
max - int

CMProgressBar

public CMProgressBar(BoundedRangeModel newModel)
CMProgressBar constructor comment.

Parameters:
newModel - javax.swing.BoundedRangeModel
Method Detail

beginCount

public void beginCount(int increment,
                       int rate,
                       int maxValue)
Starts a thread to begin "counting" progress on the progress bar. Any count currently in progress in halted.

Parameters:
increment - This is the amount the progress bar will be advanced by each time
rate - The number of milliseconds to wait between each advance of the progress bar
maxValue - The progress bar will not advance beyond this value

beginExponentialCount

public void beginExponentialCount(int increment,
                                  int initialRate,
                                  int factor,
                                  int maxValue)
Starts a thread to begin "counting" progress on the progress bar. The rate of counting slows expontentially - the closer it gets to the end, the slower it goes. Any count currently in progress in halted.

Parameters:
increment - This is the amount the progress bar will be advanced by each time
initialRate - The number of milliseconds to wait between each advance of the progress bar (at first)
factor - A factor by which the count will be slowed. The bigger the number the slower the count will eventually get. A good default value is 10% of the initial rate.
maxValue - The progress bar will not advance beyond this value

completeCount

public void completeCount()
Completes the progress count (advances the count immediately to its final value) if one is in progress


finish

public void finish()
Sets the progress bar's value to its maximum (any count in progress is halted)


haltCount

public void haltCount()
Stops the progress count (if one is in progress)


isCounting

public boolean isCounting()
Tests if a progress count in currently in progress


reset

public void reset()
Resets the progress bar's value.


setValue

public void setValue(int value)
Sets the progress bar's value. If a counting thread is in progress, that thread is halted first.

Overrides:
setValue in class JProgressBar