gov.noaa.pmel.swing.beans
Class SliderHandle

java.lang.Object
  extended by gov.noaa.pmel.swing.beans.SliderHandle
All Implemented Interfaces:
java.io.Serializable

public class SliderHandle
extends java.lang.Object
implements java.io.Serializable

Description of Class SliderHandle

Version:
$Revision$, $Date$
Author:
Donald Denbo
See Also:
Serialized Form

Field Summary
static int LEFT
           
static int RIGHT
           
static int SINGLE
           
 
Constructor Summary
SliderHandle()
          Default constructor
SliderHandle(int size, java.awt.Color color)
           
SliderHandle(int size, java.awt.Color color, int style)
          SliderHandle constructor.
 
Method Summary
 void draw(java.awt.Graphics g, int posx, int posy)
           
 java.awt.Color getColor()
          Get the color of the handle
 int getPosition()
          Get the current handle position
 int getSize()
          Get the size of the handle in pixels;
 int getStyle()
           
 void setColor(java.awt.Color clr)
          Set the handle color
 void setSize(int sz)
          Set the size of the handle (in pixels).
 void setStyle(int st)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFT

public static int LEFT

RIGHT

public static int RIGHT

SINGLE

public static int SINGLE
Constructor Detail

SliderHandle

public SliderHandle()
Default constructor


SliderHandle

public SliderHandle(int size,
                    java.awt.Color color)

SliderHandle

public SliderHandle(int size,
                    java.awt.Color color,
                    int style)
SliderHandle constructor.

Parameters:
xpos - horizontal position of handle
ypos - vertical position of handle
size - size of handle in pixels
color - handle color
Method Detail

getSize

public int getSize()
Get the size of the handle in pixels;

Returns:
handle size

setSize

public void setSize(int sz)
Set the size of the handle (in pixels).

Parameters:
sz - handle size in pixels

setStyle

public void setStyle(int st)

getStyle

public int getStyle()

getColor

public java.awt.Color getColor()
Get the color of the handle

Returns:
the handle color

setColor

public void setColor(java.awt.Color clr)
Set the handle color

Parameters:
clr - handle color

getPosition

public int getPosition()
Get the current handle position

Returns:
current handle position

draw

public void draw(java.awt.Graphics g,
                 int posx,
                 int posy)