public class FillInImpl extends FillIn<ChuiOutputManager,FillInConfig> implements AutoResizable<FillInConfig>
| Modifier and Type | Class and Description |
|---|---|
private class |
FillInImpl.LeftAnchorEditScroller
Content scroller implementation when the anchor is positioned on the left-side editable edge.
|
private class |
FillInImpl.RightAnchorEditScroller
Content scroller implementation when the anchor is positioned on the right-side editable edge.
|
| Modifier and Type | Field and Description |
|---|---|
private ContentResolver |
resolver
The content resolver for TEXT, LITERAL and FILL-IN widgets, in ChUI drivers.
|
browseColumn, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, skipCursorActivation, useUnderlineconfiglisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
FillInImpl(WidgetId id,
FillInConfig 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.
|
protected EditScroller |
createLeftAnchor()
Create the left-edge scroller.
|
protected EditScroller |
createRightAnchor()
Create the right-edge scroller.
|
void |
draw(Color color)
Actual drawing routine.
|
void |
drawCaret()
Sets position of terminal's cursor which may or may not be the same as
the actual cursor location within the widget.
|
protected NativeDimension |
editableNativeDimension()
Determine the portion of the widget's editable part.
|
int |
getInitialCursorPos()
Compute the initial cursor position, depending on the widget's implementation.
|
protected int |
getNativeCursorPos()
Get the cursor position, in native units.
|
java.lang.String |
getText(boolean isInternal)
Main worker routine for the
FillIn text accessor. |
boolean |
isAutoResize()
Get the AUTO-RESIZE status
|
protected int |
nativeHeight()
Retrieve the widget's height in native units.
|
protected int |
nativeWidth()
Retrieve the widget's width in native units.
|
void |
setSize(double width,
double height)
Sets new widget's size.
|
void |
updateSize(FillInConfig beforeUpdate)
Update widget's size after config update
|
activate, activate, adjustEditScroller, afterConfigUpdate, blankScreenValue, canMovetoTop, clear, clear, clear, clearWidget, copyState, currentFocus, defaultFocus, display, draw, fireValueChanged, focusTraversable, getBrowse, getCurrentFormat, getCursorOffset, getDataEntryReturn, getDrawText, getEditScroller, getFirstInGroup, getFormat, getInsertMode, getLastOffset, getScreenValue, getText, getTriggerWidget, getValidCursorPos, getValue, getVariable, height, initialize, initSelection, invalidateSelection, isAtField, isCharacterInGui, isDrawLine, isFormatCheck, isInAutoReturn, isIntegerInGui, isLeftEdgeWidget, isLinkedToBrowse, isPendingNoZap, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, isZapToBeApplied, processKeyEvent, refresh, refresh, requestFocus, reset, resetCaret, resetEditScroller, setAttrFormat, setBrowseColumn, setCursorOffset, setCursorOffset, setDataType, setEnabled, setForceLeft, setForceRight, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setSelection, setSkipCursorActivation, setTextGroup, setUnderline, setValue, setValue, setZapMode, setZapMode, silentActivation, toScreenValue, toString, update, updateCursorOffsetValue, updateSize, updateUIAfterValueSet, updateZapState, validateDisplayValue, widthconfig, defaultMousePtr, destroy, getColon, getColumnLabelText, getColumnMnemonic, getLabelInstance, getLabelText, getMnemonic, getTo, isForceLabel, isModified, isNoLabels, postprocessConfig, setColumnMnemonic, setHidden, setLabelInstance, setMnemonic, setNoLabels, setVisible, setWasVisible, wasVisibleminimumSize, requestFocusadd, 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, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setTabItemList, setWidth, startSizeChange, swap, 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, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, 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, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealized, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waiteditPaste, isEditCanUndo, removeSelectedText, setSelectionacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, completeTrigger, dimension, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, insets, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, 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, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, widgetStateChanged, windowmouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleasedgetChangedValuecreateMnemonic, getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, updateMnemonicwidgetsAsListprivate final ContentResolver resolver
public FillInImpl(WidgetId id, FillInConfig cfg)
id - The widget's ID.cfg - Configuration data.public void setSize(double width,
double height)
setSize in interface Container<ChuiOutputManager>setSize in class FillIn<ChuiOutputManager,FillInConfig>width - The width component of the new size.height - The height component of the new size. Will be forced to 1
if width is positive and this value is less than
or equal to 0.public void drawCaret()
drawCaret in interface Widget<ChuiOutputManager>drawCaret in class FillIn<ChuiOutputManager,FillInConfig>public void draw(Color color)
draw in class FillIn<ChuiOutputManager,FillInConfig>color - Color for drawing.public int getInitialCursorPos()
In ChUI, the initial cursor position is always on the left-side text edge.
getInitialCursorPos in interface EditableFieldpublic java.lang.String getText(boolean isInternal)
FillIn text accessor.
It delegates the work to the associated feeder instance.
getText in class FillIn<ChuiOutputManager,FillInConfig>isInternal - If this flag is set to true then alternative
variable value is used when available.public int adjustCursor(int key,
int pos,
int max)
For FILL-INs, this will adjust the anchor on which the text is scrolling, if the cursor is set on the left or right edge.
This implementation will keep the cursor on the rightmost char, if the right edge is reached.
adjustCursor in interface EditableFieldadjustCursor in class FillIn<ChuiOutputManager,FillInConfig>key - The pressed key.pos - The cursor position computed by the display format.max - The maximum cursor position.public boolean isAutoResize()
isAutoResize in interface AutoResizable<FillInConfig>true is AUTO-RESIZE is enabledpublic void updateSize(FillInConfig beforeUpdate)
updateSize in interface AutoResizable<FillInConfig>beforeUpdate - previous value of the widget's configprotected int getNativeCursorPos()
getNativeCursorPos in class FillIn<ChuiOutputManager,FillInConfig>protected EditScroller createLeftAnchor()
createLeftAnchor in class FillIn<ChuiOutputManager,FillInConfig>protected EditScroller createRightAnchor()
createRightAnchor in class FillIn<ChuiOutputManager,FillInConfig>protected NativeDimension editableNativeDimension()
For ChUI widgets, this is the same as the widget's physical dimension.
editableNativeDimension in class FillIn<ChuiOutputManager,FillInConfig>protected int nativeWidth()
nativeWidth in class FillIn<ChuiOutputManager,FillInConfig>protected int nativeHeight()
nativeHeight in class FillIn<ChuiOutputManager,FillInConfig>