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.
|
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private ContentResolver |
resolver
The content resolver for TEXT, LITERAL and FILL-IN widgets, in ChUI drivers.
|
browse, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, useUnderline
config
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, clear, clear, currentFocus, defaultFocus, display, draw, focusTraversable, 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, processKeyEvent, refresh, requestFocus, reset, resetCaret, resetEditScroller, setAttrFormat, setBrowse, setCursorOffset, setDataType, setEnabled, setForceLeft, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setTextGroup, setUnderline, setValue, 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, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, cycleFocus, detach, dimension, doLayout, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, remove, repaint, replace, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setWidth, startSizeChange, unrealize, updateSizeWorker, widgets
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, 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, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestSync, resizeTo, 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 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 EditableField
public 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 EditableField
adjustCursor
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>