|
|||||||||
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.NumberChooser
public class NumberChooser
The class NumberChosser
implements a label showing a number.
The number can be changed by an up-down button.
When the user changes the state, an ActionEvent
of type VALUE_CHANGED
is fired.
(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 | |
---|---|
NumberChooser(int x,
int y,
int min,
int max)
|
Method Summary | |
---|---|
int |
getValue()
Returns the currently selected value. |
boolean |
onKeyEvent(KeyEvent e)
Handle key events. |
void |
paint()
Paint this ComboBox . |
void |
setActionListener(ActionListener listener)
Sets an ActionListener for the ComboBox . |
void |
setBounds(int x,
int y,
int width,
int height)
Set the dimensions of this component. |
void |
setFont(Resource font)
Sets the font for this component. |
void |
setValue(int value)
Sets the specified value. |
void |
validate()
Compute this component's preferred size and assign internal values width and height. |
Methods inherited from class jcontrol.ui.vole.Component |
---|
getBounds, getParent, isVisible, onActionEvent, remove, removeFocus, requestFocus, setGraphics, setParent, setVisible, transferFocus |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Constructor Detail |
---|
public NumberChooser(int x, int y, int min, int max)
Method Detail |
---|
public void setFont(Resource font)
setFont
in class Component
font
- The new font.public void setBounds(int x, int y, int width, int height)
setBounds
in class Component
x
- x coordinate of the upper left cornery
- y coordinate of the upper left cornerwidth
- The width of this componentheight
- The height of this component (this parameter is ignored)public void setValue(int value)
v
- the value to setpublic int getValue()
public void paint()
ComboBox
.
paint
in class Component
public void setActionListener(ActionListener listener)
ActionListener
for the ComboBox
. It
will receive ActionEvents
everytime a combo box item is
pressed.
listener
- The ActionListener
to assign to this
ComboBox
.public boolean onKeyEvent(KeyEvent e)
ActionEvent
is fired.
onKeyEvent
in class Component
e
- the KeyEvent
Container
.public void validate()
validate
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |