All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.VerticalSlider

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----symantec.itools.awt.Slider
                           |
                           +----symantec.itools.awt.VerticalSlider

public class VerticalSlider
extends Slider
This component is 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

Variable Index

 o TICK_WIDTH
Length of the gauge ticks in pixels.

Constructor Index

 o VerticalSlider()
Constructs a default VerticalSlider.

Method Index

 o doMove(int, boolean)
This routine updates the thumb position, paints the VerticalSlider, and posts a new action event as needed.
 o getTickStyle()
Returns the current slider tick mark style.
 o mouseDown(Event, int, int)
Processes MOUSE_DOWN events.
 o mouseDrag(Event, int, int)
Processes MOUSE_DRAG events.
 o paint(Graphics)
Paints this component using the given graphics context.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o setTickStyle(int)
Sets the current slider tick mark style.
 o validate()
Ensures that this component is laid out properly, as needed.

Variables

 o TICK_WIDTH
  protected final static int TICK_WIDTH
Length of the gauge ticks in pixels.

Constructors

 o VerticalSlider
  public VerticalSlider()
Constructs a default VerticalSlider. The ticks are drawn on both sides of the gauge with a frequency of 1. The minimum value is 1. The maximum value is 10. The border is shown.

Methods

 o setTickStyle
  public void setTickStyle(int style)
Sets the current slider tick mark style.

See Also:
getTickStyle, TICK_LEFT, TICK_RIGHT, TICK_BOTH
 o getTickStyle
  public int getTickStyle()
Returns the current slider tick mark style.

Overrides:
getTickStyle in class Slider
See Also:
setTickStyle, TICK_LEFT, TICK_RIGHT, TICK_BOTH
 o mouseDown
  public boolean mouseDown(Event e,
                           int x,
                           int y)
Processes MOUSE_DOWN events. This is a standard Java AWT method which gets called by the AWT method handleEvent() in response to receiving a MOUSE_DOWN event. These events occur when the mouse button is pressed while inside this component.

Parameters:
e - the event
x - the component-relative horizontal coordinate of the mouse
y - the component-relative vertical coordinate of the mouse
Returns:
always true since the event was handled
Overrides:
mouseDown in class Component
See Also:
mouseUp, handleEvent
 o mouseDrag
  public boolean mouseDrag(Event e,
                           int x,
                           int y)
Processes MOUSE_DRAG events. This is a standard Java AWT method which gets called by the AWT method handleEvent() in response to receiving a MOUSE_DRAG event. These events occur when the mouse is moved around inside this component while the button is pressed.

Parameters:
e - the event
x - the component-relative horizontal coordinate of the mouse
y - the component-relative vertical coordinate of the mouse
Returns:
always true since the event was handled
Overrides:
mouseDrag in class Component
See Also:
mouseMove, handleEvent
 o reshape
  public void reshape(int x,
                      int y,
                      int w,
                      int h)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component
 o doMove
  protected void doMove(int pos,
                        boolean forcePost)
This routine updates the thumb position, paints the VerticalSlider, 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 painting the slider and posting an action event even if the thumb position hasn't changed
Overrides:
doMove in class Slider
 o paint
  public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Canvas
See Also:
repaint, update
 o validate
  public void validate()
Ensures that this component is laid out properly, as needed. This is a standard Java AWT method which gets called by the AWT to make sure this component and its subcomponents have a valid layout. If this component was made invalid with a call to invalidate(), then it is laid out again.

Overrides:
validate in class Component
See Also:
invalidate

All Packages  Class Hierarchy  This Package  Previous  Next  Index