public class TextGuiImpl extends Text<GuiOutputManager> implements AutoResizable<TextConfig>
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<?>>
Widget.ZOrderClass
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
browse, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, useUnderline
config
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.
|
void |
draw(Color color)
Draw this text.
|
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
|
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.
|
void |
updateSize(TextConfig beforeUpdate)
Update widget's size after config update
|
double |
width()
Get widget width.
|
clear, display, drawCaret, editableNativeDimension, focusTraversable, getInitialCursorPos, getNativeCursorPos, isFocusable, processKeyEvent, setValue
activate, activate, adjustCursor, adjustEditScroller, afterConfigUpdate, blankScreenValue, clear, createLeftAnchor, createRightAnchor, currentFocus, defaultFocus, draw, getCurrentFormat, getCursorOffset, getDataEntryReturn, getDrawText, getEditScroller, getFirstInGroup, getFormat, getInsertMode, getLastOffset, getScreenValue, getText, getValidCursorPos, getValue, getVariable, invalidateSelection, isAtField, isDrawLine, isFormatCheck, isInAutoReturn, isLeftEdgeWidget, isLinkedToBrowse, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, isZapToBeApplied, 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
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, 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, 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, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, minimumSize, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, 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 GuiFontResolver gfd
private GuiFontResolver gfi
private GuiDriver gd
public TextGuiImpl(WidgetId id, TextConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public 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 FillIn<GuiOutputManager,TextConfig>
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 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 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>
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.