jcontrol.ui.wombat
Class TypeWriter
java.lang.Object
jcontrol.ui.wombat.Component
jcontrol.ui.wombat.AbstractFocusComponent
jcontrol.ui.wombat.TypeWriter
- All Implemented Interfaces:
- EventListener, ActionProducer, KeyListener, TouchListener, IFocusable
public class TypeWriter
- extends AbstractFocusComponent
Virtual keyboard using one small QWERTY area fitting on the screen.
(C) DOMOLOGIC Home Automation GmbH 2005 - 2007
Fields inherited from class jcontrol.ui.wombat.Component |
backgroundColor, COLOR_COMPONENT_BACKGROUND, COLOR_COMPONENT_BACKGROUND_HIGHLIGHTED, COLOR_COMPONENT_DARK_SHADOW, COLOR_COMPONENT_FOREGROUND, COLOR_COMPONENT_FOREGROUND_INACTIVE, COLOR_COMPONENT_HIGHLIGHT_SHADOW, COLOR_COMPONENT_LIGHT_SHADOW, COLOR_COMPONENT_LIST_BACKGROUND, COLOR_COMPONENT_NORMAL_SHADOW, COLOR_COMPONENT_SELECTION_TEXT, COLOR_COMPONENT_SELECTION_TEXT_BACKGROUND, COLOR_COMPONENT_SELECTION_TEXT_BACKGROUND_INACTIVE, COLOR_COMPONENT_SELECTION_TEXT_INACTIVE, eventQueue, font, foregroundColor, frame, height, parent, RESERVED1, RESERVED2, RESERVED3, RESERVED4, RESERVED5, RESERVED6, state, STATE_ABORT_UPDATE, STATE_ANIMATED, STATE_BG_COLOR_SET, STATE_COVERED, STATE_DIRTY_MASK, STATE_DIRTY_PAINTALL, STATE_DIRTY_REPAINT, STATE_DIRTY_UPDATE, STATE_DISABLED, STATE_DISPOSED, STATE_FG_COLOR_SET, STATE_FOCUS, STATE_HEIGHT_FIXED, STATE_NO_REDRAW, STATE_REVALIDATE, STATE_SELECTED, STATE_SIZE_FIXED, STATE_UPDATED, STATE_VISIBLE, STATE_WIDTH_FIXED, transparentColor, width, x, y |
Constructor Summary |
TypeWriter(int x,
int y,
int width,
int height,
int locale)
Creates a new TypeWriter. |
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 |
LOCALE_DE
public static final int LOCALE_DE
- See Also:
- Constant Field Values
LOCALE_UK
public static final int LOCALE_UK
- See Also:
- Constant Field Values
LOCALE_US
public static final int LOCALE_US
- See Also:
- Constant Field Values
TypeWriter
public TypeWriter(int x,
int y,
int width,
int height,
int locale)
- Creates a new TypeWriter.
- Parameters:
x
- the x coordinate of the upper left cornery
- the y coordinate of the upper left cornerwidth
- the width of the TypeWriterheight
- the height of the TypeWriterlocale
- LOCALE_DE, LOCALE_UK or LOCALE_US
getLastKey
public String getLastKey()
- Returns the recently pressed key as a string.
- Returns:
- the recently pressed key.
paint
public void paint(XGraphics g)
- Paint the TypeWriter. Don't call this method directly.
- Overrides:
paint
in class Component
- Parameters:
g
- the application's graphics object.
onTouchEvent
public int onTouchEvent(TouchEvent e)
- Description copied from interface:
TouchListener
- Every time a touch event is fired, this method
will be called.
- Specified by:
onTouchEvent
in interface TouchListener
- Specified by:
onTouchEvent
in class AbstractFocusComponent
- Parameters:
e
- The touch event.
- Returns:
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.
onKeyEvent
public KeyEvent onKeyEvent(KeyEvent e)
- Description copied from class:
AbstractFocusComponent
- This method is called when a keyboard action has been performed.
- Specified by:
onKeyEvent
in interface KeyListener
- Specified by:
onKeyEvent
in class AbstractFocusComponent
- Parameters:
e
- the event that contains information about the key.
- Returns:
null
if the KeyEvent has been consumed by the KeyListener,
or the the specified KeyEvent if it should be passed on to the next KeyListener.