public class InputKeyPad extends ControlPopupForm
Form.FormMaker, Form.ToolsOrSoftKey, Form.ValidateBeforeExit
Modifier and Type | Field and Description |
---|---|
CellPanel |
bottom |
Button |
clear |
Label |
curText |
boolean |
isPassword |
CellPanel |
keys |
char |
passwordCharacter |
Button |
reset |
boolean |
showClientTextFirst |
boolean |
showPrompt
Set this true to show a prompt at the top of the InputKeyPad.
|
CellPanel |
top |
protected String |
value |
attachedTo, client, closeIfPressClient, execFormOptions, popupFont, putByClient, putByPen, relayoutOnDisplay
acceptsDroppedFiles, apply, back, buttons, BUTTONS_TO_SOFT_KEY_FIRST_BUTTON_SEPARATE, BUTTONS_TO_SOFT_KEY_MENU_ALWAYS, BUTTONS_TO_SOFT_KEY_USE_FIRST_SOFT_KEY, buttonsPanel, buttonsPerRow, cancel, CLOSING_FLAG, deflt, dismantleOnClose, dontAddSIPFiller, exitButtonDefined, EXITING_FLAG, exitSystemOnClose, exitValue, fieldHandlers, firstFocus, formFrame, frameAlpha, handle, hasTitle, hasTopBar, hideSoftKeyBarIfNotFound, inheritSoftKeys, isAutoScrolling, isMainAppletForm, keepFrame, minimumShowTime, moveable, no, noBorder, ok, pl, resizable, resizeOnSIP, shadowed, SHOWN_FLAG, shownTime, softkeyBars, titleCancel, titleControls, titleOK, topControls, WINDOW_TITLE_DONT_CHANGE, windowFlagsToClear, windowFlagsToSet, windowIcon, windowTitle, yes
BACKB, CANCELB, checkIcon, close, cross, crossIcon, DEFCANCELB, DEFOKB, EXIT_IDBACK, EXIT_IDCANCEL, EXIT_IDNO, EXIT_IDOK, EXIT_IDYES, IDBACK, IDCANCEL, IDNO, IDOK, IDYES, MBB, MBNONE, MBOK, MBOKCANCEL, MBYESNO, MBYESNOCANCEL, NOB, OKB, stop, tick, tools, YESB
autoSpan, layout, mySplitter, nextSplitter, quickRecalculate
all, calculated, childListeners, defaultAddToMeCellConstraints, defaultTags, equalHeights, equalWidths, grid, lastAdded, layoutManager, made, noInsets, stretchFirstColumn, stretchFirstRow, stretchLastColumn, stretchLastRow, titleGap
isFullScrollClient, origin, scrollPercent, virtualSize
closedFocus, cycleFocus, dontAutoScroll, dontFocusOnChildren, FIND_FOR_MOUSE_PRESS, takeNextFocus
backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, curFont, debugModify, debugRepaintNow, disabledBackground, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, fontChange, fontFrom, foreGround, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, lockPaint, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, name, next, parent, penStatus, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, startDragResolution, tags, tail, text, toolTip, width, x, y
clipItems, clipObject, clipOwner, debugControl, debugFlag, doubleBuffer, doubleClickTime, doubleSizedFontHeight, firstPress, globalEditable, globalEnabled, PEN_STATUS_DID_HOLD_DOWN, PEN_STATUS_GOT_PEN_DOWN, PEN_STATUS_PEN_IS_ON, pressPoint, TAG_BOOLEAN_KEEP_BELOW_SIP, TAG_HOVER_TIME_INT, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed
CLOSE_FOR_NEW_POPUP, FLAG_NEW_POPUP_IS_MENU
ALWAYS_STRETCHABLE, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_HIDDEN, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TAG_BACKGROUND_IMAGE, TAG_BUSY_DISPLAY, TAG_COLORS, TAG_CONTROL_PAINTER, TAG_EXPOSE_GROUP, TAG_FIXEDSIZE, TAG_GRAY_BACKGROUND, TAG_HIDE_CONTROL_OBJECT, TAG_HIDE_PARENT, TAG_INNER_TEXT_INSETS, TAG_INPUT_STACK_PARENT, TAG_INSETS, TAG_MAKE_VISIBLE, TAG_MAXIMUMSIZE, TAG_MINIMUMSIZE, TAG_PAINT_CONTROL_LIST, TAG_PREFERRED_TEXT_SIZE, TAG_PREFERRED_TEXT_SIZE_HEIGHT, TAG_PREFERRED_TEXT_SIZE_WIDTH, TAG_PREFERREDSIZE, TAG_RECT, TAG_SHADOW_INSETS, TAG_SPAN, TAG_SWIPER, TAG_TEMPORARY_ERROR, TAG_TEXT_INSETS, TAG_TEXTSIZE, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
GoHigher, GoLower, Horizontal, OPTION_INDICATOR_ONLY, PageHigher, PageLower, ScrollHigher, ScrollLower, TrackTo, Vertical
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_ABUT_ANY, BF_ABUT_BOTTOM, BF_ABUT_LEFT, BF_ABUT_RIGHT, BF_ABUT_TOP, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, ContainerDontPaintChildren, Disabled, DisablePopupMenu, DisplayOnly, DontBuffer, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, ModifiersInheritedFromWindow, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpUIEvents, ShowSIP, ShrinkToNothing, SmallControl, TakeChildUIEvents, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown
KEEP_VISIBLE
Constructor and Description |
---|
InputKeyPad() |
Modifier and Type | Method and Description |
---|---|
protected void |
append(String what) |
boolean |
canExit(int exitCode)
This is called by the exit() method to see if the form can be
closed.
|
protected boolean |
canExitWithValue(String value)
If this returns false then the InputKeyPad will not exit with a code of IDOK.
|
void |
close(int exitCode)
This closes the form unconditionally and sets the exitValue to be exitCode.
|
protected void |
doClear()
By default this does nothing.
|
protected void |
doInit()
This is called after the call to popup().
|
protected void |
doReset()
This should reset the Form for input.
|
protected String |
fixValue(String value,
String oldValue)
A call to setValue() will then call this method to validate the entered
text.
|
String |
getDisplayText()
This gets the String to represent on screen the data String provided.
|
FormFrame |
getFormFrame(int options)
This is called when the Form is about to be displayed.
|
protected String |
getTextForClient()
Get the text to transfer back to the client.
|
void |
make(boolean reMake)
This is used to "make" the control before being displayed.
|
void |
onControlEvent(ControlEvent ev)
This listens for ControlEvent.PRESSED events from attached controls
and calls setFor(Control who) if it detects that event.
|
protected void |
pressed(Control who) |
void |
refresh()
Re-display the text.
|
protected void |
setValue(String text) |
protected void |
startingInput(Control c)
This is where the size of the input is selected (to match the number of
columns in the client) and where isPassword is set.
|
protected void |
transferToClient(Control client)
This is called if the exit value of the Form is IDOK - it is used to indicate that data
should be transferred to the client control if necessary.
|
addCloseControls, addCloseControls, addMainControls, attachTo, checkSize, closePopup, detachFrom, makeFrame, onKeyEvent, popup, pressedOutside, setFor
_getSetField, addButton, addFieldHandler, addFormMaker, addSIPAdjustment, addTabbedPanel, addToolbar, addTools, addToolsFor, addValidateBeforeExit, addValidateBeforeExit, buttonsToMenu, buttonsToSoftKeyBar, buttonsToSoftKeyBar, cancelWait, checkButtons, checkCanExit, closeAll, closeForTransfer, closeForTransfer, continueWait, createMenuItem, createMenuItem, createMenuItem, createSipFiller, createWindow, defaultTitleTo, dismantle, doButtons, doShowExec, enableScrolling, exec, exec, exec, exec, exec, execute, execute, execute, exit, filesDropped, fixWindowTitle, formClosing, formMain, fromFields, fromFields, fullScreenOnPDA, gatherButtons, getAncestorProperty, getButton, getFileSaver, getFormWithProperty, getProperties, getProperty, getSoftKeyBarFor, getTopmostForm, handleAction, handleAction, hasExitButton, makeButtonForForm, makeButtonForForm, makeDefaultButton, makeDefaultButton, makeMenuItemForForm, makeMenuItemForForm, makeSmall, makeSmallOnBigScreen, makeSoftKeys, makeSoftKeys, makeSoftKeys, maximizeOnPDA, menuItemSelected, modifyForSmartPhone, onDataChangeEvent, onEvent, onSoftKey, onSoftKey, placeCancelOnLeft, removeSoftKeyBarFor, setAsMainAppletForm, setAsShown, setBelowButtonBar, setBelowButtonBars, setDefaultSize, setExitHandle, setFileSaver, setMainScrollBarPanel, setNoTitleBar, setSoftKeyBarFor, setSoftKeyBarForAll, setupFrame, show, show, showButtons, showExecCalled, shown, showWait, showWait, startRunning, stopFormHandle, takeButtons, takeButtons, takeButtons, toFields, toFields, toolsOnBottom, validateBeforeExit, waitUntilClosed, waitUntilClosed, waitUntilClosed, waitUntilShown, willBeMaximized
getCross, getParentObject, getParentObject, getSizedImage, getTick, getToolsIcon, setParentObject
calculateSizes, getFloatingControls, getSubControls, hasFloatingControls, makeLayoutGrid, relayoutMe, removeAll, reShow, resize, resizeTo
add, addChildListener, addDirectly, addLast, addLast, addLast, addNext, addNext, addNext, addNext, calculatedSizes, doBorder, endRow, getControlTag, getPreferredSize, insertRow, isEmpty, layout, remove, removeChildListener, sendToChildListeners, setAsBelowSip, setText
canGo, canScreenScroll, checkScrolls, doScroll, fixOrigin, getActual, getBuffer, getCurrent, getDisplayedSize, getMyHeight, getMySize, getMyWidth, getPercent, getScrollablePanel, getScrollClient, getVisible, getVisibleArea, needScrollBar, onScroll, onSetOrigin, reduceClip, scroll, scroll, scrollToVisible, setOrigin, updateScrollServer
add, completeAddPopupControl, containerHasFocus, dismantle, doHotKey, doPaint, findChild, findChild, focusFirst, focusFirst, focusOnContainer, focusOnData, getChildren, getFirstFocus, getNextKeyFocus, gotFocus, grayOut, hide, lostFocus, relayout, removePopupControl, repaintDataNow, setHidden, startAddPopupControl, takeFocus, takePromptControl, unhide
acceptsData, activate, addListener, amOnTopFrame, applyFontChange, baseOnPenEvent, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, bufferGraphics, cache, calculateTextSize, calculateTextSize, calculateTextSize, cancelHoldDown, cancelPenPress, canEdit, change, changeDimension, changeTag, checkClipboardOperations, checkExitKey, checkMenu, checkMenuKey, checkModifiers, checkParentInterceptsUIEvent, checkPenTransparent, childrenPainted, clearTag, clipboardToString, clipboardTransfer, closeMenu, contains, contains, createNewMenu, dataAccepted, dataBeingRemoved, dataDraggedOff, dataDraggedOver, dataDraggedOver, dataDroppedOn, dataTransferCancelled, deactivate, defaultTo, deferInWindowThread, doAction, doActionKey, doBackground, doMenu, dontAcceptDrop, doPaintChildren, doPaintData, doPaintData, doShowMenu, dragged, draw, draw, draw, exitEntry, fillBackground, fillBackgroundNotInFrame, findTagInParents, fontChanged, free, fromClipboard, fromField, fromField, getAllDescendants, getAllSubControls, getAncestor, getAncestor, getAncestorProperty, getBackground, getCached, getCachedChildren, getCachedDim, getCachedDim, getCachedRect, getCachedRect, getCachedSubControls, getChildAnchor, getChildren, getChildrenBackwards, getClipboardMenu, getClipObject, getContentsInsets, getContentsInsets, getContentsRect, getDataToCopy, getDataToDragAndDrop, getDim, getDragAndDropContext, getFieldTransfer, getFont, getFontMetrics, getFontMetrics, getFontMetricsForSizeCalculations, getForeground, getFrame, getFrameOrContainer, getGraphics, getGraphics, getHeight, getHideParent, getImage, getLastSelected, getLocation, getLock, getMaximumSize, getMenu, getMinimumSize, getModifiedBorderFlags, getModifiers, getNext, getPaintParameters, getParent, getParent, getParent, getParentOrListener, getPasswordCharacter, getPosInFrame, getPosInFrame, getPosInParent, getPosInParent, getPreferredSize, getPreferredSizeByParent, getPreferredTextSize, getPrompt, getPromptText, getRect, getRect, getServer, getSize, getSizes, getSubControls, getTag, getText, getToolTip, getWidth, getWindow, getWindowGraphics, hasModifier, hasPopupFormAttached, hasTag, hide, inheritModifiers, insetToContents, interceptChildUIEvent, isChildOf, isDirectChildOfWindow, isHidden, isModal, isOnMe, isOnMe, isOnMe, isSomeonesHotKey, makeFrameTopMost, makeHot, makeHot, makeInvisible, makeVisible, markAsTemporaryError, menuIsActive, menuStateChanged, modify, modifyAll, modifyAll, modifyFlags, mouseHover, newEventThread, notifyAction, notifyDataChange, notifyDataChange, notifyMenuItemSelected, notifyStructureChanged, onLabelPenEvent, onPenEvent, paintBackground, paintWithControlPainter, pauseEventThread, penClicked, penDoubleClicked, penHeld, penPressed, penReleased, penRightReleased, popupBeep, popupMenuClosed, popupMenuEvent, popupMenuEvent, postEvent, postInWindowThread, postUIEvent, putInside, queueKeyEvent, queuePenEvent, readLock, recalculatePreferredSize, redisplay, refresh, releaseBufferedGraphics, removed, removeListener, repaint, repaint, repaintInWindowThread, repaintInWindowThread, repaintNow, repaintNow, repaintNow, repaintNow, requestPaint, requestResizeTo, resetAllCachedProperties, resetCachedProperties, resetRect, restore, restoreBorderModifiers, restoreFlags, resumeEventThread, scrollAndRepaint, sendToListeners, set, setAllFonts, setBackgroundImage, setBorder, setBorderModifiers, setCell, setChildAnchor, setClipObject, setControl, setCursor, setFieldTransfer, setFixedSize, setFont, setFontChange, setFreeDragging, setHidden, setHiddenParent, setHotKey, setHotKey, setLocation, setMaximumSize, setMenu, setMinimumSize, setPreferredSize, setPreferredTextSize, setPreferredTextSize, setPromptControl, setRect, setRect, setScaledBackgroundImage, setServer, setShadow, setSwiping, setTag, setTags, setTextSize, setTiledBackgroundImage, setToolTip, showHoldDownIndicator, simulateClickOn, simulateKeyPresses, simulateKeyType, standardOnKeyEvent, startDragAndDrop, startDragAndDrop, startDragging, stopDragging, takeData, takeFromClipboard, testInWindowThread, ticked, tipIsDisplayed, toClipboard, toField, toField, toIDString, toString, toTextData, transferPenPress, transferPenPress, tryDragAndDrop, tryGetGraphics, tryNext, tryStartMenu, unhide, unlock, updateData, updateDCDuringDD, updateFrom, updateTo, verifyWantDrag, verifyWantHoldDown, waitEventThread, willAcceptDrop, willShowFrame, windowHasFloatingControls, writeLock
doubleSizeIt, getGuiTextHeight, isDoubleSized, isDoubleSizedFont, loadImage, tryLoadImage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getServer, setServer
public CellPanel top
public CellPanel keys
public CellPanel bottom
public Button reset
public Button clear
public boolean showClientTextFirst
protected String value
public boolean isPassword
public boolean showPrompt
public char passwordCharacter
public Label curText
public String getDisplayText()
getDisplayText
in class Control
s
- The data String to display.public FormFrame getFormFrame(int options)
Form
getFormFrame
in class Form
protected void doInit()
ControlPopupForm
doInit
in class ControlPopupForm
protected void doReset()
ControlPopupForm
doReset
in class ControlPopupForm
protected void doClear()
ControlPopupForm
doClear
in class ControlPopupForm
protected void pressed(Control who)
public void onControlEvent(ControlEvent ev)
ControlPopupForm
onControlEvent
in class ControlPopupForm
protected void append(String what)
protected String getTextForClient()
protected void transferToClient(Control client)
ControlPopupForm
transferToClient
in class ControlPopupForm
client
- the client control for the Popup form.public void close(int exitCode)
Form
close
in class ControlPopupForm
protected String fixValue(String value, String oldValue)
public boolean canExit(int exitCode)
Form
protected boolean canExitWithValue(String value)
protected void setValue(String text)
public void refresh()
protected void startingInput(Control c)
startingInput
in class ControlPopupForm
c
- The new client control.