dog.gui
Class DProgress

java.lang.Object
  |
  +--java.awt.Component
        |
        +--dog.gui.DComponent
              |
              +--dog.gui.DProgress
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, Referential, java.io.Serializable

public class DProgress
extends DComponent

A progress indicator component.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected  java.text.MessageFormat format
          The message format used to format the text display.
static int HORIZONTAL
          The horizontal orientation.
protected  int maximum
          The maximum value of the progress indicator.
protected  int minimum
          The minimum value of the progress indicator.
protected  int orientation
          The orientation.
protected  int value
          The value of the progress indicator.
static int VERTICAL
          The vertical orientation.
 
Fields inherited from class dog.gui.DComponent
CENTER, CENTER_TILE, changes, EAST, INTEGER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_HORIZONTAL, MAXIMIZE_VERTICAL, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, TILE, tooltip, WEST
 
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
 
Constructor Summary
DProgress()
          Constructs a horizontal progress indicator with a range of 0-100 and a value of 0.
DProgress(int minimum, int maximum, int value, int orientation)
          Constructs a progress indicator with the specified parameters.
 
Method Summary
 int getMaximum()
          Returns the maximum value of this progress indicator.
 int getMinimum()
          Returns the minimum value of this progress indicator.
 java.awt.Dimension getMinimumSize()
          Returns the minimum size for this progress indicator.
 int getOrientation()
          Returns the orientation for this progress indicator.
 int getPercent()
          Returns the percentage represented by this progress indicator.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size for this progress indicator.
 java.lang.String getText()
          Returns the text displayed in the progress indicator if a format has been set.
 int getValue()
          Returns the current value of this progress indicator.
 void paint(java.awt.Graphics g)
          Paints this progress indicator.
 java.lang.String paramString()
          Returns the parameter string for this label.
 void setFormat(java.lang.String format)
          Sets the format for text to be displayed in the progress indicator.
 void setMaximum(int maximum)
          Sets the maximum value for this progress indicator.
 void setMinimum(int minimum)
          Sets the minimum value for this progress indicator.
 void setOrientation(int orientation)
          Sets the orientation for this progress indicator.
 void setParameters(int minimum, int maximum)
          Sets the parameters for this progress indicator.
 void setValue(int value)
          Sets the value of this progress indicator to the specified value.
 void setValues(int value, int minimum, int maximum)
          Sets the values for this progress indicator.
 
Methods inherited from class dog.gui.DComponent
addPropertyChangeListener, alignParamString, drawActiveButtonBorder, drawActiveOptionBorder, drawArrow, drawBackgroundImage, drawBorder, drawButtonBorder, drawCheckbox, drawDarkBorder, drawDefaultButtonBorder, drawDisabledBorder, drawDisabledCheckbox, drawDisabledOption, drawExpander, drawFocusBorder, drawImage, drawLabel, drawOption, drawOptionBorder, drawPressedBorder, drawTick, getDefaultToolkit, getImage, getImage, getImage, getReference, getRootPane, getRows, getTooltip, isPreloadImages, parseColor, parseFont, processCancelAction, processDefaultAction, processEvent, processMouseEvent, processMouseMotionEvent, removePropertyChangeListener, setEnabled, setPreloadImages, setReference, setTooltip, toString
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, 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, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
The horizontal orientation.

VERTICAL

public static final int VERTICAL
The vertical orientation.

value

protected int value
The value of the progress indicator.

maximum

protected int maximum
The maximum value of the progress indicator.

minimum

protected int minimum
The minimum value of the progress indicator.

orientation

protected int orientation
The orientation.

format

protected java.text.MessageFormat format
The message format used to format the text display.
Constructor Detail

DProgress

public DProgress()
Constructs a horizontal progress indicator with a range of 0-100 and a value of 0.

DProgress

public DProgress(int minimum,
                 int maximum,
                 int value,
                 int orientation)
Constructs a progress indicator with the specified parameters.
Method Detail

getOrientation

public int getOrientation()
Returns the orientation for this progress indicator.

setOrientation

public void setOrientation(int orientation)
Sets the orientation for this progress indicator.
Parameters:
orientation - the orientation (HORIZONTAL or VERTICAL) of this progress indicator.

getValue

public int getValue()
Returns the current value of this progress indicator.
See Also:
getMinimum(), getMaximum()

setValue

public void setValue(int value)
Sets the value of this progress indicator to the specified value.
Parameters:
value - the new value of the progress indicator. If this value is below the current minimum or above the current maximum minus the visible amount, it becomes the new one of those values, respectively.
See Also:
getValue()

getMinimum

public int getMinimum()
Returns the minimum value of this progress indicator.
See Also:
getMaximum(), getValue()

setMinimum

public void setMinimum(int minimum)
Sets the minimum value for this progress indicator.
Parameters:
minimum - the minimum value of the progress indicator

getMaximum

public int getMaximum()
Returns the maximum value of this progress indicator.
See Also:
getMinimum(), getValue()

setMaximum

public void setMaximum(int maximum)
Sets the maximum value for this progress indicator.
Parameters:
maximum - the maximum value of the progress indicator

setParameters

public void setParameters(int minimum,
                          int maximum)
Sets the parameters for this progress indicator. This method enforces the following constraints: Values which do not meet these criteria are quietly coerced to the appropriate boundary value.
Parameters:
minimum - is the minimum value of the progress indicator
maximum - is the maximum value of the progress indicator

setValues

public void setValues(int value,
                      int minimum,
                      int maximum)
Sets the values for this progress indicator. This method enforces the following constraints: Values which do not meet these criteria are quietly coerced to the appropriate boundary value.
Parameters:
value - is the position in the current window.
minimum - is the minimum value of the progress indicator
maximum - is the maximum value of the progress indicator

setFormat

public void setFormat(java.lang.String format)
Sets the format for text to be displayed in the progress indicator. The argument provided should be in the form of a standard message format string; the parameters for the format will be:
Parameters:
format - the message format string
See Also:
MessageFormat

getText

public java.lang.String getText()
Returns the text displayed in the progress indicator if a format has been set.

getPercent

public int getPercent()
Returns the percentage represented by this progress indicator.

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size for this progress indicator.
Overrides:
getMinimumSize in class java.awt.Component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size for this progress indicator.
Overrides:
getPreferredSize in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Paints this progress indicator.
Overrides:
paint in class java.awt.Component

paramString

public java.lang.String paramString()
Returns the parameter string for this label.
Overrides:
paramString in class DComponent