Class COM.bensoft.widgets.ProgressMeter
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.bensoft.widgets.ProgressMeter

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----COM.bensoft.widgets.ProgressMeter

public class ProgressMeter
extends Canvas
ProgressMeter implements a simple, but effective, progress meter (or "thermometer").

Author:
Michael Benson

Constructor Index

 o ProgressMeter()
ProgressMeter constructor.

Method Index

 o getMax()
Returns the current upper limit.
 o getMin()
Returns the current lower limit.
 o getValue()
Returns the current value of the progress meter.
 o increment(int)
Increments the current value of the progress meter and redraws it.
 o paint(Graphics)
Overrides the action method in Canvas to redraw the progress meter.
 o setLimits(int, int)
Sets the upper and lower limits of the progress meter.
 o setValue(int)
Sets the current value of the progress meter and redraws it.

Constructors

 o ProgressMeter
  public ProgressMeter()
ProgressMeter constructor.

Methods

 o setLimits
  public void setLimits(int min,
                        int max)
Sets the upper and lower limits of the progress meter.
Parameters:
min - the lower limit.
max - the upper limit.
 o setValue
  public void setValue(int val)
Sets the current value of the progress meter and redraws it. Insures the value is within the limits.
Parameters:
val - the current value.
 o increment
  public void increment(int i)
Increments the current value of the progress meter and redraws it. Insures the value is within the limits.
Parameters:
i - the amount by which to increment.
 o getMin
  public int getMin()
Returns the current lower limit.
Returns:
the lower limit.
 o getMax
  public int getMax()
Returns the current upper limit.
Returns:
the upper limit.
 o getValue
  public int getValue()
Returns the current value of the progress meter.
Returns:
the current value.
 o paint
  public void paint(Graphics g)
Overrides the action method in Canvas to redraw the progress meter.
Parameters:
g - the graphics context.
Overrides:
paint in class Canvas
See Also:
paint

All Packages  Class Hierarchy  This Package  Previous  Next  Index