public class VirtualKeyboard extends Dialog implements com.codename1.impl.VirtualKeyboardInterface
Modifier and Type | Field and Description |
---|---|
static int |
CHANGE_MODE
Deprecated.
|
static String[][] |
DEFAULT_NUMBERS
Deprecated.
This keymap represents numbers keyboard
|
static String[][] |
DEFAULT_NUMBERS_SYMBOLS
Deprecated.
This keymap represents numbers and symbols keyboard
|
static String[][] |
DEFAULT_QWERTY
Deprecated.
This keymap represents qwerty keyboard
|
static String[][] |
DEFAULT_SYMBOLS
Deprecated.
This keymap represents symbols keyboard
|
static int |
DELETE_CHAR
Deprecated.
|
static int |
INSERT_CHAR
Deprecated.
|
static String |
NAME
Deprecated.
|
static String |
NUMBERS_MODE
Deprecated.
The String that represent the numbers mode.
|
static String |
NUMBERS_SYMBOLS_MODE
Deprecated.
The String that represent the numbers sybols mode.
|
static int |
OK
Deprecated.
|
static String |
QWERTY_MODE
Deprecated.
The String that represent the qwerty mode.
|
static int |
SHIFT
Deprecated.
|
static int |
SPACE
Deprecated.
|
static String |
SYMBOLS_MODE
Deprecated.
The String that represent the symbols mode.
|
static int |
T9
Deprecated.
|
TYPE_ALARM, TYPE_CONFIRMATION, TYPE_ERROR, TYPE_INFO, TYPE_NONE, TYPE_WARNING
focusScrolling
BASELINE, BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, CROSSHAIR_CURSOR, DEFAULT_CURSOR, DRAG_REGION_IMMEDIATELY_DRAG_X, DRAG_REGION_IMMEDIATELY_DRAG_XY, DRAG_REGION_IMMEDIATELY_DRAG_Y, DRAG_REGION_LIKELY_DRAG_X, DRAG_REGION_LIKELY_DRAG_XY, DRAG_REGION_LIKELY_DRAG_Y, DRAG_REGION_NOT_DRAGGABLE, DRAG_REGION_POSSIBLE_DRAG_X, DRAG_REGION_POSSIBLE_DRAG_XY, DRAG_REGION_POSSIBLE_DRAG_Y, E_RESIZE_CURSOR, HAND_CURSOR, LEFT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NW_RESIZE_CURSOR, RIGHT, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, TOP, W_RESIZE_CURSOR, WAIT_CURSOR
Constructor and Description |
---|
VirtualKeyboard()
Deprecated.
Creates a new instance of VirtualKeyboard
|
Modifier and Type | Method and Description |
---|---|
protected void |
actionCommand(Command cmd)
Deprecated.
Invoked to allow subclasses of form to handle a command from one point
rather than implementing many command instances
|
static void |
addDefaultInputMode(String mode,
String[][] inputChars)
Deprecated.
Add an input mode to the virtual keyboard
|
void |
addInputMode(String mode,
String[][] inputChars)
Deprecated.
Add an input mode to the virtual keyboard
|
void |
addSpecialButton(String key,
Command cmd)
Deprecated.
This method adds a special button to the virtual keyboard
|
void |
addSpecialButton(String key,
Command cmd,
int space)
Deprecated.
This method adds a special button to the virtual keyboard
|
protected void |
autoAdjust(int w,
int h)
Deprecated.
Auto adjust size of the dialog.
|
static void |
bindVirtualKeyboard(TextArea t,
VirtualKeyboard vkb)
Deprecated.
This method is used to bind a specific instance of a virtual keyboard to a specific TextField.
|
void |
dispose()
Deprecated.
Closes the current form and returns to the previous form, releasing the
EDT in the process
|
protected String |
getCurrentMode()
Deprecated.
Gets the current mode.
|
static String[] |
getDefaultInputModeOrder()
Deprecated.
Returns the order in which input modes are toggled by default
|
protected TextField |
getInputField()
Deprecated.
This method returns the Virtual Keyboard TextField.
|
String[] |
getInputModeOrder()
Deprecated.
Returns the order in which input modes are toggled
|
static Transition |
getTransitionIn()
Deprecated.
The transition in for the VKB
|
static Transition |
getTransitionOut()
Deprecated.
The transition out for the VKB
|
static VirtualKeyboard |
getVirtualKeyboard(TextArea t)
Deprecated.
This method returns the Textfield associated VirtualKeyboard,
see bindVirtualKeyboard(TextField tf, VirtualKeyboard vkb) method.
|
String |
getVirtualKeyboardName()
Deprecated.
Returns the Virtual Keyboard name.
|
static int |
getVKBTint(TextArea tf)
Deprecated.
The tint color for the virtual keyboard when shown on top of this text field
see the form tint methods for more information
|
protected void |
initModes()
Deprecated.
init all virtual keyboard modes, such as QWERTY_MODE, NUMBERS_SYMBOLS_MODE...
|
protected void |
initSpecialButtons()
Deprecated.
This method initialize all the virtual keyboard special buttons.
|
static boolean |
isCommitOnDispose(TextArea tf)
Deprecated.
Indicates whether the given text field should commit on dispose
|
static boolean |
isShowTooltips()
Deprecated.
Indicates whether tooltips should be shown when the keys in the VKB are pressed
|
boolean |
isVirtualKeyboardShowing()
Deprecated.
Indicates if the Virtual Keyboard is currently showing.
|
protected void |
onShow()
Deprecated.
Allows subclasses to bind functionality that occurs when
a specific form or dialog appears on the screen
|
void |
pointerDragged(int x,
int y)
Deprecated.
If this Component is focused, the pointer dragged event
will call this method
|
void |
pointerPressed(int x,
int y)
Deprecated.
If this Component is focused, the pointer pressed event
will call this method
|
void |
pointerReleased(int x,
int y)
Deprecated.
If this Component is focused, the pointer released event
will call this method
|
static void |
setCommitOnDispose(TextField tf,
boolean b)
Deprecated.
Indicates whether the VKB should commit changes to the text field when the VKB
is closed not via the OK button.
|
protected void |
setCurrentMode(String mode)
Deprecated.
Sets the current virtual keyboard mode.
|
static void |
setDefaultInputModeOrder(String[] order)
Deprecated.
Sets the order in which input modes are toggled by default and allows
disabling/hiding an input mode
|
static void |
setDefaultVirtualKeyboardClass(Class vkbClazz)
Deprecated.
Sets the default virtual keyboard class for the com.codename1.ui.VirtualKeyboard
type
This class is used as the default virtual keyboard class if the current
platform VirtualKeyboard is com.codename1.ui.VirtualKeyboard.
|
void |
setInputModeOrder(String[] order)
Deprecated.
Sets the order in which input modes are toggled and allows disabling/hiding
an input mode
|
void |
setInputType(int inputType)
Deprecated.
This can be used to indicate to the VirtualKeyboard what type of input
to display.
|
static void |
setShowTooltips(boolean aShowTooltips)
Deprecated.
Indicates whether tooltips should be shown when the keys in the VKB are pressed
|
void |
setTextField(TextArea field)
Deprecated.
Invoked internally by the implementation to indicate the text field that will be
edited by the virtual keyboard
|
static void |
setTransitionIn(Transition aTransitionIn)
Deprecated.
The transition in for the VKB
|
static void |
setTransitionOut(Transition aTransitionOut)
Deprecated.
The transition out for the VKB
|
static void |
setVKBTint(TextField tf,
int tint)
Deprecated.
Sets the tint color for the virtual keyboard when shown on top of this text field
see the form tint methods for more information
|
void |
show()
Deprecated.
The default version of show modal shows the dialog occupying the center portion
of the screen.
|
void |
showKeyboard(boolean show)
Deprecated.
Shows the virtual keyboard that is assoiciated with the displayed TextField
or displays the default virtual keyboard.
|
addComponent, addComponent, addComponent, addComponent, animate, getBlurBackgroundRadius, getContentPane, getDefaultBlurBackgroundRadius, getDefaultDialogPosition, getDefaultDialogType, getDialogComponent, getDialogPosition, getDialogPreferredSize, getDialogStyle, getDialogType, getDialogUIID, getLayout, getPopupDirectionBiasPortrait, getTitle, getTitleComponent, getTitleStyle, growOrShrink, initGlobalToolbar, initLaf, isAutoAdjustDialogSize, isAutoDispose, isCommandsAsButtons, isDisableStaticDialogScrolling, isDisposeWhenPointerOutOfBounds, keyReleased, placeButtonCommands, removeAll, removeComponent, setAutoAdjustDialogSize, setAutoDispose, setBlurBackgroundRadius, setCommandsAsButtons, setDefaultBlurBackgroundRadius, setDefaultDialogPosition, setDefaultDialogType, setDialogPosition, setDialogStyle, setDialogType, setDialogUIID, setDisableStaticDialogScrolling, setDisposeWhenPointerOutOfBounds, setLayout, setPopupDirectionBiasPortrait, setScrollable, setTimeout, setTitle, setTitleComponent, setTitleComponent, show, show, show, show, show, show, show, show, show, show, show, show, show, show, show, showAtPosition, showBack, showDialog, showModeless, showPacked, showPopupDialog, showPopupDialog, showStetched, showStretched, wasDisposedDueToOutOfBoundsTouch, wasDisposedDueToRotation
addCommand, addCommand, addCommandListener, addGameKeyListener, addKeyListener, addOrientationListener, addShowListener, addSizeChangedListener, createStatusBar, deregisterAnimated, dispatchCommand, findNextFocusHorizontal, findNextFocusVertical, getAnimationManager, getBackCommand, getClearCommand, getCommand, getCommandCount, getComponentForm, getComponentIndex, getDefaultCommand, getDragRegionStatus, getEditOnShow, getFocused, getFormLayeredPane, getGlassPane, getInvisibleAreaUnderVKB, getLayeredPane, getLayeredPane, getMenuBar, getMenuStyle, getPropertyNames, getPropertyTypeNames, getPropertyTypes, getPropertyValue, getScrollAnimationSpeed, getSoftButton, getSoftButtonCount, getTintColor, getTitleArea, getToolbar, getTransitionInAnimator, getTransitionOutAnimator, getUIManager, grabAnimationLock, hasMedia, hideNotify, isAlwaysTensile, isCyclicFocus, isDragRegion, isEnableCursors, isFocusScrolling, isFormBottomPaddingEditingMode, isMinimizeOnBack, isScrollable, isScrollableX, isScrollableY, isScrollVisible, isSingleFocusMode, isSmoothScrolling, keyPressed, keyRepeated, longKeyPress, longPointerPress, onShowCompleted, paint, paintBackground, paramString, pointerDragged, pointerHover, pointerHoverPressed, pointerHoverReleased, refreshTheme, registerAnimated, releaseAnimationLock, removeAllCommands, removeAllShowListeners, removeCommand, removeCommandListener, removeGameKeyListener, removeKeyListener, removeOrientationListener, removeShowListener, removeSizeChangedListener, replace, replaceAndWait, scrollComponentToVisible, setAlwaysTensile, setBackCommand, setBackCommand, setBgImage, setClearCommand, setCyclicFocus, setDefaultCommand, setEditOnShow, setEnableCursors, setFocused, setFocusScrolling, setFormBottomPaddingEditingMode, setGlassPane, setMenuBar, setMenuCellRenderer, setMenuTransitions, setMinimizeOnBack, setPropertyValue, setRTL, setScrollableX, setScrollableY, setScrollAnimationSpeed, setScrollVisible, setSmoothScrolling, setTintColor, setTitleStyle, setToolbar, setToolBar, setTransitionInAnimator, setTransitionOutAnimator, setUIManager, setVisible, shouldPaintStatusBar, shouldSendPointerReleaseToOtherForm, showNotify, sizeChanged
add, add, add, add, add, add, addAll, animateHierarchy, animateHierarchyAndWait, animateHierarchyFade, animateHierarchyFadeAndWait, animateLayout, animateLayoutAndWait, animateLayoutFade, animateLayoutFadeAndWait, animateUnlayout, animateUnlayoutAndWait, applyRTL, calcPreferredSize, cancelRepaints, clearClientProperties, contains, createAnimateHierarchy, createAnimateHierarchyFade, createAnimateLayout, createAnimateLayoutFade, createAnimateLayoutFadeAndWait, createAnimateMotion, createAnimateUnlayout, createReplaceTransition, dragInitiated, drop, encloseIn, encloseIn, findDropTargetAt, findFirstFocusable, fireClicked, flushReplace, forceRevalidate, getBottomGap, getClosestComponentTo, getComponentAt, getComponentAt, getComponentCount, getGridPosX, getGridPosY, getLayoutHeight, getLayoutWidth, getLeadComponent, getLeadParent, getScrollIncrement, getSideGap, invalidate, isEnabled, isSelectableInteraction, iterator, layoutContainer, morph, morphAndWait, paintComponentBackground, paintGlass, replace, replaceAndWait, replaceAndWait, revalidate, setCellRenderer, setEnabled, setLeadComponent, setScrollIncrement, setShouldCalcPreferredSize, setShouldLayout
addDragOverListener, addDropListener, addFocusListener, addPointerDraggedListener, addPointerPressedListener, addPointerReleasedListener, addPullToRefresh, addScrollListener, bindProperty, calcScrollSize, contains, createStyleAnimation, deinitialize, deinitializeCustomStyle, dragEnter, dragExit, dragFinished, draggingOver, drawDraggedImage, focusGained, focusLost, getAbsoluteX, getAbsoluteY, getAllStyles, getBaseline, getBaselineResizeBehavior, getBindablePropertyNames, getBindablePropertyTypes, getBorder, getBoundPropertyValue, getBounds, getClientProperty, getCloudBoundProperty, getCloudDestinationProperty, getComponentState, getCursor, getDirtyRegion, getDisabledStyle, getDraggedx, getDraggedy, getDragImage, getDragSpeed, getHeight, getInnerHeight, getInnerPreferredH, getInnerPreferredW, getInnerWidth, getInnerX, getInnerY, getLabelForComponent, getName, getNextFocusDown, getNextFocusLeft, getNextFocusRight, getNextFocusUp, getOuterHeight, getOuterPreferredH, getOuterPreferredW, getOuterWidth, getOuterX, getOuterY, getParent, getPreferredH, getPreferredSize, getPreferredW, getPressedStyle, getSameHeight, getSameWidth, getScrollable, getScrollDimension, getScrollOpacity, getScrollOpacityChangeSpeed, getScrollX, getScrollY, getSelectCommandText, getSelectedRect, getSelectedStyle, getStyle, getTensileLength, getUIID, getUnselectedStyle, getVisibleBounds, getWidth, getX, getY, growShrink, handlesInput, hasFocus, initComponent, initCustomStyle, installDefaultPainter, isBlockLead, isCellRenderer, isDragActivated, isDragAndDropOperation, isDraggable, isDropTarget, isFlatten, isFocusable, isGrabsPointerEvents, isHidden, isHideInPortrait, isIgnorePointerEvents, isInClippingRegion, isInitialized, isRippleEffect, isRTL, isSetCursorSupported, isSnapToGrid, isStickyDrag, isTactileTouch, isTactileTouch, isTensileDragEnabled, isVisible, laidOut, onScrollX, onScrollY, paintBackgrounds, paintBorder, paintBorderBackground, paintComponent, paintComponent, paintLock, paintLockRelease, paintRippleOverlay, paintScrollbars, paintScrollbarX, paintScrollbarY, pinch, pointerPressed, pointerReleased, putClientProperty, refreshTheme, refreshTheme, remove, removeDragOverListener, removeDropListener, removeFocusListener, removePointerDraggedListener, removePointerPressedListener, removePointerReleasedListener, removeScrollListener, repaint, repaint, requestFocus, resetFocusable, scrollRectToVisible, scrollRectToVisible, setBlockLead, setBoundPropertyValue, setCloudBoundProperty, setCloudDestinationProperty, setComponentState, setCursor, setDirtyRegion, setDisabledStyle, setDraggable, setDropTarget, setFlatten, setFocus, setFocusable, setGrabsPointerEvents, setHandlesInput, setHeight, setHidden, setHidden, setHideInPortrait, setIgnorePointerEvents, setInitialized, setIsScrollVisible, setLabelForComponent, setName, setNextFocusDown, setNextFocusLeft, setNextFocusRight, setNextFocusUp, setPreferredH, setPreferredSize, setPreferredW, setPressedStyle, setRippleEffect, setSameHeight, setSameSize, setSameWidth, setScrollOpacityChangeSpeed, setScrollSize, setScrollX, setScrollY, setSelectCommandText, setSelectedStyle, setSize, setSnapToGrid, setTactileTouch, setTensileDragEnabled, setTensileLength, setUIID, setUnselectedStyle, setWidth, setX, setY, shouldBlockSideSwipe, styleChanged, toString, unbindProperty, visibleBoundsContains
public static final String[][] DEFAULT_QWERTY
public static final String[][] DEFAULT_NUMBERS
public static final String[][] DEFAULT_NUMBERS_SYMBOLS
public static final String[][] DEFAULT_SYMBOLS
public static final String QWERTY_MODE
public static final String NUMBERS_MODE
public static final String NUMBERS_SYMBOLS_MODE
public static final String SYMBOLS_MODE
public static final int INSERT_CHAR
public static final int DELETE_CHAR
public static final int CHANGE_MODE
public static final int SHIFT
public static final int OK
public static final int SPACE
public static final int T9
public static final String NAME
public VirtualKeyboard()
public void setInputType(int inputType)
com.codename1.impl.VirtualKeyboardInterface
setInputType
in interface com.codename1.impl.VirtualKeyboardInterface
public void setTextField(TextArea field)
field
- the text field instancepublic void show()
protected void autoAdjust(int w, int h)
autoAdjust
in class Dialog
w
- width of the screenh
- height of the screenprotected void initModes()
protected void setCurrentMode(String mode)
mode
- the String that represents the mode(QWERTY_MODE,
SYMBOLS_MODE, ...)protected String getCurrentMode()
public static void addDefaultInputMode(String mode, String[][] inputChars)
mode
- a string that represents the identifier of the modeinputChars
- 2 dimensional String array that contains buttons String
and special buttons (a special button is identified with $...$ marks
e.g: "$Space$")public void addInputMode(String mode, String[][] inputChars)
mode
- a string that represents the identifier of the modeinputChars
- 2 dimentional String array that contains buttons String
and special buttons (a special button is identified with $...$ marks
e.g: "$Space$")public void addSpecialButton(String key, Command cmd)
key
- the string identifier from within the relevant input modecmd
- the Command to invoke when this button is invoked.public void addSpecialButton(String key, Command cmd, int space)
key
- the string identifier from within the relevant input modecmd
- the Command to invoke when this button is invoked.space
- how much space in percentage from the overall row
the special button should occupypublic void pointerPressed(int x, int y)
pointerPressed
in class Dialog
x
- the pointer x coordinatey
- the pointer y coordinatepublic void pointerDragged(int x, int y)
pointerDragged
in class Form
x
- the pointer x coordinatey
- the pointer y coordinatepublic void pointerReleased(int x, int y)
pointerReleased
in class Dialog
x
- the pointer x coordinatey
- the pointer y coordinateprotected void initSpecialButtons()
public String[] getInputModeOrder()
public void setInputModeOrder(String[] order)
order
- the order for the input modes in this fieldpublic static String[] getDefaultInputModeOrder()
public static void setDefaultInputModeOrder(String[] order)
order
- the order for the input modes in all future created fieldsprotected void actionCommand(Command cmd)
actionCommand
in class Dialog
cmd
- the action commandpublic void dispose()
protected void onShow()
protected TextField getInputField()
public static void setCommitOnDispose(TextField tf, boolean b)
tf
- the text field to mark as commit on disposeb
- the value of commit on dispose, true to always commit changespublic static void bindVirtualKeyboard(TextArea t, VirtualKeyboard vkb)
t
- the TextField to bind a VirualKeyboard to.vkb
- the binded VirualKeyboard.public static VirtualKeyboard getVirtualKeyboard(TextArea t)
t
- a TextField.that might have an associated VirtualKeyboard instancepublic static boolean isCommitOnDispose(TextArea tf)
tf
- the text fieldpublic static void setVKBTint(TextField tf, int tint)
tf
- the relevant text fieldtint
- the tint color with an alpha channelpublic static int getVKBTint(TextArea tf)
tf
- the relevant text fieldpublic static boolean isShowTooltips()
public static void setShowTooltips(boolean aShowTooltips)
aShowTooltips
- true to show tooltipspublic static Transition getTransitionIn()
public static void setTransitionIn(Transition aTransitionIn)
aTransitionIn
- the transitionIn to setpublic static Transition getTransitionOut()
public static void setTransitionOut(Transition aTransitionOut)
aTransitionOut
- the transitionOut to setpublic void showKeyboard(boolean show)
showKeyboard
in interface com.codename1.impl.VirtualKeyboardInterface
show
- it show is true open the relevant keyboard, if close dispose
the displayed keyboardpublic static void setDefaultVirtualKeyboardClass(Class vkbClazz)
vkbClazz
- this class must extend VirtualKeyboard.public String getVirtualKeyboardName()
com.codename1.impl.VirtualKeyboardInterface
getVirtualKeyboardName
in interface com.codename1.impl.VirtualKeyboardInterface
VirtualKeyboardInterface
public boolean isVirtualKeyboardShowing()
com.codename1.impl.VirtualKeyboardInterface
isVirtualKeyboardShowing
in interface com.codename1.impl.VirtualKeyboardInterface
VirtualKeyboardInterface