## org.w3c.tools.widgets
Class Slider

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

public class Slider
extends java.awt.Canvas

Slider :

See Also:
  Serialized Form

Field Summary
`protected org.w3c.tools.widgets.Slider.Pointer` `pointer`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Constructor Summary
`Slider()` Constructs an invisible Slider.
`Slider(int minPixelStep, boolean border)` Constructs an invisible Slider.

Method Summary
`protected int` `getGoodX(int x)`
`protected int` `getGraduationLength()`
`java.awt.Dimension` `getMinimumSize()` Gets the mininimum size of this component.
`double` `getValue()` Get the current value pointed by the slider.
`void` `initialize(double min, double max, double step)` Initialize the slider's bounds and Step
`void` `initialize(double min, double max, double step, boolean border)`
`void` `initialize(long min, long max, long step)`
`void` `initialize(long min, long max, long step, boolean border)`
`static void` `main(java.lang.String[] argv)`
`protected void` `movePointerTo(int x, int y)`
`protected void` `movePointerTo(java.awt.Point p)`
`void` `paint(java.awt.Graphics g)` paint the slider.
`protected void` `paintGraduation(java.awt.Graphics g)`
`void` `setBounds(double min, double max)` Set the bounds of the slider.
`void` `setColor(java.awt.Color color)` Set the slider's color.
`protected void` `setDefaultSize(double min, double max, double step)`
`void` `setMax(double max)` Set the maximum bound of the slider.
`void` `setMin(double min)` Set the minimum bound of the slider.
`void` `setStep(double step)` Set the step of the slider.
`void` `setValue(double value)` Set the value pointed by the slider.
`void` `setValue(long value)`
`protected void` `update()`
`void` `update(java.awt.Graphics g)` update the slider.
`protected void` `updateCurrentGraduation()`
`protected void` `updateGraduationPosition()`
`protected void` `updatePointerPosition(double value)`
`void` `updateSize(java.awt.Dimension d)` Resizes this component so that it has width "width" and height "height".
`void` `updateSize(int width, int height)` Resizes this component so that it has width "width" and height "height".

Methods inherited from class java.awt.Canvas
`addNotify`

Methods inherited from class java.awt.Component

`action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### pointer

    protected org.w3c.tools.widgets.Slider.Pointer pointer

Constructor Detail

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

Method Detail

### updateCurrentGraduation

    protected void updateCurrentGraduation()

### getGoodX

    protected int getGoodX(int x)

### getValue

    public double getValue()

  Get the current value pointed by the slider.
  Returns:
    the value.

### updatePointerPosition

    protected void updatePointerPosition(double value)

### setValue

    public void setValue(double value)

  Set the value pointed by the slider. if the value is too high, resize the slider.
  Parameters:
    `The` - value to point.

### setValue

    public void setValue(long value)

### movePointerTo

    protected void movePointerTo(int x,
                                 int y)

### movePointerTo

    protected void movePointerTo(java.awt.Point p)

### paint

    public void paint(java.awt.Graphics g)

  paint the slider.
  Overrides:
    paint in class java.awt.Canvas

### getGraduationLength

    protected int getGraduationLength()

### updateGraduationPosition

    protected void updateGraduationPosition()

### paintGraduation

    protected void paintGraduation(java.awt.Graphics g)

### update

    public void update(java.awt.Graphics g)

  update the slider.
  Overrides:
    update in class java.awt.Component

### setDefaultSize

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

### updateSize

    public void updateSize(java.awt.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.

### updateSize

    public void updateSize(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

### getMinimumSize

    public java.awt.Dimension getMinimumSize()

  Gets the mininimum size of this component.
  Overrides:
    getMinimumSize in class java.awt.Component
  Returns:
    A dimension object indicating this slider's minimum size.

### setColor

    public void setColor(java.awt.Color color)

  Set the slider's color.
  Parameters:
    `color` - - the slider's color.

### setMin

    public void setMin(double 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(double)`, `setBounds(double, double)`, `setStep(double)`, `initialize(double, double, double)`

### setMax

    public void setMax(double 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(double)`, `setBounds(double, double)`, `setStep(double)`, `initialize(double, double, double)`

### setBounds

    public void setBounds(double min,
                          double max)

  Set the bounds of the slider.
  Parameters:
    `min` - - the min bound
    `max` - - the max bound
  See Also:
    `setMin(double)`, `setMax(double)`, `setStep(double)`, `initialize(double, double, double)`

### setStep

    public void setStep(double 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(double)`, `setMax(double)`, `setBounds(double, double)`, `initialize(double, double, double)`

### initialize

    public void initialize(double min,
                           double max,
                           double 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(double)`, `setMax(double)`, `setBounds(double, double)`, `initialize(double, double, double)`

### initialize

    public void initialize(double min,
                           double max,
                           double step,
                           boolean border)

### initialize

    public void initialize(long min,
                           long max,
                           long step)

### initialize

    public void initialize(long min,
                           long max,
                           long step,
                           boolean border)

### update

    protected void update()

### main

    public static void main(java.lang.String[] argv)