|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.ui.vole.Component jcontrol.ui.vole.Slider
public class Slider
This is a graphical slider for JControl. The slider can be moved virtually left or right to simulate analog input.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary |
---|
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
---|---|
Slider(int x,
int y,
int width,
int min,
int max)
Constructs a slider and sets bounds. |
|
Slider(int x,
int y,
int width,
int min,
int max,
int step)
Constructs a slider and sets bounds. |
Method Summary | |
---|---|
int |
getValue()
Get slider value. |
boolean |
onKeyEvent(KeyEvent event)
Handle KeyEvents. |
void |
paint()
Repaint the Slider. |
void |
setActionListener(ActionListener listener)
Add an ActionListener to the button. |
void |
setValue(int value)
Set the slider value. |
Methods inherited from class jcontrol.ui.vole.Component |
---|
getBounds, getParent, isVisible, onActionEvent, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setParent, setVisible, transferFocus, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Constructor Detail |
---|
public Slider(int x, int y, int width, int min, int max)
x
- the upper left x coordinate.y
- the upper left y coordinate.min
- the slider's minimum value (>= 0)max
- the slider's maximum value.step
- slider value is incremented by step when KEY_SELECT is activatedpublic Slider(int x, int y, int width, int min, int max, int step)
x
- the upper left x coordinate.y
- the upper left y coordinate.min
- the slider's minimum value (>= 0)max
- the slider's maximum value.step
- slider value is incremented by step when KEY_SELECT is activatedMethod Detail |
---|
public void setValue(int value)
value
- The new value.public int getValue()
public void paint()
paint
in class Component
public void setActionListener(ActionListener listener)
ActionEvent.getActionCommand()
method.
listener
- The new ActionListener or null.public boolean onKeyEvent(KeyEvent event)
onKeyEvent
in class Component
event
- the KeyEvent
Container
.Component.onKeyEvent(KeyEvent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |