|
|||||||||
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
This is a graphical slider for JControl. The slider can be moved virtually left or right to simulate analog input.
Field Summary |
Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
Slider(int min,
int max)
Constructs a new slider with minimum and maximum value. |
|
Slider(int min,
int max,
int step)
Constructs a new slider with minimum and maximum value. |
|
Slider(int min,
int max,
int step,
int x,
int y,
int width)
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, setLocation, setParent, setVisible, transferFocus, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
Constructor Detail |
public Slider(int min, int max)
min
- the slider's minimum value (>= 0)max
- the slider's maximum value.public Slider(int min, int max, int step)
min
- the slider's minimum value (>= 0)max
- the slider's maximum value.step
- slider value is incremented by step when KEY_SELECT is avtivatedpublic Slider(int min, int max, int step, int x, int y, int width)
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 int getValue()
public boolean onKeyEvent(KeyEvent event)
onKeyEvent
in class Component
event
- the KeyEvent
Container
.Component.onKeyEvent(KeyEvent)
public void paint()
paint
in class Component
public void setActionListener(ActionListener listener)
ActionEvent.getActionCommand()
method.
listener
- The new ActionListener or null.public void setValue(int value)
value
- The new value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |