public class TextImpl extends Text<ChuiOutputManager>
Text
) implementation.Text.ContentMnemonic<G extends OutputManager<?>>
Modifier and Type | Field and Description |
---|---|
private ContentResolver |
resolver
The content resolver for TEXT, LITERAL and FILL-IN widgets, in ChUI drivers.
|
assigned, contentMnemonic
browse, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, useUnderline
config
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
TextImpl(WidgetId id,
TextConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
int |
adjustCursor(int key,
int pos,
int max)
Allow the widget to adjust the cursor position, after a key was pressed.
|
void |
draw(Color color)
Actual drawing routine.
|
java.lang.String |
getText(boolean isInternal)
Get screen representation of the data.
|
protected int |
nativeHeight()
Retrieve the widget's height in native units.
|
protected int |
nativeWidth()
Retrieve the widget's width in native units.
|
clear, copyState, display, drawCaret, editableNativeDimension, focusTraversable, getInitialCursorPos, getNativeCursorPos, isFocusable, processKeyEvent, setValue
activate, activate, adjustEditScroller, afterConfigUpdate, blankScreenValue, clear, createLeftAnchor, createRightAnchor, currentFocus, defaultFocus, draw, getCurrentFormat, getCursorOffset, getDataEntryReturn, getDrawText, getEditScroller, getFirstInGroup, getFormat, getInsertMode, getLastOffset, getScreenValue, getText, getValidCursorPos, getValue, getVariable, height, initialize, invalidateSelection, isAtField, isDrawLine, isFormatCheck, isInAutoReturn, isLeftEdgeWidget, isLinkedToBrowse, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, isZapToBeApplied, refresh, refresh, requestFocus, reset, resetCaret, resetEditScroller, setAttrFormat, setBrowse, setCursorOffset, setDataType, setEnabled, setForceLeft, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setSize, setTextGroup, setUnderline, setValue, setZapMode, setZapMode, silentActivation, toString, update, updateCursorOffsetValue, updateSize, updateZapState, width
config, defaultMousePtr, destroy, getColon, getColumnLabelText, getColumnMnemonic, getLabelInstance, getLabelText, getMnemonic, getTo, isForceLabel, isModified, isNoLabels, postprocessConfig, setColumnMnemonic, setHidden, setLabelInstance, setMnemonic, setNoLabels, setVisible, setWasVisible, wasVisible
minimumSize
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, cycleFocus, detach, dimension, doLayout, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChange, remove, removeContainerStateListener, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
removeSelectedText, setSelection
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, dimension, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, insets, isCurrent, isDirectManipulable, isDisplayed, isDroppable, isEnabled, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, topLevelWindow, unrealize, window
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
createMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, updateMnemonic
private final ContentResolver resolver
public TextImpl(WidgetId id, TextConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public void draw(Color color)
draw
in class FillIn<ChuiOutputManager,TextConfig>
color
- Color for drawing.public int adjustCursor(int key, int pos, int max)
For TEXT widgets, in ChUI the cursor can not go past the maximum cursor position.
adjustCursor
in interface EditableField
adjustCursor
in class FillIn<ChuiOutputManager,TextConfig>
key
- The pressed key.pos
- The cursor position computed by the display format.max
- The maximum cursor position.public java.lang.String getText(boolean isInternal)
The work is delegated to the ContentResolver.getText(boolean)
API.
getText
in class FillIn<ChuiOutputManager,TextConfig>
isInternal
- If this flag is set to true
then alternative variable value is used
when available.protected int nativeWidth()
nativeWidth
in class FillIn<ChuiOutputManager,TextConfig>
protected int nativeHeight()
nativeHeight
in class FillIn<ChuiOutputManager,TextConfig>