All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.Slider
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----symantec.itools.awt.Slider
- public class Slider
- extends Canvas
Components based on this class are used to select
one value from a continuous range of values. It has a movable thumb in
front of a gauge with ticks marks on it.
- See Also:
- HorizontalSlider, VerticalSlider
-
curPos
- The current position of the slider thumb.
-
enabled
- (not used).
-
freq
- The current tick mark display frequency.
-
height
- The current component height.
-
max
- The maximum value of the slider range.
-
min
- The minimum value of the slider range.
-
prevPos
- The position of the slider thumb the last time this component was painted.
-
showBorder
- A flag indicating if border should be drawn.
-
style
- The current slider tick mark style.
-
TICK_BOTH
- Defines the slider tick style where the tick marks appear both
to the left and right of the slider thumb.
-
TICK_BOTTOM
- Defines the slider tick style where the tick marks appear below
the slider thumb.
-
TICK_LEFT
- Defines the slider tick style where the tick marks appear to the left of
the slider thumb.
-
TICK_NONE
- Defines the slider tick style where no tick marks are drawn.
-
TICK_RIGHT
- Defines the slider tick style where the tick marks appear to the right of
the slider thumb.
-
TICK_TOP
- Defines the slider tick style where the tick marks appear above
the slider thumb.
-
width
- The current component width.
-
Slider()
- Constructs the Slider.
-
disable()
- Disables this component so that it doesn't respond to user input.
-
doMove(int, boolean)
- This abstract routine updates the thumb position, paints the slider, and
posts a new action event, as needed.
-
enable()
- Enables this component so that it will respond to user input.
-
getMaxValue()
- Returns the current maximum value of the slider.
-
getMinValue()
- Returns the current minimum value of the slider.
-
getShowBorder()
- Returns the current border display flag.
-
getTickFreq()
- Returns the current tick mark display frequency.
-
getTickStyle()
- Returns the current slider tick mark style.
-
getValue()
- Returns the current slider value.
-
preferredSize()
- Returns the recommended dimensions to properly display this component.
-
setMaxValue(int)
- Sets the maximum value of the slider.
-
setMinValue(int)
- Sets the minimum value of the slider.
-
setShowBorder(boolean)
- Sets the border display flag.
-
setTickFreq(int)
- Sets the tick mark display frequency.
-
setValue(int)
- Sets the slider value.
TICK_LEFT
public final static int TICK_LEFT
- Defines the slider tick style where the tick marks appear to the left of
the slider thumb.
TICK_RIGHT
public final static int TICK_RIGHT
- Defines the slider tick style where the tick marks appear to the right of
the slider thumb.
TICK_BOTTOM
public final static int TICK_BOTTOM
- Defines the slider tick style where the tick marks appear below
the slider thumb.
TICK_TOP
public final static int TICK_TOP
- Defines the slider tick style where the tick marks appear above
the slider thumb.
TICK_BOTH
public final static int TICK_BOTH
- Defines the slider tick style where the tick marks appear both
to the left and right of the slider thumb.
TICK_NONE
public final static int TICK_NONE
- Defines the slider tick style where no tick marks are drawn.
enabled
protected boolean enabled
- (not used).
width
protected int width
- The current component width.
height
protected int height
- The current component height.
style
protected int style
- The current slider tick mark style.
freq
protected int freq
- The current tick mark display frequency.
This is the range in value between each tick mark.
min
protected int min
- The minimum value of the slider range.
max
protected int max
- The maximum value of the slider range.
prevPos
protected int prevPos
- The position of the slider thumb the last time this component was painted.
curPos
protected int curPos
- The current position of the slider thumb.
showBorder
protected boolean showBorder
- A flag indicating if border should be drawn.
Slider
protected Slider()
- Constructs the Slider.
getTickStyle
public int getTickStyle()
- Returns the current slider tick mark style.
- Returns:
- one of: TICK_LEFT, TICK_RIGHT, TICK_TOP, TICK_BOTTOM, TICK_BOTH, or TICK_NONE
- See Also:
- TICK_LEFT, TICK_RIGHT, TICK_TOP, TICK_BOTTOM, TICK_BOTH, TICK_NONE
setMinValue
public void setMinValue(int min)
- Sets the minimum value of the slider.
- Parameters:
- min - the new minimum slider value
- See Also:
- getMinValue, setMaxValue
getMinValue
public int getMinValue()
- Returns the current minimum value of the slider.
- See Also:
- setMinValue, getMaxValue
setMaxValue
public void setMaxValue(int max)
- Sets the maximum value of the slider.
- Parameters:
- max - the new maximum slider value
- See Also:
- getMaxValue, setMinValue
getMaxValue
public int getMaxValue()
- Returns the current maximum value of the slider.
- See Also:
- setMaxValue, getMinValue
setTickFreq
public void setTickFreq(int freq)
- Sets the tick mark display frequency.
This is the range in value between each tick mark.
- Parameters:
- freq - the range in value between tick marks
- See Also:
- getTickFreq
getTickFreq
public int getTickFreq()
- Returns the current tick mark display frequency.
This is the range in value between each tick mark.
- Returns:
- the range in value between tick marks
- See Also:
- setTickFreq
setValue
public void setValue(int pos)
- Sets the slider value.
- Parameters:
- pos - the new slider value
- See Also:
- getValue
getValue
public int getValue()
- Returns the current slider value.
- See Also:
- setValue
setShowBorder
public void setShowBorder(boolean f)
- Sets the border display flag.
- Parameters:
- f - true for the border to show
- See Also:
- getShowBorder
getShowBorder
public boolean getShowBorder()
- Returns the current border display flag.
- Returns:
- true if the border is visible
- See Also:
- setShowBorder
enable
public synchronized void enable()
- Enables this component so that it will respond to user input.
This is a standard Java AWT method which gets called to enable
this component. Once enabled this component will respond to user input.
- Overrides:
- enable in class Component
- See Also:
- disable
disable
public synchronized void disable()
- Disables this component so that it doesn't respond to user input.
This is a standard Java AWT method which gets called to disable
this component. Once disabled this component will not respond to user
input.
- Overrides:
- disable in class Component
- See Also:
- enable
preferredSize
public Dimension preferredSize()
- Returns the recommended dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the recommended size of this component.
- Returns:
- the preferred size, in this case the latest reshape() size
- Overrides:
- preferredSize in class Component
- See Also:
- minimumSize
doMove
protected abstract void doMove(int pos,
boolean forcePost)
- This abstract routine updates the thumb position, paints the slider, and
posts a new action event, as needed. If the thumb position has
changed or the forcePost parameter is true the component will be painted
and an action event posted.
- Parameters:
- pos - the new thumb position
- forcePost - true forces a repaint and posting of an action message
even if the thumb position hasn't changed
All Packages Class Hierarchy This Package Previous Next Index