All Packages Class Hierarchy This Package Previous Next Index
Class com.trumphurst.controls.ProgressBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----com.trumphurst.controls.ProgressBar
- public class ProgressBar
- extends Canvas
A simple progress bar to indicate how long a lengthy task has run.
-
ProgressBar(int)
- Constructor (min = 0).
-
ProgressBar(int, int)
- Constructor.
-
getCurrent()
- Return the current bar position.
-
getMaximum()
- Return the maximum value.
-
getMinimum()
- Return the minimum value.
-
getPreferredSize()
-
Standard preferred size routine.
-
paint(Graphics)
- Standard paint routine.
-
setCurrent(int)
- Move the bar position.
-
setMaximum(int)
- Reset the maximum values (min = 0).
-
setMinimum(int)
- Reset the minimum value.
-
update(Graphics)
- Standard update routine.
ProgressBar
public ProgressBar(int min,
int max)
- Constructor.
- Parameters:
- min - the minimum value expected.
- max - the maximum value expected.
ProgressBar
public ProgressBar(int max)
- Constructor (min = 0).
- Parameters:
- max - the maximum value expected.
setCurrent
public void setCurrent(int current)
- Move the bar position.
- Parameters:
- current - (between min and max).
getCurrent
public int getCurrent()
- Return the current bar position.
setMinimum
public void setMinimum(int min)
- Reset the minimum value.
- Parameters:
- min - the minimum value.
getMinimum
public int getMinimum()
- Return the minimum value.
setMaximum
public void setMaximum(int max)
- Reset the maximum values (min = 0).
- Parameters:
- max - the maximum value.
getMaximum
public int getMaximum()
- Return the maximum value.
update
public void update(Graphics g)
- Standard update routine.
We optimise to prevent background being cleared.
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Standard paint routine.
- Overrides:
- paint in class Canvas
getPreferredSize
public Dimension getPreferredSize()
- Standard preferred size routine.
Actually returns the current size, or 100 x 10 if there isn't one.
- Overrides:
- getPreferredSize in class Component
All Packages Class Hierarchy This Package Previous Next Index