Package totalcross.ui.dialog.keyboard
Class KeyboardEdit
- java.lang.Object
-
- totalcross.ui.gfx.GfxSurface
-
- totalcross.ui.Control
-
- totalcross.ui.Edit
-
- totalcross.ui.dialog.keyboard.KeyboardEdit
-
- All Implemented Interfaces:
HasValue<java.lang.String>,TextControl
public class KeyboardEdit extends Edit
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class totalcross.ui.Control
Control.TranslucentShape
-
-
Field Summary
Fields Modifier and Type Field Description protected static booleankeyboardOnSinaliza se o teclado está acionado para todos os Edits.protected java.lang.IntegermaxLength2tamanho maximo.protected VirtualKeyboardtecladoJanela do teclado.-
Fields inherited from class totalcross.ui.Edit
alignment, ALL_LOWER, ALL_NORMAL, ALL_UPPER, autoSelect, back0, back1, blinkListener, calculator, calendar, canMoveFocus, capitalise, caption, captionColor, captionIcon, captionPress, chars, clipboardDelay, commandStr, copyStr, CURRENCY, currencyCharsSet, cursorShowing, cursorThickness, cursorX, cutStr, DATE, dateSet, drawLine, editable, fColor, focusColor, forceBackgroundColor, fourColors, gap, hasBorder, hasCursorWhenNotEditable, hasFocus, insertPos, isMaskedEdit, KBD_CALCULATOR, KBD_CALENDAR, KBD_DEFAULT, KBD_KEYBOARD, KBD_NONE, KBD_NUMERIC, KBD_TIME, kbdType, keyboard, keyboardTitle, lineColor, mask, masked, materialCaption, maxLength, mode, NORMAL, npback, numbersSet, numeric, oldBounds, optionalValue4CalculatorBox, overwrite, PASSWORD, PASSWORD_ALL, pasteStr, persistentSelection, prefH, pushedInsertPos, pushedStartSelectPos, pushedxOffset, rangeCheck, removeFocusOnAction, replaceStr, selectLast, showKeyboardOnNextEvent, startSelectPos, time, useFillAsPreferred, useNativeNumericPad, useNumericBoxInsteadOfCalculator, validChars, virtualKeyboard, xMax, xMin, xOffset
-
Fields inherited from class totalcross.ui.Control
AFTER, alphaValue, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, BRIGHTER_BACKGROUND, callListenersOnAllTargets, CENTER, CENTER_OF, clearValueInt, clearValueStr, DARKER_BACKGROUND, DP, effect, enableUpdateScreen, esce, eventsEnabled, FILL, fillColor, FIT, floating, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, FONTSIZE, foreColor, height, ignoreInsets, isHighlighting, isTablet, KEEP, keepDisabled, keepEnabled, LEFT, next, nextTabControl, npParts, offscreen, offscreen0, onEventFirst, parent, PARENTSIZE, PARENTSIZEMAX, PARENTSIZEMIN, PREFERRED, prev, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, SCREENSIZE, SCREENSIZEMAX, SCREENSIZEMIN, setFont, setH, setRel, setW, setX, SETX_NOT_SET, setY, tempW, textShadowColor, TOP, translucentShape, transparentBackground, uiAdjustmentsBasedOnFontHeightIsSupported, uiAndroid, UICONST, uiFlat, uiHolo, uiMaterial, uiVista, visible, width, WILL_RESIZE, x, y
-
-
Constructor Summary
Constructors Constructor Description KeyboardEdit()Construtor padrão.KeyboardEdit(java.lang.String mask)Construtor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetText()Método que retorna o valor que está sendo exibido.java.lang.StringgetTextFull()Método que retorna o valor que está sendo exibido.booleanisCharValid(char c)Mudando a visibilidade do Método para public.voidsetCursorPosEnd()voidsetMaxLength(int length)Seta o tamanho maximo que esse campo pode tervoidsetText(java.lang.String value)Método que seta o texto que será exibido no edit.-
Methods inherited from class totalcross.ui.Edit
charPos2x, clear, clipboardCopy, clipboardCut, clipboardPaste, draw, getCaptionIconHeightFactor, getCaptionIconPadding, getCopy, getCursorPos, getDecimalPlaces, getDefaultCurrencyMask, getKeyboardType, getLength, getMask, getMaterialCaption, getMaxLength, getMode, getPreferredHeight, getPreferredWidth, getTextBuffer, getTextWithoutMask, getTextY, getTotalCharWidth, getTrimmedLength, getValue, getX0, handleGeographicalFocusChangeKeys, hideSip, isEditable, mapKeys, onBoundsChanged, onColorsChanged, onEvent, onFontChanged, onPaint, onWindowPaintFinished, popPosState, popupKCC, popupsHidden, pushPosState, setCaptionIconHeightFactor, setCaptionIconPadding, setCursorPos, setCursorPos, setDecimalPlaces, setEditable, setKeyboard, setMode, setMode, setRect, setText, setValidChars, setValue, shiftScreen, shiftTo, willOpenKeyboard
-
Methods inherited from class totalcross.ui.Control
_onEvent, addEnabledStateListener, addFocusListener, addFontChangeHandler, addGridListener, addHandler, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addSizeChangeHandler, addTimer, addTimer, addTimerListener, addValueChangeHandler, addWindowListener, bringToFront, changeHighlighted, contains, drawTranslucentBackground, getAbsoluteRect, getBackColor, getDoEffect, getEffectH, getEffectW, getEffectX, getEffectY, getEventListeners, getFont, getForeColor, getGap, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPressedEvent, getPrev, getRect, getSize, getTextShadowColor, getWidth, getX, getX2, getY, getY2, hadParentScrolled, hasFocus, internalSetEnabled, intXYWH, isActionEvent, isChildOf, isDisplayed, isEnabled, isFloating, isInsideOrNear, isObscured, isTopMost, isVisible, isVisibleAndInside, post, postEvent, postPressedEvent, releaseScreenShot, removeEnabledStateListener, removeFocusListener, removeGridListener, removeHandler, removeHighlightListener, removeKeyListener, removeListContainerListener, removeMouseListener, removeMultiTouchListener, removePenListener, removePressListener, removePushNotificationListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, reposition, repositionChildren, requestFocus, resetSetPositions, resetStyle, safeRepaintNow, safeUpdateScreen, sendToBack, setBackColor, setBackForeColors, setDoEffect, setEnabled, setFloating, setFocusLess, setFont, setForeColor, setNinePatch, setNinePatch, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary
-
-
-
-
Field Detail
-
keyboardOn
protected static boolean keyboardOn
Sinaliza se o teclado está acionado para todos os Edits.
-
maxLength2
protected java.lang.Integer maxLength2
tamanho maximo.
-
teclado
protected VirtualKeyboard teclado
Janela do teclado.
-
-
Method Detail
-
setText
public void setText(java.lang.String value)
Método que seta o texto que será exibido no edit.- Specified by:
setTextin interfaceTextControl- Overrides:
setTextin classEdit- Parameters:
value- Texto.
-
getText
public java.lang.String getText()
Método que retorna o valor que está sendo exibido. o Valor é retornado com os espaços em branco dos lados do valor, removidos (trim()).- Specified by:
getTextin interfaceTextControl- Overrides:
getTextin classEdit- Returns:
- String Valor exibido.
- See Also:
Edit.getTextWithoutMask()
-
getTextFull
public java.lang.String getTextFull()
Método que retorna o valor que está sendo exibido. o Valor é retornado com os espaços em branco dos lados do valor.- Returns:
- String Valor exibido.
-
setMaxLength
public void setMaxLength(int length)
Seta o tamanho maximo que esse campo pode ter- Overrides:
setMaxLengthin classEdit
-
isCharValid
public boolean isCharValid(char c)
Mudando a visibilidade do Método para public. Esse Método verifica se um caractere pode ser escrito nesse determinado edit- Overrides:
isCharValidin classEdit
-
setCursorPosEnd
public void setCursorPosEnd()
-
-