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, forcedAsText
browseColumn, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, skipCursorActivation, 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.
|
boolean |
isFocusable()
Checks whether this attribute container can receive focus generally.
|
protected int |
nativeHeight()
Retrieve the widget's height in native units.
|
protected int |
nativeWidth()
Retrieve the widget's width in native units.
|
void |
processKeyEvent(KeyInput ke)
Intercept and ignore key events.
|
canMovetoTop, clear, copyState, display, drawCaret, editableNativeDimension, focusTraversable, getInitialCursorPos, getNativeCursorPos, ignoreEnable, initialize, label, setValue
activate, activate, adjustEditScroller, afterConfigUpdate, blankScreenValue, clear, clear, clearWidget, createLeftAnchor, createRightAnchor, currentFocus, defaultFocus, draw, fireValueChanged, getBrowse, getCurrentFormat, getCursorOffset, getDataEntryReturn, getDrawText, getEditScroller, getFirstInGroup, getFormat, getInsertMode, getLastOffset, getScreenValue, getText, getTriggerWidget, getValidCursorPos, getValue, getVariable, height, initSelection, invalidateSelection, isAtField, isCharacterInGui, isDrawLine, isFormatCheck, isInAutoReturn, isLeftEdgeWidget, isLinkedToBrowse, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, isZapToBeApplied, refresh, refresh, requestFocus, reset, resetCaret, resetEditScroller, setAttrFormat, setBrowseColumn, setCursorOffset, setDataType, setEnabled, setForceLeft, setForceRight, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setSize, setTextGroup, setUnderline, setValue, setZapMode, setZapMode, silentActivation, toScreenValue, toString, update, updateCursorOffsetValue, updateSize, updateZapState, validateDisplayValue, width
config, defaultMousePtr, destroy, getColon, getColumnLabelText, getColumnMnemonic, getLabelInstance, getLabelText, getMnemonic, getTo, isForceLabel, isModified, isNoLabels, postprocessConfig, setColumnMnemonic, setHidden, setLabelInstance, setMnemonic, setNoLabels, setVisible, setWasVisible, wasVisible
minimumSize, requestFocus
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, cycleFocus, deregisterSelectedWidget, detach, dimension, doLayout, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChange, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, 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, unregisterWidgetStateListener, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
config, isDelimiter, isUnderlined, linkTo, postprocessConfig, setEmptyModeOff, setEmptyModeOn, setRightAligned, setWidth
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, height, hidden, hide, highlighted, initialHeight, initialWidth, insets, isCurrent, isDirectManipulable, isDirectManipulationActive, isDisplayed, isDroppable, isEnabled, isHeader, isInitialValueLayout, isLegacyFocus, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetStateListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetStateListener, validateDisplayValue, widgetStateChanged, width, window
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
editPaste, isEditCanUndo, removeSelectedText, setSelection
createMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, updateMnemonic
widgetsAsList
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.public boolean isFocusable()
isFocusable
in interface Widget<ChuiOutputManager>
isFocusable
in class AbstractWidget<ChuiOutputManager>
true
if this container can be focused under
certain conditions. false
if, and only if, this
attribute container can never receive focus.public void processKeyEvent(KeyInput ke)
processKeyEvent
in interface Widget<ChuiOutputManager>
processKeyEvent
in class FillIn<ChuiOutputManager,TextConfig>
ke
- Key event structure.protected int nativeWidth()
nativeWidth
in class FillIn<ChuiOutputManager,TextConfig>
protected int nativeHeight()
nativeHeight
in class FillIn<ChuiOutputManager,TextConfig>