All Packages Class Hierarchy This Package Previous Next Index
Class taxman.ProgressBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----taxman.ProgressBar
- public class ProgressBar
- extends Canvas
This is a special canvas that acts as a status bar.
You can set the insets (space on all sides), update
its value and set a max value for it.
-
ProgressBar()
- Simplest constructor.
-
ProgressBar(float, float)
- Lets you supply the intitial value and maximum value.
-
ProgressBar(float, float, boolean)
- Lets you supply the intitial value and maximum value.
-
ProgressBar(float, float, boolean, boolean)
- Lets you supply the intitial value and maximum value.
-
ProgressBar(int, int)
- Lets you supply the intitial value and maximum value.
-
ProgressBar(int, int, boolean)
- Lets you supply the intitial value and maximum value.
-
ProgressBar(int, int, boolean, boolean)
- Lets you supply the intitial value and maximum value.
-
drawFromLeft(Graphics)
- Draws the progress bar from left to right
-
drawValue(Graphics)
- Draws the value of the progress bar (numerically)
-
getFloatValue()
- Gets the current value of the progress bar as a float
-
getInsets()
- Gets the current value of the spacing surrounding the progress bar
-
getIntValue()
- Gets the current value of the progress bar as an int
-
getMaxFloatValue()
- Gets the maximum value of the progress bar as a float
-
getMaxIntValue()
- Gets the maximum value of the progress bar as an int
-
paint(Graphics)
- Paints the progress bar
-
setInsets(Insets)
- Sets the spacing around the status bar
-
setMaxValue(float)
- Gets the current value of the progress bar as an int
-
setMaxValue(int)
- Sets the maximum value for this progress bar
-
setValue(float)
- Sets the value of the progress bar to some number < maximum value
-
setValue(int)
- Sets the value of the progress bar to some number < maximum value
ProgressBar
public ProgressBar()
- Simplest constructor. Uses all defaults
Positive numbers, no numeric input, initial value = 0, max value = 1
ProgressBar
public ProgressBar(float init_val,
float max_val)
- Lets you supply the intitial value and maximum value. (floats)
- Parameters:
- init_val - The initial value of the progress bar
- max_val - The maximum value of the progress bar
ProgressBar
public ProgressBar(int init_val,
int max_val)
- Lets you supply the intitial value and maximum value. (ints)
- Parameters:
- init_val - The initial value of the progress bar
- max_val - The maximum value of the progress bar
ProgressBar
public ProgressBar(float init_val,
float max_val,
boolean AddPercent)
- Lets you supply the intitial value and maximum value. (floats)
- Parameters:
- init_val - The initial value of the progress bar
- max_val - The maximum value of the progress bar
- AddPercent - True if the progress bar should add a percent sign
ProgressBar
public ProgressBar(int init_val,
int max_val,
boolean AddPercent)
- Lets you supply the intitial value and maximum value. (ints)
- Parameters:
- init_val - The initial value of the progress bar
- max_val - The maximum value of the progress bar
- AddPercent - True if the progress bar should add a percent sign
ProgressBar
public ProgressBar(float init_val,
float max_val,
boolean Negative,
boolean ShowNums)
- Lets you supply the intitial value and maximum value. (floats)
It also lets you specify whether or not to use a number value on the bar (i.e. %)
and whether or not to allow negative values
- Parameters:
- init_val - The initial value of the progress bar
- max_val - The maximum value of the progress bar
- Negative - True if negative values are allowed (bar will be centered)
- ShowNums - True if a number should be written into middle of bar.
ProgressBar
public ProgressBar(int init_val,
int max_val,
boolean Negative,
boolean ShowNums)
- Lets you supply the intitial value and maximum value. (ints)
It also lets you specify whether or not to use a number value on the bar (i.e. %)
and whether or not to allow negative values
- Parameters:
- init_val - The initial value of the progress bar
- max_val - The maximum value of the progress bar
- Negative - True if negative values are allowed (bar will be centered)
- ShowNums - True if a number should be written into middle of bar.
setValue
public void setValue(int NewValue)
- Sets the value of the progress bar to some number < maximum value
- Parameters:
- NewValue - The new value for the progress bar
setValue
public void setValue(float NewValue)
- Sets the value of the progress bar to some number < maximum value
- Parameters:
- NewValue - The new value for the progress bar
getFloatValue
public float getFloatValue()
- Gets the current value of the progress bar as a float
- Returns:
- Returns a float version of the progress bar value
getIntValue
public float getIntValue()
- Gets the current value of the progress bar as an int
- Returns:
- Returns an int version of the progress bar value
setMaxValue
public void setMaxValue(int max)
- Sets the maximum value for this progress bar
- Parameters:
- max - The maximum value for this progress bar
setMaxValue
public void setMaxValue(float max)
- Gets the current value of the progress bar as an int
- Returns:
- Returns an int version of the progress bar value
getMaxFloatValue
public float getMaxFloatValue()
- Gets the maximum value of the progress bar as a float
- Returns:
- Returns a float version of the progress bar maximum value
getMaxIntValue
public int getMaxIntValue()
- Gets the maximum value of the progress bar as an int
- Returns:
- Returns an int version of the progress bar maximum value
setInsets
public void setInsets(Insets NewInsets)
- Sets the spacing around the status bar
- Parameters:
- NewInsets - An Insets object indicating the right, top, left bottom spacing
around the status bar.
getInsets
public Insets getInsets()
- Gets the current value of the spacing surrounding the progress bar
- Returns:
- An Insets object indicating the right, top, left bottom spacing
around the status bar.
paint
public void paint(Graphics g)
- Paints the progress bar
- Parameters:
- g - The graphics context on which to draw
- Overrides:
- paint in class Canvas
drawFromLeft
public void drawFromLeft(Graphics g)
- Draws the progress bar from left to right
- Parameters:
- g - The graphics context on which to draw
drawValue
public void drawValue(Graphics g)
- Draws the value of the progress bar (numerically)
All Packages Class Hierarchy This Package Previous Next Index