de.enough.polish.ui.keyboard.view
Class KeyboardView

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Canvas
          extended by de.enough.polish.ui.Canvas
              extended by de.enough.polish.ui.Screen
                  extended by de.enough.polish.ui.Form
                      extended by de.enough.polish.ui.FramedForm
                          extended by de.enough.polish.ui.keyboard.view.KeyboardView
All Implemented Interfaces:
Animatable, Displayable, ItemCommandListener, UiElement

public class KeyboardView
extends FramedForm
implements ItemCommandListener

A class to display a Keyboard instance and a header to show the current text that was written. This form is shown in TextField.handlePointerReleased() and set the text of the specified TextField with the written result of the KeyboardView

Author:
Andre

Field Summary
 
Fields inherited from class de.enough.polish.ui.FramedForm
allowCycling, bottomFrame, currentlyActiveContainer, leftFrame, rightFrame, topFrame
 
Fields inherited from class de.enough.polish.ui.Screen
background, backgroundHeight, backgroundWidth, backgroundX, backgroundY, border, container, contentBackground, contentBackgroundAnchor, contentBackgroundHeight, contentBackgroundWidth, contentBgBorder, contentBorder, contentHeight, contentWidth, contentX, contentY, cssSelector, enableScreenChangeAnimation, fullScreenHeight, ignoreRepaintRequests, infoHeight, isAnimated, isInitRequested, isRepaintRequested, isScrollBackground, itemStateListener, keyPressedProcessed, keyReleasedProcessed, lastAnimateTime, lastInteractionTime, lastTriggeredCommand, menuBarHeight, originalScreenHeight, paintScrollBarOnRightSide, previousScreenOverlayBackground, screenHeight, screenStateListener, screenWidth, scrollBar, scrollBarVisible, style, subTitleHeight, title, titleHeight, triggerReleasedKeyCode, triggerReleasedTime
 
Fields inherited from class de.enough.polish.ui.Canvas
_commands, DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP
 
Method Summary
 void commandAction(Command c, Item item)
          Called by the system to indicate that a command has been invoked on a particular item.
static KeyboardView getInstance(String title, TextField field, Displayable screen)
          Returns an instance of a KeyboardView for the given title, textfield and screen
 String getText()
          Returns the text
 void setText(String text)
          Sets the text in the display item
 
Methods inherited from class de.enough.polish.ui.FramedForm
adjustContentArea, animate, append, append, append, append, checkForRequestInit, delete, deleteAll, deleteAll, deleteFrame, destroy, focus, focus, focusByAction, getCurrentItem, getFrame, getItemAt, getRootItems, handleCommand, handleKeyPressed, handleKeyReleased, handleKeyRepeated, handlePointerDragged, handlePointerPressed, handlePointerReleased, handlePointerTouchDown, handlePointerTouchUp, paintScreen, releaseResources, set, set, set, setActiveFrame, setActiveFrame, setActiveFrame, setActiveFrame, setFrameStyle, setFrameStyle, setItemCommands, setItemStateListener, setStyle, setStyle, size, sizeChanged
 
Methods inherited from class de.enough.polish.ui.Form
append, append, append, append, append, append, createCssSelector, delete, get, insert, insert, insert, set, set, size
 
Methods inherited from class de.enough.polish.ui.Screen
addCommand, addCommand, addCommand, addCommandsLayer, addPermanentNativeItem, addRelativeToContentRegion, addRepaintArea, addSubCommand, addSubCommand, animate, calculateContentArea, callCommandListener, canScrollDown, canScrollUp, clearItemCommands, closeMenu, commandAction, fireEvent, fireEventForTitleAndMenubar, focus, focus, focus, focus, getAvailableHeight, getCommandItem, getCommandListener, getCommands, getCurrentIndex, getDefaultCommand, getKeyStates, getMenuBar, getPaintLock, getPolishTicker, getRootContainer, getScreenContentHeight, getScreenContentWidth, getScreenContentX, getScreenContentY, getScreenData, getScreenFullHeight, getScreenFullWidth, getScreenHeight, getScreenStyle, getScrollBarWidth, getScrollDownBackgroundOffset, getScrollHeight, getScrollUpBackgroundOffset, getScrollYOffset, getStyle, getTitle, getTitleHeight, getTitleItem, getUiEventListener, handleCommand, handlePointerReleasedOutsideScreenArea, hideNotify, init, initContent, isActive, isGameActionFire, isInteracted, isKeyboardAccessible, isMenuOpened, isNativeUiShownFor, isSoftKey, isSoftKey, isSoftKeyLeft, isSoftKeyMiddle, isSoftKeyRight, keyPressed, keyReleased, keyRepeated, notifyDefaultCommand, notifyFocusSet, notifyScreenStateChanged, notifyStateListener, paint, paintBackgroundAndBorder, paintMenuBar, paintScrollBar, paintTitleAndSubtitle, pointerDragged, pointerPressed, pointerReleased, removeAllCommands, removeCommand, removeCommandsLayer, removeItemCommands, removePermanentNativeItem, removeSubCommand, requestInit, requestRepaint, requestRepaint, scrollRelative, setCommandListener, setCommandListener, setFullScreenMode, setInfo, setInfo, setItemStateListener, setLastInteractionTime, setMenuBarStyle, setMenuItemStyle, setPolishTicker, setPolishTicker, setScreenData, setScreenOrientation, setScreenStateListener, setScrollYOffset, setSubTitle, setTitle, setTitle, setTitle, setTitle, setUiEventListener, showNotify
 
Methods inherited from class de.enough.polish.ui.Canvas
_hideNotify, _hideNotifyExternal, _showNotify, getGameAction, getHeight, getKeyCode, getKeyName, getWidth, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotifyExternal, isDoubleBuffered, isShown, setTicker
 
Methods inherited from class javax.microedition.lcdui.Canvas
repaint, repaint, serviceRepaints
 
Methods inherited from class javax.microedition.lcdui.Displayable
getTicker, removeCommand, setTicker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static KeyboardView getInstance(String title,
                                       TextField field,
                                       Displayable screen)
Returns an instance of a KeyboardView for the given title, textfield and screen

Parameters:
title - the title to display
field - the field to pass the value to
screen - the screen to return to
Returns:
an instance of a KeyboardView

getText

public String getText()
Returns the text

Returns:
the text

setText

public void setText(String text)
Sets the text in the display item

Parameters:
text - the text

commandAction

public void commandAction(Command c,
                          Item item)
Description copied from interface: ItemCommandListener
Called by the system to indicate that a command has been invoked on a particular item.

Specified by:
commandAction in interface ItemCommandListener
Parameters:
c - the Command that was invoked
item - the Item on which the command was invoked