All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.gui.controls.ProgressSlider
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ejmf.toolkit.gui.controls.ProgressSlider
- public class ProgressSlider
- extends Canvas
- implements ProgressBar
ProgressSlider for StandardControlPanel.
A simple slider, mostly stolen from JSlider code.
This is a bare bones implementation. JSlider can't be used
as is. It will make media choppy dealing with all
the timer update events generated by control panel.
-
ProgressSlider()
- Create a ProgressSlider.
-
addChangeListener(ChangeListener)
- Add a ChangeListener
-
computeThumbRectangle()
- Recompute thumb size in response to a change
in value of the slider.
-
getMaximum()
- Get the largest value progress slider can take on.
-
getMinimum()
- Get the smallest value progress slider can take on.
-
getPreferredSize()
-
-
getThumbRect()
- Return Rectangle which describes location and size of
thumb.
-
getValue()
- Get current value of sprogress bar.
-
paint(Graphics)
- Paint the progress slider.
-
paintThumb(Graphics)
-
Paint the slider thumb.
-
removeChangeListener(ChangeListener)
- Remove a ChangeListener
-
setMaximum(int)
- Set the largest value progress slider can take on.
-
setMinimum(int)
- Set the smallest value progress slider can take on.
-
setValue(int)
- Get current value of sprogress bar.
ProgressSlider
public ProgressSlider()
- Create a ProgressSlider.
paint
public void paint(Graphics g)
- Paint the progress slider.
- Overrides:
- paint in class Canvas
paintThumb
public void paintThumb(Graphics g)
- Paint the slider thumb.
- Parameters:
- g - graphics in which thumb is painted.
getThumbRect
public Rectangle getThumbRect()
- Return Rectangle which describes location and size of
thumb.
- Returns:
- A Rectangle that contains thumb.
computeThumbRectangle
public Rectangle computeThumbRectangle()
- Recompute thumb size in response to a change
in value of the slider.
- Returns:
- A Rectangle.
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Component
getValue
public int getValue()
- Get current value of sprogress bar.
- Returns:
- An integer indicatiing position of
thumb within range of legal slider values.
setValue
public void setValue(int value)
- Get current value of sprogress bar.
- Parameters:
- value - An integer value within range
of legal slider values.
setMaximum
public void setMaximum(int value)
- Set the largest value progress slider can take on.
When slider reaches this value operation which progress
bar is measuring is complete.
- Parameters:
- value - The maximum value slider can take on.
getMaximum
public int getMaximum()
- Get the largest value progress slider can take on.
- Returns:
- The maximum value slider can take on.
setMinimum
public void setMinimum(int value)
- Set the smallest value progress slider can take on.
When slider value reaches this value, the operation
measured by progress bar has not been started.
- Parameters:
- value - The minimum value slider can take on.
getMinimum
public int getMinimum()
- Get the smallest value progress slider can take on.
- Returns:
- The minimum value slider can take on.
addChangeListener
public void addChangeListener(ChangeListener l)
- Add a ChangeListener
- Parameters:
- l - a ChangeListener
removeChangeListener
public void removeChangeListener(ChangeListener l)
- Remove a ChangeListener
- Parameters:
- l - a ChangeListener
All Packages Class Hierarchy This Package Previous Next Index