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

Variable Index

 o curPos
The current position of the slider thumb.
 o enabled
(not used).
 o freq
The current tick mark display frequency.
 o height
The current component height.
 o max
The maximum value of the slider range.
 o min
The minimum value of the slider range.
 o prevPos
The position of the slider thumb the last time this component was painted.
 o showBorder
A flag indicating if border should be drawn.
 o style
The current slider tick mark style.
 o TICK_BOTH
Defines the slider tick style where the tick marks appear both to the left and right of the slider thumb.
 o TICK_BOTTOM
Defines the slider tick style where the tick marks appear below the slider thumb.
 o TICK_LEFT
Defines the slider tick style where the tick marks appear to the left of the slider thumb.
 o TICK_NONE
Defines the slider tick style where no tick marks are drawn.
 o TICK_RIGHT
Defines the slider tick style where the tick marks appear to the right of the slider thumb.
 o TICK_TOP
Defines the slider tick style where the tick marks appear above the slider thumb.
 o width
The current component width.

Constructor Index

 o Slider()
Constructs the Slider.

Method Index

 o disable()
Disables this component so that it doesn't respond to user input.
 o doMove(int, boolean)
This abstract routine updates the thumb position, paints the slider, and posts a new action event, as needed.
 o enable()
Enables this component so that it will respond to user input.
 o getMaxValue()
Returns the current maximum value of the slider.
 o getMinValue()
Returns the current minimum value of the slider.
 o getShowBorder()
Returns the current border display flag.
 o getTickFreq()
Returns the current tick mark display frequency.
 o getTickStyle()
Returns the current slider tick mark style.
 o getValue()
Returns the current slider value.
 o preferredSize()
Returns the recommended dimensions to properly display this component.
 o setMaxValue(int)
Sets the maximum value of the slider.
 o setMinValue(int)
Sets the minimum value of the slider.
 o setShowBorder(boolean)
Sets the border display flag.
 o setTickFreq(int)
Sets the tick mark display frequency.
 o setValue(int)
Sets the slider value.

Variables

 o 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.

 o 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.

 o TICK_BOTTOM
  public final static int TICK_BOTTOM
Defines the slider tick style where the tick marks appear below the slider thumb.

 o TICK_TOP
  public final static int TICK_TOP
Defines the slider tick style where the tick marks appear above the slider thumb.

 o 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.

 o TICK_NONE
  public final static int TICK_NONE
Defines the slider tick style where no tick marks are drawn.

 o enabled
  protected boolean enabled
(not used).

 o width
  protected int width
The current component width.

 o height
  protected int height
The current component height.

 o style
  protected int style
The current slider tick mark style.

 o freq
  protected int freq
The current tick mark display frequency. This is the range in value between each tick mark.

 o min
  protected int min
The minimum value of the slider range.

 o max
  protected int max
The maximum value of the slider range.

 o prevPos
  protected int prevPos
The position of the slider thumb the last time this component was painted.

 o curPos
  protected int curPos
The current position of the slider thumb.

 o showBorder
  protected boolean showBorder
A flag indicating if border should be drawn.

Constructors

 o Slider
  protected Slider()
Constructs the Slider.

Methods

 o 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
 o setMinValue
  public void setMinValue(int min)
Sets the minimum value of the slider.

Parameters:
min - the new minimum slider value
See Also:
getMinValue, setMaxValue
 o getMinValue
  public int getMinValue()
Returns the current minimum value of the slider.

See Also:
setMinValue, getMaxValue
 o setMaxValue
  public void setMaxValue(int max)
Sets the maximum value of the slider.

Parameters:
max - the new maximum slider value
See Also:
getMaxValue, setMinValue
 o getMaxValue
  public int getMaxValue()
Returns the current maximum value of the slider.

See Also:
setMaxValue, getMinValue
 o 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
 o 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
 o setValue
  public void setValue(int pos)
Sets the slider value.

Parameters:
pos - the new slider value
See Also:
getValue
 o getValue
  public int getValue()
Returns the current slider value.

See Also:
setValue
 o setShowBorder
  public void setShowBorder(boolean f)
Sets the border display flag.

Parameters:
f - true for the border to show
See Also:
getShowBorder
 o getShowBorder
  public boolean getShowBorder()
Returns the current border display flag.

Returns:
true if the border is visible
See Also:
setShowBorder
 o 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
 o 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
 o 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
 o 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