public class EntryFieldGuiImpl extends FillInGuiImpl
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private DisplayFormat |
cbxFormat
Local format used as alternative for comboboxes of other subtype tan DROP-DOWN-LIST.
|
private ComboBoxGuiImpl |
comboBoxRef
Reference to the possible combo-box object.
|
private boolean |
focusTraversable
Local focus traversable flag.
|
private GuiDriver |
gd
Screen driver
|
disabledFore, disabledForeFixedColor
browse, drawLine, editScroller, justActivated, leftAnchor, rightAnchor, selected, useUnderline
config
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
EntryFieldGuiImpl(FillInConfig cfg,
ComboBoxGuiImpl cbbRef)
Special constructor used to restore component using given configuration.
|
EntryFieldGuiImpl(WidgetId id,
FillInConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
display()
Fills data structures from variable's value.
|
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 |
drawSelection(java.lang.String txt,
int font,
int clipWidth,
int clipHeight,
ColorRgb fgColor,
ColorRgb bgColor)
Draws the selected part of the etry field.
|
protected NativeDimension |
editableNativeDimension()
Determine the portion of the widget's editable part.
|
boolean |
enforceDefaultMousePtr()
Check if the default mouse pointer should be used regardless of
the parent settings
|
boolean |
focusTraversable()
Check if widget is focus traversable.
|
protected boolean |
getDataEntryReturn()
Convenience method to get access to SESSION:DATA-ENTRY-RETURN attribute.
|
MousePtrWrapper |
getEffectiveMousePointer()
Get the current effective custom mouse pointer
|
double |
height()
Get widget height.
|
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.
|
boolean |
isThreeD()
The combo editor is never 3D.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Notification of a mouse pressed event occurred for this widget.
|
void |
processKeyEvent(KeyInput ke)
Process GUI specific keys for combo-box entry field:
SE_VALUE_CHANGED - inform combo-box the value changed.
|
double |
width()
Get widget width.
|
adjustEditScroller, blankScreenValue, createLeftAnchor, createMnemonic, createRightAnchor, draw, drawCaretInt, drawSelectionInt, getInitialCursorPos, getInsertMode, getLastOffset, getNativeCursorPos, getSelectedText, getValidCursorPos, invalidateSelection, isAutoResize, isRMBEntrySupported, mouseActions, nativeHeight, nativeWidth, nativeWidth, processMnemonic, refresh, removeSelectedText, resetEditScroller, setSelection, supportsCustomMousePointer, updateSize
activate, activate, adjustCursor, afterConfigUpdate, clear, clear, currentFocus, defaultFocus, draw, getCurrentFormat, getCursorOffset, getDrawText, getEditScroller, getFirstInGroup, getFormat, getScreenValue, getText, getText, getValue, getVariable, isAtField, isDrawLine, isFormatCheck, isInAutoReturn, isLeftEdgeWidget, isLinkedToBrowse, isRightAligned, isRightAlignedInt, isRightEdgeWidget, isSelected, isSelectionValid, isZapActive, isZapToBeApplied, requestFocus, reset, resetCaret, setAttrFormat, setBrowse, setCursorOffset, setDataType, setEnabled, setForceLeft, setFormatCheck, setHeaderParm, setInAutoReturn, setInsertMode, setPendingNoZap, setSize, setTextGroup, setUnderline, setValue, setValue, setZapMode, setZapMode, silentActivation, toString, update, updateCursorOffsetValue, updateSize, updateZapState
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, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isTabStop, isTotallyObscured, isVisible, location, manageSystemActions, mouseDragged, mouseEntered, mouseExited, mouseMoved, 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, sync, topLevelWindow, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, dimension, displayPhysicalLocation, enclosingFrame, findMouseSource, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, insets, isDirectManipulable, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isTabStop, 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, topLevelWindow, unrealize, window
mouseEntered, mouseExited, mouseReleased
getMnemonicCharacter, getMnemonicKeyCode, getMnemonicLabel, isMnemonicSupported, updateMnemonic
private GuiDriver gd
private ComboBoxGuiImpl comboBoxRef
private boolean focusTraversable
private DisplayFormat cbxFormat
public EntryFieldGuiImpl(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 EntryFieldGuiImpl(FillInConfig cfg, ComboBoxGuiImpl cbbRef)
Call initialize(com.goldencode.p2j.ui.WidgetId, com.goldencode.p2j.ui.FillInConfig)
to finish the widget initialization.
cfg
- Configuration data.cbbRef
- Combo-box reference.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 FillInGuiImpl
id
- The widget's ID.cfg
- The config used to initialize this widget.public void processKeyEvent(KeyInput ke)
SE_VALUE_CHANGED
- inform combo-box the value changed.processKeyEvent
in interface Widget<GuiOutputManager>
processKeyEvent
in class FillInGuiImpl
ke
- Key event structure.protected boolean getDataEntryReturn()
getDataEntryReturn
in class FillIn<GuiOutputManager,FillInConfig>
public boolean focusTraversable()
focusTraversable
in interface Widget<GuiOutputManager>
focusTraversable
in class FillIn<GuiOutputManager,FillInConfig>
true
if widget is focus traversable.public double width()
width
in interface Widget<GuiOutputManager>
width
in class FillIn<GuiOutputManager,FillInConfig>
public double height()
height
in interface Widget<GuiOutputManager>
height
in class FillIn<GuiOutputManager,FillInConfig>
public void drawCaret()
drawCaret
in interface Widget<GuiOutputManager>
drawCaret
in class FillInGuiImpl
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 FillInGuiImpl
e
- The mouse event.public void mouseClicked(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.
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class FillInGuiImpl
e
- The mouse event.public MousePtrWrapper getEffectiveMousePointer()
getEffectiveMousePointer
in interface Widget<GuiOutputManager>
getEffectiveMousePointer
in class AbstractWidget<GuiOutputManager>
public boolean enforceDefaultMousePtr()
true
if the default mouse pointer should always be usedprotected NativeDimension editableNativeDimension()
For GUI widgets, this is the physical dimension without the insets.
editableNativeDimension
in class FillInGuiImpl
protected void drawSelection(java.lang.String txt, int font, int clipWidth, int clipHeight, ColorRgb fgColor, ColorRgb bgColor)
drawSelection
in class FillInGuiImpl
txt
- The text to draw.font
- The font details to use while text drawing.clipWidth
- The width of the clipping rectangle.clipHeight
- The height of the clipping rectangle.fgColor
- The text color.bgColor
- protected void drawBorder(GuiColorResolver gcd, int x, int y, NativeDimension dim, boolean threeDBorder)
drawBorder
in class FillInGuiImpl
threeDBorder
- Indicates whether 3d or flat border should be drawn.public boolean isThreeD()
isThreeD
in interface Widget<GuiOutputManager>
isThreeD
in class AbstractWidget<GuiOutputManager>
public void display()
display
in class FillIn<GuiOutputManager,FillInConfig>