public class TextGuiImpl extends Text<GuiOutputManager> implements AutoResizable<TextConfig>, StreamableWidget
Text) implementation.| Modifier and Type | Class and Description |
|---|---|
protected static class |
TextGuiImpl.GuiContentMnemonic
Container class for the TEXT's content mnemonic.
|
Text.ContentMnemonic<G extends OutputManager<?>>| Modifier and Type | Field and Description |
|---|---|
private GuiDriver |
gd
Screen driver
|
private GuiFontResolver |
gfd
Font resolver - for container purposes.
|
private GuiFontResolver |
gfi
Font resolver - for display purposes.
|
assigned, contentMnemonic, forcedAsTextbrowseColumn, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, skipCursorActivation, useUnderlineconfiglisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
TextGuiImpl(WidgetId id,
TextConfig cfg)
Special constructor used to restore component using given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
TextConfig |
config()
Provide access to the attributes stored in the widget.
|
Widget<?> |
convertToStreamable()
Convert this widget instance to its streamable equivalent.
|
MnemonicInfo |
createMnemonic()
Creates new
MnemonicInfoGuiImpl instance. |
void |
draw(Color color)
Draw this text.
|
MnemonicTrait |
getContentMnemonic()
Obtain the current content mnemonic.
|
int |
getParentContainerBgColorRgb()
Get the color used to draw the enclosing container background.
|
java.lang.String |
getText(boolean isInternal)
Main worker routine for the text accessor.
|
double |
height()
Get widget height.
|
void |
initialize(WidgetId id,
TextConfig cfg)
Replacement API for the logic which should exist in the widget's c'tor, but the logic
can't be executed as it depends on the widget being registered into the official registry.
|
boolean |
isAutoResize()
Get the AUTO-RESIZE status
|
boolean |
isFocusable()
Checks whether this attribute container can receive focus generally.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
protected int |
nativeHeight()
Retrieve the widget's height in native units.
|
private int |
nativeHeight(boolean display)
Retrieve the widget's height in native units.
|
protected int |
nativeWidth()
Retrieve the widget's width in native units.
|
private int |
nativeWidth(boolean display)
Retrieve the widget's width in native units.
|
boolean |
processMnemonic(int key)
Process the given key, if this widget's mnemonic matches the key.
|
protected void |
refresh(boolean delayed)
Refresh widget.
|
void |
updateSize(TextConfig beforeUpdate)
Update widget's size after config update
|
double |
width()
Get widget width.
|
canMovetoTop, clear, copyState, display, drawCaret, editableNativeDimension, focusTraversable, getInitialCursorPos, getNativeCursorPos, ignoreEnable, label, setValueactivate, activate, adjustCursor, 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, initSelection, invalidateSelection, isAtField, isCharacterInGui, isDrawLine, isFormatCheck, isInAutoReturn, isIntegerInGui, isLeftEdgeWidget, isLinkedToBrowse, isPendingNoZap, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, isZapToBeApplied, processKeyEvent, refresh, requestFocus, reset, resetCaret, resetEditScroller, setAttrFormat, setBrowseColumn, setCursorOffset, setCursorOffset, setDataType, setEnabled, setForceLeft, setForceRight, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setSelection, setSize, setSkipCursorActivation, setTextGroup, setUnderline, setValue, setZapMode, setZapMode, silentActivation, toScreenValue, toString, update, updateCursorOffsetValue, updateSize, updateUIAfterValueSet, updateZapState, validateDisplayValuedefaultMousePtr, 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, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, 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, 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, waitconvertToStreamableisDelimiter, isUnderlined, linkTo, postprocessConfig, setEmptyModeOff, setEmptyModeOn, setRightAligned, setWidthacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, completeTrigger, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, initialHeight, initialWidth, insets, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, 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, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, windowmouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleasededitPaste, isEditCanUndo, removeSelectedText, setSelectiongetChangedValuegetMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, updateMnemonicwidgetsAsListprivate GuiFontResolver gfd
private GuiFontResolver gfi
private GuiDriver gd
public TextGuiImpl(WidgetId id, TextConfig cfg)
id - The widget's ID.cfg - Configuration data.public Widget<?> convertToStreamable()
convertToStreamable in interface StreamableWidgetpublic void initialize(WidgetId id, TextConfig cfg)
This API is called after the widget is created and added to the registry.
initialize in interface WidgetWithConfig<TextConfig>initialize in class Text<GuiOutputManager>id - The widget's ID.cfg - The config used to initialize this widget.public boolean processMnemonic(int key)
processMnemonic in interface Widget<GuiOutputManager>processMnemonic in class AbstractWidget<GuiOutputManager>key - The pressed mnemonic key code.false, as TEXT widgets can't process the key.public MnemonicInfo createMnemonic()
MnemonicInfoGuiImpl instance.createMnemonic in interface MnemonicTrait<GuiOutputManager>MnemonicInfoGuiImpl instance.public void draw(Color color)
draw in class FillIn<GuiOutputManager,TextConfig>color - Color for drawing.public java.lang.String getText(boolean isInternal)
getText in class FillIn<GuiOutputManager,TextConfig>isInternal - If this flag is set to true then alternative variable value is used
when available.public boolean isAutoResize()
isAutoResize in interface AutoResizable<TextConfig>true is AUTO-RESIZE is enabledpublic void updateSize(TextConfig beforeUpdate)
updateSize in interface AutoResizable<TextConfig>beforeUpdate - previous value of the widget's configpublic TextConfig config()
config in interface Label<GuiOutputManager>config in interface Widget<GuiOutputManager>config in interface ConfigOwner<TextConfig>config in class LabeledDataContainer<GuiOutputManager,TextConfig>public double width()
width in interface Widget<GuiOutputManager>width in class FillIn<GuiOutputManager,TextConfig>public double height()
height in interface Widget<GuiOutputManager>height in class FillIn<GuiOutputManager,TextConfig>public boolean isFocusable()
isFocusable in interface Widget<GuiOutputManager>isFocusable in class AbstractWidget<GuiOutputManager>true if this container can be focused under
certain conditions. false if, and only if, this
attribute container can never receive focus.public int getParentContainerBgColorRgb()
protected void refresh(boolean delayed)
refresh in class FillIn<GuiOutputManager,TextConfig>delayed - Flag indicating if the drawing should be immediately or delayed.protected int[] mouseActions()
mouseActions in class AbstractWidget<GuiOutputManager>protected int nativeWidth()
nativeWidth in class FillIn<GuiOutputManager,TextConfig>protected int nativeHeight()
nativeHeight in class FillIn<GuiOutputManager,TextConfig>private int nativeWidth(boolean display)
display - true if this is called during drawing.private int nativeHeight(boolean display)
display - true if this is called during drawing.public MnemonicTrait getContentMnemonic()