    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.tools.widgets.Slider

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

public class Slider
extends Canvas

Slider :

##

pointer

##

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

##

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

##

pointer

     protected Slider. Pointer pointer

##

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.

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.

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.

Slider

     public Slider()

  Constructs an invisible Slider. use initialize to define it.

##

getGoodX

     protected int getGoodX(int x)

getValue

     public long getValue()

  Get the current value pointed by the slider.

  Returns:
    the value.

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.

movePointerTo

     protected void movePointerTo(int x,
                                  int y)

movePointerTo

     protected void movePointerTo(Point p)

paint

     public void paint(Graphics g)

  paint the slider.

  Overrides:
    paint in class Canvas

getGraduationLength

     protected int getGraduationLength()

updateGraduationPosition

     protected void updateGraduationPosition()

paintGraduation

     protected void paintGraduation(Graphics g)

update

     public void update(Graphics g)

  update the slider.

  Overrides:
    update in class Component

setDefaultSize

     protected void setDefaultSize(long min,
                                   long max,
                                   long step)

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

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

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

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

setColor

     public void setColor(Color color)

  Set the slider's color.

  Parameters:
    color - - the slider's color.

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

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

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

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

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

update

     protected void update()

main

     public static void main(String argv[])

    All Packages  Class Hierarchy  This Package  Previous  Next  Index