All Packages Class Hierarchy This Package Previous Next Index
Class COM.taligent.widget.ProgressBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----COM.taligent.widget.ProgressBar
- public class ProgressBar
- extends Canvas
- implements Runnable, AdjustmentListener
A standard progress bar that supports multiple styles, colors, and
orientations.
-
BLOCK
- Progress indicated by series of solid blocks.
Deprecated.
-
DEFAULT_BACKGROUND
- Default background color (Color.lightGray).
-
DEFAULT_COLOR
- Default color (Color.blue).
Deprecated.
-
DEFAULT_DIRECTION
- Default movement (RIGHT).
-
DEFAULT_FOREGROUND
- Default foreground color (Color.blue).
-
DEFAULT_MAX
- Default maximum value (100).
-
DEFAULT_MIN
- Default minimum value (0).
-
DEFAULT_ORIENTATION
- Default orientation (HORIZONTAL).
-
DEFAULT_STYLE
- Default style (SOLID).
-
DOWN
- Top to bottom movement.
Deprecated.
-
HORIZONTAL
- Horizontal orientation.
Deprecated.
-
LEFT
- Right to left movement.
Deprecated.
-
RIGHT
- Left to right movement.
Deprecated.
-
SOLID
- Progress indicated by solid bar of color.
Deprecated.
-
STRIPED
- Simple "in progress" indicated by continuous movement of stripes.
Deprecated.
-
UP
- Bottom to top movement.
Deprecated.
-
VERTICAL
- Vertical orientation.
Deprecated.
-
ProgressBar()
- Constructs a standard horizontal, right moving, solid progress bar.
-
ProgressBar(int)
- Constructs a progress bar with the given style and default min
and max values.
-
ProgressBar(int, int)
- Constructs a horizontal, right moving, solid progress bar with
the min and max set to the specified values.
-
add(int)
- Adds a specific amount to the progress bar's value.
-
adjustmentValueChanged(AdjustmentEvent)
- Value changed -- update progress bar.
-
getDelay()
- Gets the current delay between movement of the STRIPED progress bar.
-
getDirection()
- Returns the current direction of this progress bar.
-
getMax()
- Returns the maximum value for this progress bar.
Deprecated.
-
getMaximum()
- Returns the maximum value for this progress bar.
-
getMin()
- Returns the minimum value for this progress bar.
Deprecated.
-
getMinimum()
- Returns the minimum value for this progress bar.
-
getMinimumSize()
- Returns the minimum size of this progress bar.
-
getName()
- Returns this instance name.
-
getOrientation()
- Returns the current orientation of this progress bar.
-
getPercent()
- Returns true if the percent is showing.
-
getPreferredSize()
- Returns the preferred size of this progress bar which is just
minimum size.
-
getStyle()
- Returns the current style of this progress bar.
-
getValue()
- Returns the current value for this progress bar.
-
paint(Graphics)
- Paints the progress bar in the current style.
-
reset()
- Sets the progress bar's value to the minimum value.
-
run()
- Handles the task of continuously drawing the STRIPED progress bar.
-
setBackground(Color)
- Overrides setBackground so that the bar can be redrawn in
the specified background color.
-
setDelay(int)
- Sets the delay between movement of the STRIPED progress bar.
-
setDirection(int)
- Sets the direction in which the progress bar progresses.
Deprecated.
-
setDirection(ProgressBarDirection)
- Sets the direction in which the progress bar progresses.
-
setForeground(Color)
- Overrides setForeground so that the bar can be redrawn in
the specified foreground color.
-
setMax(int)
- Sets the maximum value this progress bar can have.
Deprecated.
-
setMaximum(int)
- Sets the maximum value this progress bar can have.
-
setMin(int)
- Sets the minimum value this progress bar can have.
Deprecated.
-
setMinimum(int)
- Sets the minimum value this progress bar can have.
-
setName(String)
- Sets the name of this instance.
-
setOrientation(int)
- Sets the orientation of the progress bar.
Deprecated.
-
setOrientation(ProgressBarOrientation)
- Sets the orientation of the progress bar.
-
setPercent(boolean)
- Shows the percent shown centered in the progress bar.
-
setStyle(int)
- Sets the style of the progress bar.
Deprecated.
-
setStyle(ProgressBarStyle)
- Sets the style of the progress bar.
-
setValue(int)
- Sets the value for this progress bar.
-
start()
- Starts the progress bar moving.
-
stop()
- Stops the progress bar moving.
-
toString()
- Returns a string representation of this progress bar.
-
update(Graphics)
- Overrides update so that the area is not cleared by default.
HORIZONTAL
public static final int HORIZONTAL
- Note: HORIZONTAL is deprecated.
Use ProgressBarOrientation.HORIZONTAL
- Horizontal orientation.
VERTICAL
public static final int VERTICAL
- Note: VERTICAL is deprecated.
Use.ProgressBarOrientation.VERTICAL
- Vertical orientation.
DEFAULT_ORIENTATION
public static final ProgressBarOrientation DEFAULT_ORIENTATION
- Default orientation (HORIZONTAL).
SOLID
public static final int SOLID
- Note: SOLID is deprecated.
Use ProgressBarStyle.SOLID
- Progress indicated by solid bar of color.
BLOCK
public static final int BLOCK
- Note: BLOCK is deprecated.
Use ProgressBarStyle.BLOCK
- Progress indicated by series of solid blocks.
STRIPED
public static final int STRIPED
- Note: STRIPED is deprecated.
Use ProgressBarStyle.STRIPED
- Simple "in progress" indicated by continuous movement of stripes.
DEFAULT_STYLE
public static final ProgressBarStyle DEFAULT_STYLE
- Default style (SOLID).
RIGHT
public static final int RIGHT
- Note: RIGHT is deprecated.
Use ProgressBarDirection.RIGHT
- Left to right movement. This only applies to HORIZONTAL bars.
LEFT
public static final int LEFT
- Note: LEFT is deprecated.
Use ProgressBarDirection.LEFT
- Right to left movement. This only applies to HORIZONTAL bars.
UP
public static final int UP
- Note: UP is deprecated.
Use.ProgressbarDirection.UP
- Bottom to top movement. This only applies to VERTICAL bars.
DOWN
public static final int DOWN
- Note: DOWN is deprecated.
Use ProgressBarDirection.DOWN
- Top to bottom movement. This only applies to VERTICAL bars.
DEFAULT_DIRECTION
public static final ProgressBarDirection DEFAULT_DIRECTION
- Default movement (RIGHT).
DEFAULT_COLOR
public static final Color DEFAULT_COLOR
- Note: DEFAULT_COLOR is deprecated.
Use DEFAULT_FOREGROUND
- Default color (Color.blue).
DEFAULT_FOREGROUND
public static final Color DEFAULT_FOREGROUND
- Default foreground color (Color.blue).
DEFAULT_BACKGROUND
public static final Color DEFAULT_BACKGROUND
- Default background color (Color.lightGray).
DEFAULT_MIN
public static final int DEFAULT_MIN
- Default minimum value (0).
DEFAULT_MAX
public static final int DEFAULT_MAX
- Default maximum value (100).
ProgressBar
public ProgressBar()
- Constructs a standard horizontal, right moving, solid progress bar.
ProgressBar
public ProgressBar(int style)
- Constructs a progress bar with the given style and default min
and max values.
- Parameters:
- style - The new style.
ProgressBar
public ProgressBar(int min,
int max)
- Constructs a horizontal, right moving, solid progress bar with
the min and max set to the specified values.
- Parameters:
- min - The new minimum value.
- max - The new maximum value.
run
public void run()
- Handles the task of continuously drawing the STRIPED progress bar.
setDelay
public void setDelay(int delay)
- Sets the delay between movement of the STRIPED progress bar.
- Parameters:
- delay - The new delay, in milliseconds.
getDelay
public int getDelay()
- Gets the current delay between movement of the STRIPED progress bar.
setBackground
public void setBackground(Color color)
- Overrides setBackground so that the bar can be redrawn in
the specified background color.
- Parameters:
- color - The new background color.
- Overrides:
- setBackground in class Component
setForeground
public void setForeground(Color color)
- Overrides setForeground so that the bar can be redrawn in
the specified foreground color.
- Parameters:
- color - The new foreground color.
- Overrides:
- setForeground in class Component
setOrientation
public void setOrientation(int orientation)
- Note: setOrientation() is deprecated.
Use setOrientation(ProgressBarOrientation).
- Sets the orientation of the progress bar.
setOrientation
public void setOrientation(ProgressBarOrientation orientation)
- Sets the orientation of the progress bar.
- Parameters:
- orientation - The new orientation.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getOrientation, HORIZONTAL, VERTICAL
getOrientation
public ProgressBarOrientation getOrientation()
- Returns the current orientation of this progress bar.
- See Also:
- setOrientation, HORIZONTAL, VERTICAL
setStyle
public void setStyle(int style)
- Note: setStyle() is deprecated.
Use setStyle(ProgressBarStyle).
- Sets the style of the progress bar.
setStyle
public void setStyle(ProgressBarStyle style)
- Sets the style of the progress bar.
- Parameters:
- style - The new style.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getStyle, SOLID, BLOCK, STRIPED
getStyle
public ProgressBarStyle getStyle()
- Returns the current style of this progress bar.
- See Also:
- setStyle, SOLID, BLOCK, STRIPED
setDirection
public void setDirection(int direction)
- Note: setDirection() is deprecated.
Use setDirection(ProgressBarDirection).
- Sets the direction in which the progress bar progresses.
setDirection
public void setDirection(ProgressBarDirection direction)
- Sets the direction in which the progress bar progresses. HORIZONTAL
progress bars can move RIGHT or LEFT while VERTICAL bars can move
UP or DOWN.
- Parameters:
- direction - The new direction.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getDirection, RIGHT, LEFT, UP, DOWN
getDirection
public ProgressBarDirection getDirection()
- Returns the current direction of this progress bar.
- See Also:
- setDirection, RIGHT, LEFT, UP, DOWN
setPercent
public void setPercent(boolean show)
- Shows the percent shown centered in the progress bar.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getPercent
getPercent
public boolean getPercent()
- Returns true if the percent is showing.
- See Also:
- setPercent
add
public synchronized void add(int amount)
- Adds a specific amount to the progress bar's value.
- Parameters:
- amount - The amount to add.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- setValue, getValue
setMin
public void setMin(int min)
- Note: setMin() is deprecated.
Use setMinimum()
- Sets the minimum value this progress bar can have.
setMinimum
public void setMinimum(int min)
- Sets the minimum value this progress bar can have.
- Parameters:
- min - The new minimum value.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getMinimum, setMaximum
getMin
public int getMin()
- Note: getMin() is deprecated.
Use getMinimum()
- Returns the minimum value for this progress bar.
getMinimum
public int getMinimum()
- Returns the minimum value for this progress bar.
- See Also:
- setMinimum
setMax
public void setMax(int max)
- Note: setMax() is deprecated.
Use setMaximum()
- Sets the maximum value this progress bar can have.
setMaximum
public void setMaximum(int max)
- Sets the maximum value this progress bar can have.
- Parameters:
- max - The new maximum value.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getMaximum, setMinimum
getMax
public int getMax()
- Note: getMax() is deprecated.
Use getMaximum()
- Returns the maximum value for this progress bar.
getMaximum
public int getMaximum()
- Returns the maximum value for this progress bar.
- See Also:
- setMaximum
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent evt)
- Value changed -- update progress bar.
setValue
public void setValue(int value)
- Sets the value for this progress bar. The value cannot be set below
the minimum value or higher than the maximum value.
- Parameters:
- value - The new value.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- getValue, add, reset
getValue
public int getValue()
- Returns the current value for this progress bar.
- See Also:
- setValue
reset
public void reset()
- Sets the progress bar's value to the minimum value.
- Returns:
- Returns this so that multiple method calls can be chained
together.
- See Also:
- setValue, setMin, getMin
start
public void start()
- Starts the progress bar moving. This method only applies to
the STRIPED style.
stop
public void stop()
- Stops the progress bar moving. This method only applies to
the STRIPED style.
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of this progress bar which is just
minimum size.
- Overrides:
- getPreferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size of this progress bar.
- Overrides:
- getMinimumSize in class Component
update
public void update(Graphics g)
- Overrides update so that the area is not cleared by default.
- Parameters:
- g - The graphics context.
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Paints the progress bar in the current style. This method
should not be called directly.
- Parameters:
- g - The graphics context.
- Overrides:
- paint in class Canvas
setName
public void setName(String name)
- Sets the name of this instance.
- Parameters:
- name - The new name.
- Overrides:
- setName in class Component
getName
public String getName()
- Returns this instance name.
- Overrides:
- getName in class Component
toString
public String toString()
- Returns a string representation of this progress bar.
- Overrides:
- toString in class Component
All Packages Class Hierarchy This Package Previous Next Index