public abstract class FillIn<O extends OutputManager<?>,C extends FillInConfig> extends LabeledDataContainer<O,C> implements EditableField, TextSelection
Modifier and Type | Class and Description |
---|---|
private class |
FillIn.LocalFocusListener
Some actions on focus hanging.
|
private class |
FillIn.NoOpScroller
A no-op implementation of the
EditScroller class. |
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private BaseDataType |
appVar
Variable which is bound to this widget.
|
private boolean |
autoFormat
Track if format set explicitly or it is determined automatically.
|
private BaseDataType |
backupVar
Variable which stores our data value at the most recent enable.
|
protected Browse<O> |
browse
Browse widget to notify.
|
private double |
deltaWidth
Width delta for the header mode.
|
protected boolean |
drawLine
Draw line instead of last line of spaces if height is greater than 1.
|
protected EditScroller |
editScroller
The active scroller, used when the fill-in is editable.
|
private boolean |
forceLeft
Flag to force left alignment.
|
private boolean |
formatCheck
Hard format check state flag.
|
private boolean |
groupMode
TEXT clause mode state.
|
private boolean |
inAutoReturn
Processing the AUTO-RETURN event.
|
protected boolean |
justActivated
Is field just activated by Tab.
|
private boolean |
keyApplied
Indicates whether the key has been applied to the next row (in group
mode).
|
protected EditScroller |
leftAnchor
The left edge anchor instance.
|
private int |
offsCursor
Cursor's offset in widget.
|
private boolean |
pendingNoZap
Indicates whether zap mode should be reset.
|
protected EditScroller |
rightAnchor
The right edge anchor instance.
|
protected boolean |
selected
Track 'selected' state.
|
private boolean |
skipActivation
Skip next activation event.
|
private boolean |
skipHelpAdjustment
Indicates whether we should skip help string adjustment on focus
gaining.
|
protected boolean |
useUnderline
Use underline attribute if enabled.
|
config
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
FillIn(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.
|
void |
activate(boolean isEntry)
The last setup before editing starts.
|
int |
adjustCursor(int key,
int pos,
int max)
Allow the widget to adjust the cursor position, after a key was pressed.
|
protected void |
adjustEditScroller(int key)
Adjust the edit scroller depending on the key being processed and the cursor location.
|
void |
afterConfigUpdate(C beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
protected java.lang.String |
blankScreenValue(DisplayFormat.Presentation curPres,
int fmtWidth)
Implements screen value blanking when BLANK modifier is used.
|
void |
clear()
Clear input variable.
|
void |
clear(int selectionStart,
int selectionEnd)
Clear the specified selection from the input variable.
|
private void |
clearOverride()
Clear any temporary display override so that future drawing will be
based upon our standard data and format.
|
private boolean |
completeEdit()
Completes edit and checks the result.
|
protected EditScroller |
createLeftAnchor()
Create the left-edge scroller.
|
protected EditScroller |
createRightAnchor()
Create the right-edge scroller.
|
Widget<O> |
currentFocus()
Returns this component directly because it is not an usual container and
have no child components.
|
Widget<O> |
defaultFocus()
Returns this component directly because it is not an usual container and
have no child components.
|
void |
display()
Fills data structures from variable's value.
|
void |
draw()
Draws text.
|
abstract void |
draw(Color color)
Actual drawing routine.
|
abstract 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 abstract NativeDimension |
editableNativeDimension()
Determine the portion of the widget's editable part.
|
boolean |
focusTraversable()
This component will receive an input focus when Tab or Shift-Tab is
pressed.
|
DisplayFormat |
getCurrentFormat()
Get current active format.
|
int |
getCursorOffset()
Returns the cursor's offset from the left bound of the FillIn.
|
protected boolean |
getDataEntryReturn()
Convenience method to get access to SESSION:DATA-ENTRY-RETURN attribute.
|
java.lang.String |
getDrawText(char fill)
Obtains the text that should be rendered, handling any processing of a password field.
|
EditScroller |
getEditScroller()
Get the active
EditScroller . |
FillIn<O,C> |
getFirstInGroup()
Get reference to first widget in TEXT group.
|
java.lang.String |
getFormat()
Returns format definition string.
|
protected boolean |
getInsertMode()
Returns the insert mode state.
|
(package private) FillIn<O,C> |
getLastInGroup()
Get reference to last widget in the TEXT group.
|
int |
getLastOffset()
Returns the last valid cursor position from the left bound of the
FillIn.
|
private java.lang.String |
getLastWord(int limit)
Retrieve last word(s) from the buffer.
|
private java.lang.String |
getLeadingWords(int size)
Get leading words from the text buffer.
|
protected abstract int |
getNativeCursorPos()
Get the cursor position, in native units.
|
private Widget<O> |
getNextAfterGroup()
Get focus traversable widget which is right before the TEXT group in TAB
order.
|
private FillIn<O,C> |
getNextInGroup()
Get next component in TEXT clause group.
|
private int |
getNumLeadingSpaces()
Get number of leading spaces in the text before first non-space
character.
|
private Widget<O> |
getPrevBeforeGroup()
Get focus traversable widget which is right before the TEXT group in TAB
order.
|
private FillIn<O,C> |
getPrevInGroup()
Get previous component in TEXT clause group.
|
java.lang.String |
getScreenValue(boolean isInternal)
Get the screen representation of the current content, adjusted using the display format
(if the request is for the internal usage).
|
java.lang.String |
getText()
Get screen representation of the data.
|
java.lang.String |
getText(boolean isInternal)
Main worker routine for the
FillIn text accessor. |
protected int |
getValidCursorPos()
Get valid cursor position.
|
BaseDataType |
getValue()
Getting the BaseDataType object representing the current value.
|
BaseDataType |
getVariable()
Returns a reference to the variable of this widget.
|
double |
height()
Get widget height.
|
void |
initialize(WidgetId id,
C 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.
|
private void |
insertWord(java.lang.String word,
boolean override)
Insert word at the beginning of the existing text.
|
private void |
internalActivation(FillIn<O,C> source)
Prepares fill-in for internal activation inside TEXT group.
|
void |
invalidateSelection()
Invalidate the text selection state.
|
boolean |
isAtField()
Get status of @ field flag.
|
boolean |
isDrawLine()
Get current state of the flag responsible for drawing line.
|
private boolean |
isFirstInGroup()
Check if component is first in the TEXT clause group.
|
boolean |
isFormatCheck()
Get current state of hard format check flag.
|
boolean |
isInAutoReturn()
Reports if this widget is currently processing AUTO-RETURN.
|
private boolean |
isLastInGroup()
Check if component is last in the TEXT clause group.
|
protected boolean |
isLeftEdgeWidget()
Check if this instance is a left-edge component in the parent
container.
|
boolean |
isLinkedToBrowse()
|
boolean |
isRightAligned()
Get widget alignment policy.
|
boolean |
isRightAlignedInt()
Get internal widget alignment policy.
|
protected boolean |
isRightEdgeWidget()
Check if this instance is a right-edge component in the parent
container.
|
boolean |
isSelected()
Return
true if last draw(Color) was performed
with colors other than regular. |
boolean |
isSelectionValid()
Check if currently there is some selected text.
|
boolean |
isZapActive()
Determines whether auto-zap mode is active.
|
boolean |
isZapToBeApplied()
Determines whether auto-zap mode should be applied.
|
protected abstract int |
nativeHeight()
Retrieve the widget's height in native units.
|
protected abstract int |
nativeWidth()
Retrieve the widget's width in native units.
|
private boolean |
partOfGroup(Widget<O> comp)
Check if given widget is part of the same group as this widget.
|
void |
processKeyEvent(KeyInput ke)
Process KeyEvents for this widget.
|
private boolean |
refill(boolean insert,
int key)
Refill content after insertion or deletion of characters.
|
protected void |
refresh()
Refresh widget.
|
void |
requestFocus()
Requesting the focus to the
FillIn . |
void |
reset()
Reset widget content.
|
void |
resetCaret()
Resets position of terminal's cursor.
|
protected void |
resetEditScroller()
Reset the edit scroller to the initial state.
|
boolean |
setAttrFormat(java.lang.String format)
Sets new display format.
|
void |
setBrowse(Browse<O> browse)
Link editor with the
Browse widget. |
void |
setCursorOffset(int offset)
Sets the cursor's offset from the left bound of the FillIn.
|
void |
setDataType(java.lang.String dataType)
Set type of the bound variable.
|
private void |
setDrawDateSeparators(boolean drawSeparators)
If fill-in displays a date value, it forces separators for the unknown
date value to be drawn or not in the subsequent value rendering (applies
to editing mode only).
|
void |
setEnabled(boolean enable)
Enable/disable the widget for editing.
|
void |
setForceLeft(boolean forceLeft)
Sets the flag to force left alignment.
|
void |
setFormatCheck(boolean formatCheck)
Set format check flag.
|
void |
setHeaderParm(boolean drawLine,
double deltaWidth)
Control how to handle last row of the empty space during drawing.
|
void |
setInAutoReturn(boolean inAutoReturn)
Assigns the flag that this widget is currently processing AUTO-RETURN.
|
void |
setInsertMode(boolean mode)
Changes the insert mode state in the window and the data presentation.
|
void |
setPendingNoZap()
Reset the zap mode.
|
void |
setSize(double width,
double height)
Sets new widget's size.
|
void |
setTextGroup(boolean enable)
Turn on/off text group (word wrap) mode.
|
void |
setUnderline(boolean underline)
Let widget to not use underline attribute (for use in
Browse widget). |
void |
setValue(BaseDataType value)
Sets the new variable value in the fill-in.
|
void |
setValue(BaseDataType value,
java.lang.String fmt)
Sets the new variable value in the fill-in.
|
private void |
setValueInt(BaseDataType value)
Set value and preserve state of the insert mode and cursor offset.
|
private void |
setWindowInsertMode(boolean mode)
Changes the insert mode state in the window.
|
void |
setZapMode(boolean enable)
Set zap mode (when it is ON, next key-press will clear the data).
|
void |
setZapMode(boolean enable,
boolean force)
Set zap mode (when it is ON, next key-press will clear the data).
|
void |
silentActivation(Widget<O> source,
int newPos)
Skip next activation request.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
boolean |
update()
Updates variable's value with current field's content.
|
protected void |
updateCursorOffsetValue()
Update value of the cursor offset in fill-in configuration (so it can be synchronized with
server).
|
protected void |
updateSize()
Synchronizes the actual size with the default size.
|
protected void |
updateZapState()
Update value of the zap mode in fill-in configuration (so it can be synchronized with
server).
|
double |
width()
Get widget 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
getInitialCursorPos
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 BaseDataType appVar
private BaseDataType backupVar
private int offsCursor
varDataPres
is null
.protected boolean justActivated
private boolean groupMode
protected boolean useUnderline
protected boolean drawLine
private double deltaWidth
private boolean autoFormat
protected Browse<O extends OutputManager<?>> browse
private boolean forceLeft
private boolean skipActivation
private boolean inAutoReturn
private boolean skipHelpAdjustment
private boolean keyApplied
private boolean pendingNoZap
protected boolean selected
private boolean formatCheck
protected EditScroller editScroller
protected final EditScroller leftAnchor
protected final EditScroller rightAnchor
public FillIn(WidgetId id, FillInConfig cfg)
Call initialize(com.goldencode.p2j.ui.WidgetId, C)
to finish the widget initialization.
id
- The widget's ID.cfg
- Configuration data.protected abstract int nativeWidth()
protected abstract int nativeHeight()
public abstract void drawCaret()
drawCaret
in interface Widget<O extends OutputManager<?>>
drawCaret
in class AbstractWidget<O extends OutputManager<?>>
public abstract void draw(Color color)
color
- Color for drawing.protected abstract int getNativeCursorPos()
protected abstract NativeDimension editableNativeDimension()
Usually, this follows the widget's format length.
public EditScroller getEditScroller()
EditScroller
.public void initialize(WidgetId id, C cfg)
This API is called after the widget is created and added to the registry.
initialize
in interface WidgetWithConfig<C extends FillInConfig>
id
- The widget's ID.cfg
- The config used to initialize this widget.public void setEnabled(boolean enable)
RECALL
key.setEnabled
in interface Widget<O extends OutputManager<?>>
setEnabled
in class AbstractWidget<O extends OutputManager<?>>
enable
- true
to enable editing in this widget.public void setUnderline(boolean underline)
Browse
widget).underline
- New state of the underlining.public void setForceLeft(boolean forceLeft)
forceLeft
- true
to force left alignment of this field.public BaseDataType getValue()
getValue
in interface DataContainer
public void requestFocus()
FillIn
.requestFocus
in interface Widget<O extends OutputManager<?>>
requestFocus
in class FixedSizeContainer<O extends OutputManager<?>>
public void activate()
Presentation.activate().
This method is automatically called on focusGained
event.public void activate(boolean isEntry)
Presentation.activate().
This method is automatically called on focusGained
event.isEntry
- Flag indicating that an ENTRY event was generated prior to
this activate call.public void display()
public boolean update()
true
value may also mean
that FillIn contains unsupported (?????) value. It not
an error but variable's values isn't changed.public BaseDataType getVariable()
public java.lang.String getFormat()
public int getCursorOffset()
public int getLastOffset()
public void setCursorOffset(int offset)
offset
- New offset.public void resetCaret()
public void setZapMode(boolean enable)
setZapMode(boolean, boolean)
for more information).enable
- Zap mode. true
for ON, false
for OFF,public void setZapMode(boolean enable, boolean force)
enable
- Zap mode. true
for ON, false
for OFF,force
- If true
then set mode unconditionally, otherwise AUTO-RETURN processing
is honored (during AUTO-RETURN processing, zap mode should not be re-enabled in case
the focus is forced back to the widget, the 4GL doesn't zap then).public void draw()
DisplayFormat.Presentation
instance is
rendered into screen value. Screen value is left justified or padded to
the right bound with spaces. Non first lines are filled with spaces. If
FillIn is focused then after rendering terminal's cursor is set to
appropriate position in the widget.draw
in interface Widget<O extends OutputManager<?>>
draw
in class AbstractContainer<O extends OutputManager<?>>
public java.lang.String getText()
getText
in interface DataContainer
public DisplayFormat getCurrentFormat()
public boolean isRightAligned()
isRightAligned
in interface LabeledWidget<O extends OutputManager<?>>
isRightAligned
in class LabeledDataContainer<O extends OutputManager<?>,C extends FillInConfig>
true
if widget is formatted for right alignment.public boolean isRightAlignedInt()
true
if widget is formatted for right alignment.public void processKeyEvent(KeyInput ke)
DisplayFormat
and DisplayFormat.Presentation
instances. The latter instance may be absent but in this case only ZAP
and CLEAR actions are possible which will generate new
DisplayFormat.Presentation
instance.
Here is the list of the handled keys and the corresponding actions:
KA_BACKSPACE
. Erases one symbol before
the cursor position via deleteBack()
method;
KA_BACK_TAB
. Requests container to switch
input focus to the previous widget in the tab sequence;
KA_CLEAR
. Calls
DisplayFormat.clear()
method to make new
presentation;
KA_CURSOR_LEFT
, KA_CURSOR_RIGHT
.
Moves cursor by one position using moveCursorLeft()
and moveCursorRight()
methods;
KA_CURSOR_UP
, KA_CURSOR_DOWN
.
Moves cursor one line or down
KA_DELETE_CHARACTER
. Erases one symbol at the cursor
position via deleteCurrent()
method;
KA_HOME
Moves cursor to the bound of FillIn using moveCursorBegin()
KA_INSERT_MODE
.
Switches insert mode through Window
class;
insert()
or
overwrite()
is called after this;
KA_RECALL
Restores the original contents of the FillIn;
KA_RETURN
and KA_TAB
.
Requests container to switch input focus to the next widget in
the tab sequence;
processKeyEvent
in interface Widget<O extends OutputManager<?>>
processKeyEvent
in class AbstractContainer<O extends OutputManager<?>>
ke
- Key event structure.protected void refresh()
public void clear()
public void clear(int selectionStart, int selectionEnd)
selectionStart
- The start selection index (inclusive).selectionEnd
- The end selection index (exclusive).public void reset()
public java.lang.String getText(boolean isInternal)
FillIn
text accessor.isInternal
- If this flag is set to true
then alternative variable value is used
when available.public java.lang.String getDrawText(char fill)
fill
- The character to use for password masking.public java.lang.String getScreenValue(boolean isInternal)
isInternal
- If this flag is set to true
then alternative variable value is used
when available.public void setInsertMode(boolean mode)
mode
- New state.
false
- overwrite mode,
true
- insert mode.
protected boolean getDataEntryReturn()
public void setSize(double width, double height)
setSize
in interface Container<O extends OutputManager<?>>
setSize
in class AbstractContainer<O extends OutputManager<?>>
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 boolean focusTraversable()
focusTraversable
in interface Widget<O extends OutputManager<?>>
focusTraversable
in class AbstractContainer<O extends OutputManager<?>>
true
if this component is enabled and visible.public Widget<O> currentFocus()
currentFocus
in interface Container<O extends OutputManager<?>>
currentFocus
in class AbstractContainer<O extends OutputManager<?>>
Container.currentFocus()
public Widget<O> defaultFocus()
defaultFocus
in interface Container<O extends OutputManager<?>>
defaultFocus
in class AbstractContainer<O extends OutputManager<?>>
Container.defaultFocus()
public boolean setAttrFormat(java.lang.String format) throws DisplayFormatParsingException
format
- New display format definition string.true
if format was changed and false
otherwise.DisplayFormatParsingException
- Unrecognized variable type or invalid format string.public void setValue(BaseDataType value)
setValue
in interface DataContainer
value
- New value for the screen buffer.public void setValue(BaseDataType value, java.lang.String fmt)
value
- New value for the screen buffer. May be a temporary override
of the value with differently formatted data (it may even
be of a different data type).fmt
- An optional format string to use with this value. This will
temporarily override the current format string. If specified
this will also cause the value
to be detected as
a temporary override (even if the data type is the same as
the "permanent" data type). If null
, then no
format string change is made and a temporary override of the
value
will only be detected if the data types
differ.public boolean isAtField()
public void setHeaderParm(boolean drawLine, double deltaWidth)
drawLine
- If this parameter is true
then last row of the
space occupied by widget is drawn as horizontal line.deltaWidth
- Extra horizontal space which will be occupied by widget in
header mode.public boolean isDrawLine()
public double height()
height
in interface Widget<O extends OutputManager<?>>
height
in class AbstractContainer<O extends OutputManager<?>>
public double width()
width
in interface Widget<O extends OutputManager<?>>
width
in class AbstractContainer<O extends OutputManager<?>>
public java.lang.String toString()
AbstractWidget
toString
in class AbstractWidget<O extends OutputManager<?>>
Object.toString()
public void setTextGroup(boolean enable)
enable
- New state of the word wrap mode.private void clearOverride()
protected void updateSize()
public void setDataType(java.lang.String dataType)
dataType
- New data type name.public void setBrowse(Browse<O> browse)
Browse
widget.browse
- The instance of the Browse
to link with.public boolean isLinkedToBrowse()
public boolean isZapActive()
true
if auto-zap mode is active.public boolean isZapToBeApplied()
true
if auto-zap should be applied.public void setPendingNoZap()
FillIn<O,C> getLastInGroup()
public FillIn<O,C> getFirstInGroup()
public boolean isSelected()
true
if last draw(Color)
was performed
with colors other than regular.public void setFormatCheck(boolean formatCheck)
formatCheck
- public boolean isFormatCheck()
public void setInAutoReturn(boolean inAutoReturn)
inAutoReturn
- true
if the widget is processing AUTO-RETURN.public boolean isInAutoReturn()
true
if the widget is processing AUTO-RETURN.public void silentActivation(Widget<O> source, int newPos)
source
- Source widget which looses the focus.newPos
- New cursor position.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 return the unchanged cursor position.
adjustCursor
in interface EditableField
key
- The pressed key.pos
- The cursor position computed by the display format.max
- The maximum cursor position.public void afterConfigUpdate(C beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<C extends FillInConfig>
afterConfigUpdate
in class LabeledDataContainer<O extends OutputManager<?>,C extends FillInConfig>
beforeUpdate
- protected EditScroller createLeftAnchor()
no-op
.protected EditScroller createRightAnchor()
no-op
.protected boolean isRightEdgeWidget()
true
if this component is a right-edge component
in the frame.protected boolean isLeftEdgeWidget()
true
if this component is a left-edge component
in the frame.protected void resetEditScroller()
protected void adjustEditScroller(int key)
key
- The currently processed key.protected int getValidCursorPos()
protected boolean getInsertMode()
false
- overwrite mode,
true
- insert mode.
public void invalidateSelection()
invalidateSelection
in interface TextSelection
public boolean isSelectionValid()
isSelectionValid
in interface TextSelection
true
if text is selected.protected void updateCursorOffsetValue()
protected void updateZapState()
protected java.lang.String blankScreenValue(DisplayFormat.Presentation curPres, int fmtWidth)
curPres
- Effective screen value.fmtWidth
- Effective format width.private boolean completeEdit()
private void setWindowInsertMode(boolean mode)
mode
- New state.
false
- overwrite mode,
true
- insert mode.
private boolean refill(boolean insert, int key)
insert
- Mode of operation - true
means that character
was inserted.key
- The character which will be inserted.true
if after insertion operation cursor is
allowed to go to the next widget.private int getNumLeadingSpaces()
private void setValueInt(BaseDataType value)
value
- New value for the fill-in.private void internalActivation(FillIn<O,C> source)
source
- The widget which is about to trigger activation.private void insertWord(java.lang.String word, boolean override)
word
- The word to be inserted.override
- Mark special case of override mode.private java.lang.String getLastWord(int limit)
0
then last word is retrieved.limit
- The minimum length of the retrieved text.private java.lang.String getLeadingWords(int size)
size
- Total size of the words should be less than specified size.private boolean partOfGroup(Widget<O> comp)
comp
- The widget to check.true
if widget belongs to the same group.private FillIn<O,C> getPrevInGroup()
private FillIn<O,C> getNextInGroup()
private boolean isFirstInGroup()
true
if component is first in group.private boolean isLastInGroup()
true
if component is last in group.private Widget<O> getPrevBeforeGroup()
private Widget<O> getNextAfterGroup()
private void setDrawDateSeparators(boolean drawSeparators)
drawSeparators
- If true
then separators will be displayed for the
unknown date value.