public class FillInGuiImpl extends FillIn<GuiOutputManager,FillInConfig> implements AutoResizable<FillInConfig>, StreamableWidget, LightweightTextWidget
Modifier and Type | Class and Description |
---|---|
private class |
FillInGuiImpl.LeftAnchorEditScroller
Content scroller implementation when the anchor is positioned on the left-side editable edge.
|
private class |
FillInGuiImpl.RightAnchorEditScroller
Content scroller implementation when the anchor is positioned on the right-side editable edge.
|
LightweightTextWidget.TextLineSelection
Modifier and Type | Field and Description |
---|---|
private boolean |
bypassFocusInit
Flag indicating initialization is not needed on a focus-gained event, as it was treated
explicitly by some other logic (like mouse clicked).
|
protected ColorRgb |
disabledFore
Disabled state text color.
|
protected boolean |
disabledForeFixedColor
true if the foreground color of a disabled field is fixed (grey). |
private boolean |
dragInProgress
Flag indicating the drag operation is in progress now.
|
private int |
focusedCursorOffset
The cursor offset when widget loosing the focus to restore in some cases when focus is back.
|
private GuiDriver |
gd
Screen driver
|
private GuiFontResolver |
gf
Font resolver
|
private boolean |
lastIsMenuMouse
Flag to indicate if the last mouse button pressed was the menu button.
|
private int[] |
xLettersEnd
Cache for array of the letters end coordinates for screen value.
|
private int |
xLettersStart
Cache for text starting positon.
|
browseColumn, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, skipCursorActivation, useUnderline
config
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
FillInGuiImpl(WidgetId id,
FillInConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
The last setup before editing starts.
|
protected void |
adjustEditScroller(int key,
boolean printable)
Adjust the edit scroller depending on the key being processed and the cursor location.
|
protected java.lang.String |
blankScreenValue(DisplayFormat.Presentation curPres,
int fmtWidth)
Implements screen value blanking when BLANK modifier is used.
|
Widget<?> |
convertToStreamable()
Convert this widget instance to its streamable equivalent.
|
protected EditScroller |
createLeftAnchor()
Create the left-edge scroller.
|
MnemonicInfo |
createMnemonic()
Creates new
MnemonicInfoGuiImpl instance. |
protected EditScroller |
createRightAnchor()
Create the right-edge scroller.
|
void |
display()
Fills data structures from variable's value.
|
private void |
dragInit(java.lang.String screenText)
Get the current cursor position by the mouse position within the current grag operation.
|
void |
draw(Color aColor)
Actual drawing routine.
|
protected void |
drawBorder(GuiColorResolver gcd,
int x,
int y,
NativeDimension dim,
boolean threeDBorder)
Draws the border box around the fill-in.
|
void |
drawCaret()
Draws the caret.
|
protected void |
drawCaretInt()
Draws the caret.
|
void |
drawCursor()
Draws a special cursor relative to the current origin.
|
protected NativeDimension |
editableNativeDimension()
Determine the interior portion of the widget.
|
private NativePoint |
editableNativeLocation()
Compute the location of the fill-in's editable content, relative to the fill-in's top-left
corner.
|
void |
focusAndSelect()
Sets focus to widget and selects all current content.
|
int |
getCursorColumnOffset()
Gets the current cursor column within its text content.
|
int |
getCursorRowOffset()
Gets the current cursor row within its text content.
|
private int |
getDragOffset(int xDrag)
Get the current cursor position by the mouse position within the current grag operation.
|
GuiFontResolver.FontCache |
getFontCache()
Returns the current font cache.
|
int |
getInitialCursorPos()
Compute the initial cursor position, depending on the widget's implementation.
|
protected boolean |
getInsertMode()
Returns the insert mode state.
|
int |
getLastOffset()
Returns the last valid cursor position from the left bound of the FillIn.
|
protected int |
getNativeCursorPos()
Get the cursor position, in native units, as it would be positioned in the fully-visible
text.
|
private int |
getOffset(java.lang.String stxt,
java.awt.event.MouseEvent e)
Get the current cursor position by the mouse position within the given text.
|
java.lang.String |
getScreenText()
Gets the screen text content.
|
java.lang.String |
getScreenText(int line)
Gets the screen text content.
|
int |
getScrollColumnOffset()
Gets the current scroll offset within its text content.
|
int |
getScrollRowOffset()
Gets the current scroll offset within its text content.
|
java.lang.String |
getSelectedText()
Obtain any selected text in the widget for copying to the clipboard.
|
protected Theme.TextLookAndFeel |
getTextLookAndFeel(GuiColorResolver gcd,
GuiColorResolver gce)
Returns text look and feel.
|
LightweightTextWidget.TextLineSelection |
getTextSelection(int line)
Gets the current text selection object for the given line.
|
protected int |
getValidCursorPos()
Get valid cursor position.
|
void |
initialize(WidgetId id,
FillInConfig 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.
|
void |
initSelection()
Resets the selection state for fill-in widget depending on the content.
|
void |
invalidateSelection()
Invalidate the text selection state.
|
boolean |
isAutoResize()
Get the AUTO-RESIZE status
|
protected boolean |
isCharacterInGui()
Check is we have character variable based fill-in in GUI mode.
|
boolean |
isDroppable()
Checks if the given widget is able to be the target of the drop operation.
|
boolean |
isRMBEntrySupported()
Check if this widget gains ENTRY event when right/middle mouse button is clicked.
|
protected boolean |
isTextSelectionDisplayed()
Tests if the text selection is displayed.
|
private boolean |
isUninitialized()
Check if this fill-in acts as "uninitialized".
|
boolean |
isZapToBeApplied()
Determines whether auto-zap mode should be applied.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Handle the mouse dragged events in order to support fillin functionality.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Notification of a mouse pressed event occurred for this widget.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Notification of a mouse released event occurred for this widget.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Notification of a mouse wheel moved event occurred for this widget.
|
private void |
moveCursorToFirst()
Move the cursor to the leftmost index.
|
protected void |
moveCursorToLast()
Move the cursor to the rightmost index.
|
protected int |
nativeHeight()
Retrieve the widget's height in native units.
|
protected int |
nativeWidth()
Retrieve the widget's width in native units.
|
protected static int |
nativeWidth(FillIn<GuiOutputManager,?> widget,
GuiDriver gd,
GuiFontResolver gf,
boolean isText)
Compute the widget's width in native units.
|
void |
processKeyEvent(KeyInput ke)
Process GUI specific keys:
VK_SHIFT_CURSOR_RIGHT - expands text selection to the right.
VK_SHIFT_CURSOR_LEFT - expands text selection to the left.
VK_SHIFT_HOME - expands text selection to the first char.
VK_SHIFT_END - expands text selection to the last char.
VK_CTRL_A - selects the entire content.
KA_COPY - copies the selected text to the OS clipboard.
KA_CUT - copies and deletes the selected text.
KA_PASTE - inserts the OS cliboard content into the widget.
|
boolean |
processMnemonic(int key)
Process the given key, if this widget's mnemonic matches the key.
|
protected void |
refresh(boolean delayed)
Refresh widget by performing an immediate drawing.
|
void |
removeSelectedText()
Removes selected text.
|
void |
resetCaret()
Resets position of terminal's cursor.
|
protected void |
resetEditScroller()
Reset the edit scroller to the initial state.
|
void |
selectAll()
Select the entire text.
|
private void |
setCursorOffset(java.lang.String stxt,
java.awt.event.MouseEvent e)
Sets the current cursor position by the mouse position within the given text.
|
boolean |
setSelection(int start,
int end)
Creates a new selection, eventually dropping the already existing one.
|
Menu<GuiOutputManager> |
showPopupMenu(java.awt.event.MouseEvent e,
java.lang.Runnable dismissHandler)
The method shows the popup menu for this widget.
|
boolean |
supportsCustomMousePointer()
Check if the widget supports LOAD-MOUSE-POINTER() method
|
private NativePoint |
textNativeLocation()
Compute the fill-in's content location, adjusted so that only the required portion will be
visible.
|
protected void |
updateCursorOffsetValue()
Update value of the cursor offset in fill-in configuration (so it can be synchronized with server).
|
void |
updateSize(FillInConfig beforeUpdate)
Update widget's size after config update
|
activate, adjustCursor, afterConfigUpdate, canMovetoTop, clear, clear, clear, clearWidget, copyState, currentFocus, defaultFocus, draw, fireValueChanged, focusTraversable, getBrowse, getCurrentFormat, getCursorOffset, getDataEntryReturn, getDrawText, getEditScroller, getFirstInGroup, getFormat, getScreenValue, getText, getText, getTriggerWidget, getValue, getVariable, height, isAtField, isDrawLine, isFormatCheck, isInAutoReturn, isLeftEdgeWidget, isLinkedToBrowse, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, refresh, requestFocus, reset, setAttrFormat, setBrowseColumn, setCursorOffset, setDataType, setEnabled, setForceLeft, setForceRight, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setSize, setTextGroup, setUnderline, setValue, setValue, setZapMode, setZapMode, silentActivation, toScreenValue, toString, update, 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, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseEntered, mouseExited, mouseMoved, 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, 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, sync, topLevelWindow, translate, unregisterWidgetStateListener, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
convertToStreamable
editPaste, isEditCanUndo
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, dimension, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getState, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, insets, isCurrent, isDirectManipulable, isDirectManipulationActive, isDisplayed, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isRealized, isRepaintDisabled, 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, raiseLegacyMouseEvents, refreshWidget, registerWidgetStateListener, repaint, repaint, repaint, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetStateListener, widgetStateChanged, window
getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, updateMnemonic
widgetsAsList
private GuiDriver gd
private GuiFontResolver gf
private boolean bypassFocusInit
protected ColorRgb disabledFore
protected boolean disabledForeFixedColor
true
if the foreground color of a disabled field is fixed (grey).
false
if the foreground color of a disabled field is defined by the FGCOLOR
attribute.private boolean lastIsMenuMouse
private int[] xLettersEnd
private int xLettersStart
private boolean dragInProgress
private int focusedCursorOffset
public FillInGuiImpl(WidgetId id, FillInConfig cfg)
Call initialize(com.goldencode.p2j.ui.WidgetId, com.goldencode.p2j.ui.FillInConfig)
to finish the widget initialization.
id
- The widget's ID.cfg
- Configuration data.public Widget<?> convertToStreamable()
convertToStreamable
in interface StreamableWidget
public void resetCaret()
resetCaret
in class FillIn<GuiOutputManager,FillInConfig>
public void display()
display
in class FillIn<GuiOutputManager,FillInConfig>
public boolean supportsCustomMousePointer()
supportsCustomMousePointer
in interface Widget<GuiOutputManager>
supportsCustomMousePointer
in class AbstractWidget<GuiOutputManager>
true
if the widget supports
LOAD-MOUSE-POINTER() methodprotected static int nativeWidth(FillIn<GuiOutputManager,?> widget, GuiDriver gd, GuiFontResolver gf, boolean isText)
widget
- The FILL-IN or TEXT widget.gd
- The GUI driver in use.gf
- The font resolver.isText
- true
if this is for a TEXT widget.public void initialize(WidgetId id, FillInConfig cfg)
This API is called after the widget is created and added to the registry.
initialize
in interface WidgetWithConfig<FillInConfig>
initialize
in class FillIn<GuiOutputManager,FillInConfig>
id
- The widget's ID.cfg
- The config used to initialize this widget.protected int nativeWidth()
nativeWidth
in class FillIn<GuiOutputManager,FillInConfig>
protected int nativeHeight()
nativeHeight
in class FillIn<GuiOutputManager,FillInConfig>
public int getLastOffset()
getLastOffset
in class FillIn<GuiOutputManager,FillInConfig>
public boolean processMnemonic(int key)
processMnemonic
in interface Widget<GuiOutputManager>
processMnemonic
in class AbstractWidget<GuiOutputManager>
key
- The pressed mnemonic key code.true
if this widget accepted this mnemonic key. Not enabled or not
visible widget will not accept it.public MnemonicInfo createMnemonic()
MnemonicInfoGuiImpl
instance.createMnemonic
in interface MnemonicTrait<GuiOutputManager>
MnemonicInfoGuiImpl
instance.public void mousePressed(java.awt.event.MouseEvent e)
If the widget is not already focused, it forces the focus to it. After the focus was received, it computes the caret location, based on the mouse position over the widget's content.
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public Menu<GuiOutputManager> showPopupMenu(java.awt.event.MouseEvent e, java.lang.Runnable dismissHandler)
AbstractWidget.resolvePopupMenuId()
.showPopupMenu
in class AbstractWidget<GuiOutputManager>
e
- The related mouse event that caused a popup to be shown.dismissHandler
- When not null, the runnable instance is executed when the popup menu is dismissed, regardless
whether an item is chosen or not.null
if no popup is resolved for this widget.public void mouseDragged(java.awt.event.MouseEvent e)
If the fillin is enabled and has focus, it will re-adjust the selected text depending on where the mouse is moving.
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
mouseWheelMoved
in class AbstractWidget<GuiOutputManager>
e
- The mouse event.public void processKeyEvent(KeyInput ke)
VK_SHIFT_CURSOR_RIGHT
- expands text selection to the right.VK_SHIFT_CURSOR_LEFT
- expands text selection to the left.VK_SHIFT_HOME
- expands text selection to the first char.VK_SHIFT_END
- expands text selection to the last char.VK_CTRL_A
- selects the entire content.KA_COPY
- copies the selected text to the OS clipboard.KA_CUT
- copies and deletes the selected text.KA_PASTE
- inserts the OS cliboard content into the widget.processKeyEvent
in interface Widget<GuiOutputManager>
processKeyEvent
in class FillIn<GuiOutputManager,FillInConfig>
ke
- Key event structure.public void drawCaret()
drawCaret
in interface Widget<GuiOutputManager>
drawCaret
in class FillIn<GuiOutputManager,FillInConfig>
public void draw(Color aColor)
draw
in class FillIn<GuiOutputManager,FillInConfig>
aColor
- Color for drawing.protected void drawBorder(GuiColorResolver gcd, int x, int y, NativeDimension dim, boolean threeDBorder)
threeDBorder
- Indicates whether 3d or flat border should be drawn.protected Theme.TextLookAndFeel getTextLookAndFeel(GuiColorResolver gcd, GuiColorResolver gce)
gcd
- The gui color resolver used for normal text.gce
- The gui color resolver used for selected text.public int getInitialCursorPos()
In GUI, the initial cursor position is always on the right-side text edge.
getInitialCursorPos
in interface EditableField
public java.lang.String getSelectedText()
getSelectedText
in interface Widget<GuiOutputManager>
getSelectedText
in class AbstractWidget<GuiOutputManager>
null
if there is no selected text or if the
widget type does not support clipboard operations.protected int[] mouseActions()
mouseActions
in class AbstractWidget<GuiOutputManager>
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 configpublic boolean isRMBEntrySupported()
isRMBEntrySupported
in interface Widget<GuiOutputManager>
isRMBEntrySupported
in class AbstractWidget<GuiOutputManager>
true
if this widget gains ENTRY event
when right/middle mouse button is clicked.public void invalidateSelection()
invalidateSelection
in interface TextSelection
invalidateSelection
in class FillIn<GuiOutputManager,FillInConfig>
public void selectAll()
public void removeSelectedText()
removeSelectedText
in interface TextSelection
public boolean setSelection(int start, int end)
setSelection
in interface TextSelection
start
- The offset of the start of the new selection.end
- The offset of the end of the new selection.true
is operation is successful.public boolean isDroppable()
isDroppable
in interface Widget<GuiOutputManager>
TRUE
if this widget can be droppable at this time,
FALSE
otherwise.public boolean isZapToBeApplied()
isZapToBeApplied
in class FillIn<GuiOutputManager,FillInConfig>
true
if auto-zap should be applied.public void focusAndSelect()
protected void updateCursorOffsetValue()
updateCursorOffsetValue
in class FillIn<GuiOutputManager,FillInConfig>
protected boolean isTextSelectionDisplayed()
protected void drawCaretInt()
protected void adjustEditScroller(int key, boolean printable)
adjustEditScroller
in class FillIn<GuiOutputManager,FillInConfig>
key
- The currently processed key.printable
- Flag indicating if this is a printable key.protected int getValidCursorPos()
getValidCursorPos
in class FillIn<GuiOutputManager,FillInConfig>
protected int getNativeCursorPos()
getNativeCursorPos
in class FillIn<GuiOutputManager,FillInConfig>
protected boolean getInsertMode()
getInsertMode
in class FillIn<GuiOutputManager,FillInConfig>
false
.protected void resetEditScroller()
resetEditScroller
in class FillIn<GuiOutputManager,FillInConfig>
protected void refresh(boolean delayed)
refresh
in class FillIn<GuiOutputManager,FillInConfig>
delayed
- Flag indicating if the drawing should be immediately or delayed.protected EditScroller createLeftAnchor()
createLeftAnchor
in class FillIn<GuiOutputManager,FillInConfig>
protected EditScroller createRightAnchor()
createRightAnchor
in class FillIn<GuiOutputManager,FillInConfig>
protected NativeDimension editableNativeDimension()
For GUI widgets, this is the physical dimension without the insets.
editableNativeDimension
in class FillIn<GuiOutputManager,FillInConfig>
protected java.lang.String blankScreenValue(DisplayFormat.Presentation curPres, int fmtWidth)
blankScreenValue
in class FillIn<GuiOutputManager,FillInConfig>
curPres
- Effective screen value.fmtWidth
- Effective format width.protected boolean isCharacterInGui()
isCharacterInGui
in class FillIn<GuiOutputManager,FillInConfig>
true
if fill-in variable is CHARACTER running in GUI mode,
false
otherwise.private NativePoint editableNativeLocation()
private NativePoint textNativeLocation()
The returned location is relative to the fill-in's top-left corner, and the X coordinate may be negative. When used during drawing, the clipping rectangle ensures that nothing is drawn outside of the required area.
public void activate()
Presentation.activate().
This method is automatically called on focusGained
event.activate
in class FillIn<GuiOutputManager,FillInConfig>
public void initSelection()
initSelection
in class FillIn<GuiOutputManager,FillInConfig>
protected void moveCursorToLast()
private void moveCursorToFirst()
private boolean isUninitialized()
true
if the fill-in is in the ScreenBuffer.UNINITIALIZED
state.private int getOffset(java.lang.String stxt, java.awt.event.MouseEvent e)
stxt
- The given texte
- The mouse event holding the current mouse coordinatesprivate void dragInit(java.lang.String screenText)
screenText
- The curreent screen value for the textprivate int getDragOffset(int xDrag)
xDrag
- The X mouse position for drag eventprivate void setCursorOffset(java.lang.String stxt, java.awt.event.MouseEvent e)
stxt
- The given texte
- The mouse event holding the current mouse coordinatespublic void drawCursor()
drawCursor
in interface LightweightTextWidget
public java.lang.String getScreenText(int line)
getScreenText
in interface LightweightTextWidget
line
- The given line numberpublic java.lang.String getScreenText()
getScreenText
in interface LightweightTextWidget
public int getCursorColumnOffset()
getCursorColumnOffset
in interface LightweightTextWidget
public int getCursorRowOffset()
getCursorRowOffset
in interface LightweightTextWidget
public int getScrollColumnOffset()
getScrollColumnOffset
in interface LightweightTextWidget
public int getScrollRowOffset()
getScrollRowOffset
in interface LightweightTextWidget
public GuiFontResolver.FontCache getFontCache()
getFontCache
in interface LightweightTextWidget
public LightweightTextWidget.TextLineSelection getTextSelection(int line)
getTextSelection
in interface LightweightTextWidget
line
- The given line number