|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjcontrol.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-2005 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, notifyAll, wait |
| Constructor Detail |
|---|
public NumberChooser(int x,
int y,
int min,
int max)
| Method Detail |
|---|
public int getValue()
public boolean onKeyEvent(KeyEvent e)
ActionEvent
is fired.
onKeyEvent in class Componente - the KeyEvent
Container.public void paint()
ComboBox.
paint in class Componentpublic 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 void setBounds(int x,
int y,
int width,
int height)
setBounds in class Componentx - 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 setFont(Resource font)
setFont in class Componentfont - The new font.public void setValue(int value)
v - the value to setpublic void validate()
validate in class Component
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||