|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.ui.wombat.Component jcontrol.ui.wombat.AbstractFocusComponent jcontrol.ui.wombat.NumberChooser
public class NumberChooser
The class NumberChosser
implements a label showing a
number. The number can be changed via the up-down buttons on the
keyboard or by using the touch screen.
When the user changes the state, an ActionEvent
of type ActionEvent.VALUE_CHANGED
is fired.
(c) Copyright 2005-2007 DOMOLOGIC GmbH
Field Summary |
---|
Fields inherited from class jcontrol.ui.wombat.AbstractFocusComponent |
---|
BORDER_WIDTH, listener |
Fields inherited from interface jcontrol.ui.wombat.IFocusable |
---|
TRANSFER_FOCUS_BACKWARD, TRANSFER_FOCUS_FORWARD |
Fields inherited from interface jcontrol.ui.wombat.event.TouchListener |
---|
RESULT_ACCEPTED, RESULT_EXECUTED, RESULT_NONE |
Constructor Summary | |
---|---|
NumberChooser(int x,
int y,
int min,
int max)
Creates a new number chooser. |
Method Summary | |
---|---|
int |
getValue()
Returns the current value. |
KeyEvent |
onKeyEvent(KeyEvent e)
Handle key events. |
int |
onTouchEvent(TouchEvent e)
Handle TouchEvent. |
void |
paint(XGraphics g)
Paint this number chooser. |
boolean |
setValue(int value)
Sets the specified value. |
Methods inherited from class jcontrol.ui.wombat.AbstractFocusComponent |
---|
clearCorners, drawBevelRect, drawButton, drawDottedRect, drawFocusRect, getActionListener, onActionEvent, requestFocus, setActionListener, setEnabled, setVisible |
Methods inherited from class jcontrol.ui.wombat.Component |
---|
drawDisabledImage, getFrame, isEnabled, isVisible, isVisibleInternal, redrawInternalAndParent, repaint, repaintAll, safeExec, setBackgroundColor, setBackgroundColorInternal, setBounds, setDirty, setFont, setForegroundColor, setForegroundColorInternal, setParametersInternal, setRedraw, setTransparentColor, unsafeExec, update |
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)
x
- the x positiony
- the y positionmin
- the minimum value the number chooser should be able to showmax
- the maximum value the number chooser should be able to showMethod Detail |
---|
public boolean setValue(int value)
value
- the value to set
public int getValue()
public void paint(XGraphics g)
paint
in class Component
g
- the application's graphics object.public KeyEvent onKeyEvent(KeyEvent e)
ActionEvent
is fired.
onKeyEvent
in interface KeyListener
onKeyEvent
in class AbstractFocusComponent
e
- the event that contains information about the key.
null
if the KeyEvent has been consumed by the KeyListener,public int onTouchEvent(TouchEvent e)
onTouchEvent
in interface TouchListener
onTouchEvent
in class AbstractFocusComponent
e
- The touch event.
RESULT_ACCEPTED
if the TouchEvent has been consumed by the TouchListener,RESULT_EXECUTED
if the TouchEvent has been consumed by the TouchListener and some important action has been performed, e.g. an action event has been invoked,RESULT_NONE
if the TouchEvent should be passed on to the next TouchListener.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |