All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.tools.widgets.Slider

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----w3c.tools.widgets.Slider

public class Slider
extends Canvas
Slider :


Variable Index

 o pointer

Constructor Index

 o Slider()
Constructs an invisible Slider.
 o Slider(int, boolean)
Constructs an invisible Slider.
 o Slider(long, long, long, int, boolean)
Constructs a new Slider.
 o Slider(long, long, long, int, boolean, Color)
Constructs a new Slider.

Method Index

 o getGoodX(int)
 o getGraduationLength()
 o getMinimumSize()
Gets the mininimum size of this component.
 o getPreferredSize()
Gets the preferred size of this slider.
 o getValue()
Get the current value pointed by the slider.
 o initialize(long, long, long)
Initialize the slider's bounds and Step
 o main(String[])
 o movePointerTo(int, int)
 o movePointerTo(Point)
 o paint(Graphics)
paint the slider.
 o paintGraduation(Graphics)
 o setBounds(long, long)
Set the bounds of the slider.
 o setColor(Color)
Set the slider's color.
 o setDefaultSize(long, long, long)
 o setMax(long)
Set the maximum bound of the slider.
 o setMin(long)
Set the minimum bound of the slider.
 o setSize(Dimension)
Resizes this component so that it has width "width" and height "height".
 o setSize(int, int)
Resizes this component so that it has width "width" and height "height".
 o setStep(long)
Set the step of the slider.
 o setValue(long)
Set the value pointed by the slider.
 o update()
 o update(Graphics)
update the slider.
 o updateGraduationPosition()

Variables

 o pointer
 protected Slider. Pointer pointer

Constructors

 o Slider
 public Slider(long min,
               long max,
               long step,
               int minPixelStep,
               boolean border,
               Color color)
Constructs a new Slider.

Parameters:
min - - the min bound
max - - the max bound
step - - the step between two position
minPixelStep - - the min step (in pixels) between two positions.
border - - if true draw a border arround the slider.
color - - the slider's color.
 o Slider
 public Slider(long min,
               long max,
               long step,
               int minPixelStep,
               boolean border)
Constructs a new Slider.

Parameters:
min - - the min bound
max - - the max bound
step - - the step between two position
minPixelStep - - the min step (in pixels) between two positions.
border - - if true draw a border arround the slider.
 o Slider
 public Slider(int minPixelStep,
               boolean border)
Constructs an invisible Slider. use initialize to define it.

Parameters:
minPixelStep - - the min step (in pixels) between two positions.
border - - if true draw a border arround the slider.
 o Slider
 public Slider()
Constructs an invisible Slider. use initialize to define it.

Methods

 o getGoodX
 protected int getGoodX(int x)
 o getValue
 public long getValue()
Get the current value pointed by the slider.

Returns:
the value.
 o setValue
 public void setValue(long value)
Set the value pointed by the slider. if the value is too high, resize the slider.

Parameters:
The - value to point.
 o movePointerTo
 protected void movePointerTo(int x,
                              int y)
 o movePointerTo
 protected void movePointerTo(Point p)
 o paint
 public void paint(Graphics g)
paint the slider.

Overrides:
paint in class Canvas
 o getGraduationLength
 protected int getGraduationLength()
 o updateGraduationPosition
 protected void updateGraduationPosition()
 o paintGraduation
 protected void paintGraduation(Graphics g)
 o update
 public void update(Graphics g)
update the slider.

Overrides:
update in class Component
 o setDefaultSize
 protected void setDefaultSize(long min,
                               long max,
                               long step)
 o setSize
 public void setSize(Dimension d)
Resizes this component so that it has width "width" and height "height".

Parameters:
d - - The dimension specifying the new size of this slider.
Overrides:
setSize in class Component
 o setSize
 public void setSize(int width,
                     int height)
Resizes this component so that it has width "width" and height "height".

Parameters:
width - - The new width of this slider
height - - The new height of this slider
Overrides:
setSize in class Component
 o getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred size of this slider.

Returns:
A dimension object indicating this slider's preferred size.
Overrides:
getPreferredSize in class Component
See Also:
getMinimumSize
 o getMinimumSize
 public Dimension getMinimumSize()
Gets the mininimum size of this component.

Returns:
A dimension object indicating this slider's minimum size.
Overrides:
getMinimumSize in class Component
See Also:
getPreferredSize
 o setColor
 public void setColor(Color color)
Set the slider's color.

Parameters:
color - - the slider's color.
 o setMin
 public void setMin(long min)
Set the minimum bound of the slider. Use initialize or SetBounds if you want to set more than one value.

Parameters:
min - - the min bound
See Also:
setMax, setBounds, setStep, initialize
 o setMax
 public void setMax(long max)
Set the maximum bound of the slider. Use initialize or SetBounds if you want to set more than one value.

Parameters:
max - - the max bound
See Also:
setMin, setBounds, setStep, initialize
 o setBounds
 public void setBounds(long min,
                       long max)
Set the bounds of the slider.

Parameters:
min - - the min bound
max - - the max bound
See Also:
setMin, setMax, setStep, initialize
 o setStep
 public void setStep(long step)
Set the step of the slider. Use initialize or SetBounds if you want to set more than one value.

Parameters:
step - - the step between two position
See Also:
setMin, setMax, setBounds, initialize
 o initialize
 public void initialize(long min,
                        long max,
                        long step)
Initialize the slider's bounds and Step

Parameters:
min - - the min bound
max - - the max bound
step - - the step between two position
See Also:
setMin, setMax, setBounds, initialize
 o update
 protected void update()
 o main
 public static void main(String argv[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index