Package totalcross.ui
Class OutlinedEdit
- java.lang.Object
-
- totalcross.ui.gfx.GfxSurface
-
- totalcross.ui.Control
-
- totalcross.ui.Edit
-
- totalcross.ui.OutlinedEdit
-
- All Implemented Interfaces:
UpdateListener,HasValue<java.lang.String>,TextControl
public class OutlinedEdit extends Edit implements UpdateListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class totalcross.ui.Control
Control.TranslucentShape
-
-
Field Summary
Fields Modifier and Type Field Description static intANIMATION_TIMEprotected intborderHeightThe height, in pixels, of the border of the image used in the Ninepatch, if you won't change the ninepatch then you shouldn't change this fieldinttotalTime-
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, 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, 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 OutlinedEdit()OutlinedEdit(java.lang.String mask)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddraw(Graphics g)intgetBorderHeight()Returns the borderHeight.voidonEvent(Event event)Called by the system to pass events to the edit control.voidsetBorderHeight(int borderHeight)Sets the borderHeight, this number should be the height of the border of your ninepatch in pixels.voidsetNinePatch(Image img)Set the NinePatch of the control.voidsetNinePatch(Image img, int borderHeight)Set the NinePatch of the control.voidsetText(java.lang.String s)Sets the text displayed in the edit control.voidupdateListenerTriggered(int elapsedMilliseconds)Called regularly by the system.-
Methods inherited from class totalcross.ui.Edit
charPos2x, clear, clipboardCopy, clipboardCut, clipboardPaste, getCaptionIconHeightFactor, getCaptionIconPadding, getCopy, getCursorPos, getDecimalPlaces, getDefaultCurrencyMask, getKeyboardType, getLength, getMask, getMaterialCaption, getMaxLength, getMode, getPreferredHeight, getPreferredWidth, getText, getTextBuffer, getTextWithoutMask, getTextY, getTotalCharWidth, getTrimmedLength, getValue, getX0, handleGeographicalFocusChangeKeys, hideSip, isCharValid, isEditable, mapKeys, onBoundsChanged, onColorsChanged, onFontChanged, onPaint, onWindowPaintFinished, popPosState, popupKCC, popupsHidden, pushPosState, setCaptionIconHeightFactor, setCaptionIconPadding, setCursorPos, setCursorPos, setDecimalPlaces, setEditable, setKeyboard, setMaxLength, 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, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary
-
-
-
-
Field Detail
-
totalTime
public int totalTime
-
ANIMATION_TIME
public static final int ANIMATION_TIME
- See Also:
- Constant Field Values
-
borderHeight
protected int borderHeight
The height, in pixels, of the border of the image used in the Ninepatch, if you won't change the ninepatch then you shouldn't change this field
-
-
Method Detail
-
setNinePatch
public void setNinePatch(Image img)
Set the NinePatch of the control. This is used to draw the background image. If you change the Ninepatch you should then change the borderHeight usingsetBorderHeight().- Overrides:
setNinePatchin classControl- Parameters:
img- The image with guides to make the NinePatch. The image must be on a NinePatch format
-
setNinePatch
public void setNinePatch(Image img, int borderHeight)
Set the NinePatch of the control. This is used to draw the background image. This also changes the borderHeight.- Parameters:
img- The image with guides to make the NinePatch. The image must be on a NinePatch formatborderHeight- The height, in pixels, of the border of the image used in the Ninepatch.
-
onEvent
public void onEvent(Event event)
Description copied from class:EditCalled by the system to pass events to the edit control.
-
setText
public void setText(java.lang.String s)
Description copied from class:EditSets the text displayed in the edit control. If you're setting the text in CURRENCY mode, the text must be set not formatted (unmasked).- Specified by:
setTextin interfaceTextControl- Overrides:
setTextin classEdit
-
updateListenerTriggered
public void updateListenerTriggered(int elapsedMilliseconds)
Description copied from interface:UpdateListenerCalled regularly by the system.- Specified by:
updateListenerTriggeredin interfaceUpdateListener- Parameters:
elapsedMilliseconds- number of milliseconds since the last UpdateListenerTriggered call
-
getBorderHeight
public int getBorderHeight()
Returns the borderHeight.
-
setBorderHeight
public void setBorderHeight(int borderHeight)
Sets the borderHeight, this number should be the height of the border of your ninepatch in pixels.
-
-