O - the output managerpublic abstract class AbstractWidget<O extends OutputManager<?>> extends java.lang.Object implements Widget<O>
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.Class<?>,java.lang.ref.WeakReference<Container<?>>> |
ancestorCache
The previously computed ancestor cache.
|
private boolean |
directManipulationActive
Flag indicating the direct manipulation handler registration.
|
private boolean |
enabled
Widget enabled flag.
|
private boolean |
firstEnabledDisabled
Flag to keep track if the call to setEnabled() is doing for the first time.
|
private java.util.ArrayList<FocusListener> |
focusListeners
Storage for focus listeners.
|
private boolean |
hidden
Widget hidden flag.
|
private boolean |
highlighted
Widget highlighted flag.
|
protected Insets |
insets
Widget insets
|
private boolean |
isOleDragDrop
Is an OLE Drag&Drop operation
|
private java.util.ArrayList<KeyListener> |
keyListeners
Storage for key listeners.
|
protected java.util.ArrayList<WidgetListener> |
listeners
List of listeners which require notifications about the state of this widget.
|
protected Point |
location
Widget origin (upper left corner) relative to container
expressed in character cell units.
|
protected static CentralLogger |
LOG
Logger.
|
private org.roaringbitmap.RoaringBitmap |
mouseActions
A set of mouse actions on which this widget can react.
|
private MouseHoverAction |
mouseHoverAction
Mouse hover event handler
|
protected java.util.Optional<MousePtrWrapper> |
mousePtr
Custom mouse pointer
|
protected NativeInsets |
nativeInsets
Widget native insets
|
private java.lang.ref.WeakReference<Container<O>> |
parent
Reference to parent container.
|
protected NativePoint |
physicalLocation
Widget physical origin (upper left corner) relative to
container.
|
private boolean |
popupKeyListnrAdded
true if and only if Menu.PopupKeyListener was added to this widget. |
private O |
screen
Reference to screen.
|
private Point |
screenLocation
The cached value of
screenLocation(). |
private NativePoint |
screenPhysicalLocation
The cached value of
screenPhysicalLocation(). |
private boolean |
sensitiveInDirectManipulation
Flag to keep widget sensitivity value in UIB or direct manipulation modes.
|
private boolean |
tooltipActive
Flag indicating if the widget's TOOLTIP can be activated.
|
private boolean |
visible
Widget visible flag.
|
private java.lang.ref.WeakReference<Window<O>> |
window
The cached widget's window.
|
| Constructor and Description |
|---|
AbstractWidget()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
private void |
_setEnabled(boolean enabled)
Update the
enabled flag in the configuration and in the widget's state. |
void |
_setHidden(boolean hidden)
Update the
hidden flag in the configuration and in the widget's state. |
void |
_setVisible(boolean visible)
Update the
visible flag in the configuration and in the widget's state. |
void |
activateDirectManipulation()
Activates direct manipulation engine for this widget.
|
void |
addFocusListener(FocusListener listener)
Add focus listener.
|
void |
addKeyListener(KeyListener listener)
Add key listener.
|
<C extends WidgetConfig> |
afterConfigUpdateBase(C beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
TitledWindow<O> |
ancestor()
Get ancestor window for this widget.
|
WidgetId |
ancestorId()
Get the ID of the ancestor window for this widget.
|
protected <C extends WidgetConfig> |
autoResize(C beforeUpdate)
Invoke auto-resize logic if needed
|
Rectangle |
bounds()
Get widget bounding rectangle.
|
void |
clear(Point origin,
Dimension size,
Color color)
Determine the widget's window and clear specified area of the screen.
|
boolean |
clearWidget()
Clear widget state on CLEAR FRAME call for the parent frame.
|
protected NativeRectangle |
clipRectangle()
Build widget clipped rectangle.
|
static NativeRectangle |
clipRectangle(NativePoint origin,
NativeDimension dimension)
Build clipped rectangle for given coordinates.
|
void |
clipWith(Rectangle rect)
Determine the widget's window and add a new clipping rectangle to the bitmap.
|
<W extends WidgetConfig> |
config()
Get externalizable widget config which can be used to restore widget
state after via network.
|
protected static void |
copyColors(BaseConfig source,
BaseConfig target)
Copy the bg/fg colors from the source config to the target config.
|
protected void |
copyState(Widget<?> w)
Copy the widget state from the specified source widget to this instance.
|
protected MouseHoverAction |
createMouseHoverAction()
Create handler for processing mouse hover events
|
void |
deactivateDirectManipulation()
Deactivates direct manipulation engine for this widget.
|
void |
debug(java.lang.String message)
Utility method for debugging, can be used to include information from the server-side
to the client-side log
|
void |
destroy()
Destroy this widget.
|
abstract Dimension |
dimension()
Get widget dimension.
|
protected void |
disable()
Disable widget.
|
void |
disableTooltip()
Disable the
tooltipActive flag and reset the mouseActions, so they will be rebuilt next
time this widget is processed to be sent to the JS web driver. |
NativePoint |
displayPhysicalLocation()
Get display location of widget in screen coordinates.
|
private void |
doTriggerContainerStateRedrawEnabled(AbstractContainer<O> c)
Calls
AbstractContainer.triggerContainerStateRedrawEnabled() on the supplied
container and all containers recursively down the widget tree. |
abstract void |
draw()
Draw widget.
|
void |
drawCaret()
Draw caret.
|
protected void |
enable()
Enable widget.
|
void |
enableTooltip()
Enable the
tooltipActive flag and reset the mouseActions, so they will be rebuilt next
time this widget is processed to be sent to the JS web driver. |
java.util.Optional<Frame<?>> |
enclosingFrame()
Get the enclosing FRAME if it exists
|
Widget<O> |
findMouseSource(NativePoint p)
Find the widget positioned just bellow the specified mouse position (in physical units).
|
boolean |
focusTraversable()
Check if widget is focus traversable.
|
boolean |
forceCursorOnFocus()
Check if widget needs in cursor to be on when having the input focus.
|
void |
forceVisibility(boolean visibility)
Force widget visibility change without associated repainting.
|
NativeRectangle |
getActualBounds()
Get the widget's actual bounds
|
ScreenBitmap |
getAndResetBitmap()
Determine the widget's window, get a copy of the current screen bitmap and reset clipping
entirely.
|
ScreenBitmap |
getAndSetBitmap(Rectangle rect)
Determine the widget's window, get a copy of the current screen bitmap and clip output
further so it is guaranteed not to go outside of the provided rectangle.
|
ScreenBitmap |
getBitmapCopy()
Determine the widget's window and get a copy of the current screen bitmap.
|
Point |
getCachedScreenLocation()
Get the cached value of
screenLocation(). |
NativePoint |
getCachedScreenPhysicalLocation()
Get the cached value of
screenPhysicalLocation(). |
java.util.Optional<MousePtrWrapper> |
getCustomMousePointer()
Get the current custom mouse pointer if it is set
|
int |
getDefaultEvent(KeyInput key,
boolean inEditingBlock)
Get the default event associated for this widget and the given key.
|
MousePtrWrapper |
getEffectiveMousePointer()
Get the current effective custom mouse pointer
|
WidgetId |
getId()
Widget ID.
|
java.util.Optional<MousePtrWrapper> |
getLoadedMousePointer()
Get the Loaded custom mouse pointer if it is set
|
int |
getMenuMouse()
Get the value of the MENU-MOUSE attribute
|
org.roaringbitmap.RoaringBitmap |
getMouseActions()
Get the mouse actions on which this widget can respond.
|
NativePoint |
getMousePosition()
Returns current mouse cursor position relative to the this widget.
|
NativePoint |
getPortableMouseEventCoordinates(NativePoint point)
Get a point to represent the LAST-EVENT:X and LAST-EVENT:Y coordinates.
|
java.lang.String |
getSelectedText()
Obtain any selected text in the widget for copying to the clipboard.
|
byte |
getState()
Gets the current state of this component's data.
|
int |
getTextHeight(java.lang.String txt,
int font)
|
private int |
getTextHeight(java.lang.String txt,
int font,
boolean useNative)
Compute the height of the given text, using the specified font in the widget's window.
|
int |
getTextHeightNative(java.lang.String txt,
FontDetails font)
Compute the text height using
GuiDriver.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>). |
int |
getTextHeightNative(java.lang.String txt,
int font)
Compute the text height using
GuiDriver.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>). |
int |
getTextWidth(java.lang.String txt,
FontDetails font)
|
private int |
getTextWidth(java.lang.String txt,
FontDetails font,
boolean useNative)
Compute the width of the given text, using the specified font in the widget's window.
|
private int |
getTextWidth(java.lang.String txt,
FontDetails font,
int fontNum,
boolean useNative)
Compute the width of the given text, using the specified font in the widget's window.
|
int |
getTextWidth(java.lang.String txt,
int font)
|
private int |
getTextWidth(java.lang.String txt,
int font,
boolean useNative)
Compute the width of the given text, using the specified font in the widget's window.
|
int |
getTextWidthNative(java.lang.String txt,
FontDetails font)
Compute the text width using
GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>). |
int |
getTextWidthNative(java.lang.String txt,
int font)
Compute the text width using
GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>). |
Rectangle |
getVisiblePart()
Gets the sub-rectangle which should be visible.
|
ZOrderClass |
getZOrderClass()
Get the Z-Order class
|
boolean |
hasFocus(boolean recurse)
Check if widget has focus.
|
boolean |
hasTooltip()
Check if widget has tooltip.
|
abstract double |
height()
Get widget height.
|
boolean |
hidden()
Get current hidden state.
|
void |
hide()
Hide widget.
|
boolean |
highlighted()
Get current highlighted state.
|
boolean |
ignoreAction(int action)
Check if the given event needs to be ignored, as it can't be treated by the widget.
|
double |
initialHeight()
Get initial widget height in character units.
|
double |
initialWidth()
Get initial widget width in character units.
|
Insets |
insets()
Get widget insets.
|
boolean |
isCurrent(boolean recurse)
The method returns true if the widget is set as current in its parent container or containers.
|
boolean |
isDirectManipulationActive()
Check if direct manipulation is active for this widget.
|
boolean |
isDirectManipulationActiveOrInUIB()
Check if direct manipulation is active for this or widget is in UIB mode.
|
protected boolean |
isDirectManipulationCapable()
Checks if direct manipulation feature can be used for this widget.
|
boolean |
isDirectManipulationRequired()
Checks if direct manipulation feature must be installed or removed in GUI mode.
|
boolean |
isDisplayed()
Check if widget is displayed.
|
boolean |
isEnabled()
Check if widget is enabled.
|
boolean |
isFocusable()
Checks whether this widget can receive focus generally.
|
boolean |
isHeader()
Check if widget is part of a header.
|
protected boolean |
isMouseDrag(java.awt.event.MouseEvent e)
Check for drag operation.
|
boolean |
isRealized()
The default implementation delegates to WidgetConfig if it has one, otherwise return false.
|
boolean |
isRepaintDisabled()
Returns true if the widget repaint is disabled.
|
boolean |
isRMBEntrySupported()
Check if this widget gains ENTRY event when right/middle mouse button is clicked.
|
boolean |
isScreenLocationCached()
Check if either
screenLocation or screenPhysicalLocation contains a cached
value. |
boolean |
isTabStop()
Check the value of the TAB-STOP attribute
|
private boolean |
isTheSameFrame(Container<O> frameToTest)
Checks if the given container is the same frame as the current one.
|
boolean |
isThreeD()
If the method returns
true the widget should be represented with 3D visuals. |
boolean |
isTotallyObscured()
Check if widget is totally obscured.
|
boolean |
isVisible()
Check if widget is visible.
|
boolean |
isVisible(boolean recursive)
Check if widget is visible.
|
Point |
location()
Get widget location relative to container.
|
boolean |
manageSystemActions()
Check if the current widget can manage non-global system actions on its own, and not via the
enclosing event loop.
|
abstract Dimension |
minimumSize()
Get widget minimum size.
|
protected int[] |
mouseActions()
Sub-classes will override this to return a list of mouse actions on which the widget
responds.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Notification of a mouse dragged event occurred for this widget.
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Notification of a mouse entered event occurred for this widget.
|
void |
mouseExited(java.awt.event.MouseEvent e)
Notification of a mouse exited event occurred for this widget.
|
void |
mouseMoved(java.awt.event.MouseEvent e)
Notification of a mouse moved event occurred for this widget.
|
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.
|
boolean |
moveToBottom()
Moves this widget to the bottom of other widgets in the z-ordering.
|
boolean |
moveToTop()
Moves this widget to the top of other widgets in the z-ordering.
|
java.lang.String |
name()
Get widget name.
|
boolean |
navigable()
Returns
true only if this widget is navigable. |
protected void |
oleDoDrop(java.awt.event.MouseEvent e)
Called when an automatic OLE Drop operation is ended.
|
void |
oleDrag()
Start an OLE drag/drop event with the given control as the source.
|
protected void |
oleDragging(java.awt.event.MouseEvent e)
Called on OLE Dragging.
|
protected boolean |
oleStartDragging(java.awt.event.MouseEvent e)
Called when an automatic OLE Drag operation is started.
|
protected void |
onOleDragging(java.awt.event.MouseEvent e,
Widget<?> widget)
Called when OLE Dragging.
|
protected void |
onOleDropEnd(java.awt.event.MouseEvent e,
Widget<?> widget)
Called when a OLE Drop operation is ended.
|
Container<O> |
parent(boolean system)
Get widget parent.
|
<T extends Widget<O>> |
parent(java.lang.Class<T> clazz)
Get widget parent of the specified type.
|
<T> T |
parentObject(java.lang.Class<T> clazz)
Get widget parent of the specified type.
|
<T extends Widget<O>> |
parentOrSelf(java.lang.Class<T> clazz)
Get this or widget parent of the specified type.
|
<T> T |
parentOrSelfObject(java.lang.Class<T> clazz)
Get this or widget parent of the specified type.
|
NativeRectangle |
physicalBounds()
Determine the physical bounds, relative to screen, expressed in units native to UI type.
|
NativeDimension |
physicalDimension()
Get widget physical dimension, expressed in units native to UI type.
|
NativePoint |
physicalLocation()
Get widget physical location relative to container, expressed in units native to UI type.
|
void |
postprocessConfig()
Additional processing required when widget configuration is updated AFTER the frame layout
has been performed.
|
protected Point |
prepParentLocation(Widget<?> parent)
Trick, that lets to correct parent location in cases, when it needed,
for example for menus.
|
boolean |
preventFocusWhenMouseDownEventDefined()
Test if this widget must prevent receiving focus on mouse-down event.
|
void |
processDirectManipulationEvent(DirectManipulationEvent event)
Process direct manipulation event.
|
void |
processEvent(Event evt)
Process event and dispatch it to specific method.
|
void |
processFocusEvent(FocusEvent event)
Process focus event.
|
void |
processKeyEvent(KeyInput event)
Process key event.
|
protected void |
processKeyEventForSelectableWidget(KeyInput event)
Process key event for selectable widgets.
|
void |
processKeyListeners(KeyInput event)
Process key listeners.
|
boolean |
processMnemonic(int key)
Process the given key, if this widget's mnemonic matches the key.
|
protected boolean |
processMnemonicImpl(int key,
MnemonicTrait m)
Common code to process the specific mnemonic key by this widget.
|
void |
processSystemKey(KeyInput key)
Process the action associated with the given key in an independent drawing bracket.
|
boolean |
raiseLegacyMouseEvents()
Check if the widget implementation can raise legacy, 4GL-style, mouse events.
|
void |
reflectAncestorChange()
Called when any of the widget's ancestors gets re-assigned.
|
void |
reflectLocationChanged()
Called when the widget's location changes.
|
protected void |
reflectSizeChanged()
Reflects the size change of the widget by invoking the "sizeChanged" method
on all registered WidgetDimensionsListener listeners.
|
private void |
reflectVisibilityChanged()
Reflects the visibility change of the widget by invoking the 'visibilityChanged' method
on the registered listeners of type 'WidgetVisibilityListener'.
|
void |
refresh(Rectangle rect)
Determine the widget's window and mark a rectangle as needing repainting.
|
void |
registerWidgetListener(WidgetListener l)
Register a widget state listener for this widget.
|
void |
repaint()
Request widget repainting.
|
void |
repaint(NativeRectangle rect)
Request widget repainting.
|
void |
repaint(Rectangle ur)
Request widget repainting.
|
private void |
repaintEventParentContainer(DirectManipulationEvent event)
Repaint parent container from DirectManipulationEvent event.
|
void |
requestFocus(boolean force,
boolean mouse)
Request focus.
|
void |
requestSync()
Request screen synchronization.
|
void |
resetBitmap()
Determine the widget's window and reset the screen bitmap.
|
void |
resizeTo(NativePoint origin,
NativeDimension size,
boolean raise)
Resize the widget to the specified dimensions.
|
int |
resolveFont()
This API is responsible for resolving the widget's font.
|
int |
resolvePopupMenuId()
Returns the popup menu effective for this widget.
|
int |
resolveTitleFont()
This API is responsible for resolving the font associated with this widget's title.
|
O |
screen()
Get access to
OutputManager instance. |
Dimension |
screenDimension()
Determine the widget's window and get the screen dimensions.
|
double |
screenHeight()
Determine the widget's window and get the number of rows on the screen.
|
Point |
screenLocation()
Get absolute location of widget in screen coordinates.
|
NativePoint |
screenPhysicalLocation()
Get absolute location of widget in screen coordinates.
|
double |
screenWidth()
Determine the widget's window and get the number of columns on the screen.
|
void |
setBitmap(ScreenBitmap bitmap)
Determine the widget's window and restore the bitmap to a previous state.
|
void |
setCachedScreenLocation(Point p)
Set the cached value for
screenLocation(), in screenLocation. |
void |
setCachedScreenPhysicalLocation(NativePoint p)
Set the cached value for
screenPhysicalLocation(), in screenPhysicalLocation. |
void |
setDirectManipulationActive(boolean isActive)
Sets direct manipulation active flag value for this widget.
|
void |
setEnabled(boolean enabled)
Enable/disable widget.
|
void |
setHidden(boolean hidden)
Tracks the hidden state of the widget.
|
void |
setHighlighted(boolean highlighted)
Tracks the highlighted state of the widget.
|
void |
setLocation(double x,
double y)
Set widget relative location.
|
void |
setLocation(Point origin)
Set widget relative location.
|
void |
setMousePointer(int windowId,
MousePtrWrapper ptr)
Set the custom mouse pointer
|
void |
setMousePointer(MousePtrWrapper ptr)
Set the custom mouse pointer
|
void |
setParent(Container<O> container)
Set widget parent.
|
protected void |
setPhysicalDimensionInt(int width,
int height)
Set widget physical dimension.
|
void |
setPhysicalLocation(int x,
int y)
Set widget relative physical location.
|
void |
setSensitiveForUIB(boolean sensitive)
Sets direct manipulation sensitive flag value for this widget in UIB mode.
|
void |
setState(byte state)
Stores the new state of the component's data.
|
void |
setVisible(boolean visible)
Hide/show widget.
|
void |
setWindow(Window<?> w)
Set a window.
|
void |
show()
Show widget.
|
Menu<O> |
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
|
void |
sync()
Determine the widget's window and synchronize output with physical terminal.
|
TopLevelWindow<O> |
topLevelWindow()
Get ancestor
TopLevelWindow for this widget, if the widget is attached to a window. |
java.lang.String |
toString()
Returns a string representation of the object.
|
NativePoint |
translate(java.awt.event.MouseEvent evt)
Translate mouse position relative to this widget.
|
protected void |
triggerLocationChanged()
Triggers the location changed event for the widget.
|
void |
unrealize()
Unrealize this widget.
|
void |
unregisterWidgetListener(WidgetListener l)
Unregister a widget state listener for this widget.
|
protected <C extends WidgetConfig> |
updateSizeWorker(C beforeUpdate)
Instructs the widget that its size may have changed.
|
protected void |
updateSystemParent(BaseConfig bcBefore)
Updates system parent with new ID came from server.
|
protected void |
widgetRealized()
Fired when the widget becomes realized.
|
void |
widgetStateChanged()
Notification that this widget's state has changed (visibility, sensitivity, z-order).
|
abstract double |
width()
Get widget width.
|
Window<O> |
window()
Get ancestor Window for this widget.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptsEscAsAnyKey, acceptTrigger, canMovetoTop, completeTrigger, defaultMousePtr, enforceDefaultMousePtr, getIdForTrigger, getLegacyWidget, getTriggerWidget, getTriggerWidget, hasFocus, ignoreEnable, isCurrent, isDirectManipulable, isDroppable, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, maySwitchFocus, parent, refreshWidget, requestFocus, requestFocus, startTrigger, systemFocusGrabbed, validateDisplayValueprotected static final CentralLogger LOG
protected java.util.ArrayList<WidgetListener> listeners
private boolean enabled
private boolean firstEnabledDisabled
private boolean hidden
private boolean highlighted
private boolean visible
private java.util.ArrayList<FocusListener> focusListeners
private java.util.ArrayList<KeyListener> keyListeners
private java.lang.ref.WeakReference<Container<O extends OutputManager<?>>> parent
private java.lang.ref.WeakReference<Window<O extends OutputManager<?>>> window
reflectAncestorChange().private java.util.Map<java.lang.Class<?>,java.lang.ref.WeakReference<Container<?>>> ancestorCache
reflectAncestorChange().private boolean popupKeyListnrAdded
true if and only if Menu.PopupKeyListener was added to this widget.private O extends OutputManager<?> screen
private org.roaringbitmap.RoaringBitmap mouseActions
protected Point location
protected NativePoint physicalLocation
protected Insets insets
protected NativeInsets nativeInsets
protected java.util.Optional<MousePtrWrapper> mousePtr
private MouseHoverAction mouseHoverAction
private boolean directManipulationActive
private Point screenLocation
screenLocation().private NativePoint screenPhysicalLocation
screenPhysicalLocation().private boolean isOleDragDrop
private boolean tooltipActive
private boolean sensitiveInDirectManipulation
protected static void copyColors(BaseConfig source, BaseConfig target)
source - The source config.target - The target config.public WidgetId getId()
getId in interface Widget<O extends OutputManager<?>>public O screen()
OutputManager instance.screen in interface Widget<O extends OutputManager<?>>OutputManager.public void addFocusListener(FocusListener listener)
addFocusListener in interface Widget<O extends OutputManager<?>>listener - Listener to add.public void addKeyListener(KeyListener listener)
addKeyListener in interface Widget<O extends OutputManager<?>>listener - Listener to add.public TitledWindow<O> ancestor()
ancestor in interface Widget<O extends OutputManager<?>>public WidgetId ancestorId()
ancestorId in interface Widget<O extends OutputManager<?>>null if no valid ancestor exists.public Window<O> window()
window in interface Widget<O extends OutputManager<?>>java.lang.IllegalStateException - When this widget is not attached to window.public TopLevelWindow<O> topLevelWindow()
TopLevelWindow for this widget, if the widget is attached to a window.
This will return null if widget is not yet attached to a top level window or is already
detached from it. This can happen during normal steps in a widget's lifecycle such as creation
or destruction.
topLevelWindow in interface Widget<O extends OutputManager<?>>null if not currently attached.public Rectangle bounds()
bounds in interface Widget<O extends OutputManager<?>>public Insets insets()
insets in interface Widget<O extends OutputManager<?>>public abstract Dimension dimension()
dimension in interface Widget<O extends OutputManager<?>>public NativeDimension physicalDimension()
physicalDimension in interface Widget<O extends OutputManager<?>>public boolean isDisplayed()
Only widget which does not delegate to the parent is TitledWindow, with the
exception of MenuItemGuiImpl. For this case, we avoid delegating and up the tree
and just check the window parent for common case. Other cases (like MenuItemGuiImpl
will still rely on the parent delegation.
isDisplayed in interface Widget<O extends OutputManager<?>>true if widget is displayed.public boolean isRealized()
isRealized in interface Widget<O extends OutputManager<?>>true if config().realized is true.public abstract void draw()
draw in interface Widget<O extends OutputManager<?>>public void drawCaret()
drawCaret in interface Widget<O extends OutputManager<?>>public boolean isEnabled()
isEnabled in interface Widget<O extends OutputManager<?>>true if widget is enabled.public boolean focusTraversable()
focusTraversable in interface Widget<O extends OutputManager<?>>true if widget is focus traversable.public boolean navigable()
true only if this widget is navigable.navigable in interface Widget<O extends OutputManager<?>>true if widget is navigable.public void forceVisibility(boolean visibility)
forceVisibility in interface Widget<O extends OutputManager<?>>visibility - New visibility state.public boolean hasFocus(boolean recurse)
When true is passed as the argument the method considers this widget focused when all the
parent widgets up to the top-level window are current and the widget itself is a leaf node of the
widget tree. When false is passed as the argument the method considers this widget focused
when all the parent widgets up to the top-level window are current but the widget itself does not
have to be a leaf node.
hasFocus in interface Widget<O extends OutputManager<?>>recurse - see abovetrue if widget has focus.public boolean isCurrent(boolean recurse)
false is passed in the recurse parameter only the parent container is considered,
otherwise all the containers up the widget tree are considered.isCurrent in interface Widget<O extends OutputManager<?>>recurse - Allows recursive mode. See above.public abstract double height()
height in interface Widget<O extends OutputManager<?>>public boolean hidden()
hidden in interface Widget<O extends OutputManager<?>>public void hide()
hide in interface Widget<O extends OutputManager<?>>public boolean highlighted()
highlighted in interface Widget<O extends OutputManager<?>>public Point location()
The method always returns a valid location. If a component has not been assigned location explicitly, the method returns the default location 0,0.
location in interface Widget<O extends OutputManager<?>>public NativePoint physicalLocation()
The method always returns a valid location. If a component has not been assigned location explicitly, the method returns the default location 0,0.
The value returned by the method is in native (also called physical) units. Native units should not be used by the layout logic but only by the output subsystems.
physicalLocation in interface Widget<O extends OutputManager<?>>public abstract Dimension minimumSize()
minimumSize in interface Widget<O extends OutputManager<?>>public java.lang.String name()
name in interface Widget<O extends OutputManager<?>>public Container<O> parent(boolean system)
parent in interface Widget<O extends OutputManager<?>>system - Set to true to search the system-level widget hierarchy. See
BaseEntity.setSystemParent(com.goldencode.p2j.ui.GenericWidget) for more info.public final <T extends Widget<O>> T parent(java.lang.Class<T> clazz)
This method is final as it caches the intermediate value in ancestorCache.
Any future sub-implementation must take this into account.
parent in interface Widget<O extends OutputManager<?>>clazz - The parent type to return.public <T> T parentObject(java.lang.Class<T> clazz)
This method is final as it caches the intermediate value in ancestorCache.
Any future sub-implementation must take this into account.
parentObject in interface Widget<O extends OutputManager<?>>clazz - The parent type to return.public <T extends Widget<O>> T parentOrSelf(java.lang.Class<T> clazz)
parentOrSelf in interface Widget<O extends OutputManager<?>>clazz - The type to return.public <T> T parentOrSelfObject(java.lang.Class<T> clazz)
parentOrSelfObject in interface Widget<O extends OutputManager<?>>clazz - The type to return.public void processFocusEvent(FocusEvent event)
processFocusEvent in interface Widget<O extends OutputManager<?>>event - Event to process.public void processKeyEvent(KeyInput event)
processKeyEvent in interface Widget<O extends OutputManager<?>>event - Key event to process.protected void processKeyEventForSelectableWidget(KeyInput event)
event - Key event to process.public void processKeyListeners(KeyInput event)
processKeyListeners in interface Widget<O extends OutputManager<?>>event - Keyboard event.public void processDirectManipulationEvent(DirectManipulationEvent event)
processDirectManipulationEvent in interface Widget<O extends OutputManager<?>>event - Event to process.private void repaintEventParentContainer(DirectManipulationEvent event)
event - Direct manipulation event.public void repaint()
repaint in interface Widget<O extends OutputManager<?>>public void repaint(Rectangle ur)
repaint in interface Widget<O extends OutputManager<?>>ur - The update rectangle (relative to the origin of its parent
Container) which will be repainted. Note that it is clipped by
all parent containers.public void repaint(NativeRectangle rect)
repaint in interface Widget<O extends OutputManager<?>>rect - The update rectangle (relative to the origin of its parent
Container) which will be repainted. Note that it is clipped by
all parent containers.public void requestFocus(boolean force,
boolean mouse)
force parameter as it always sets
focus unconditionally.requestFocus in interface Widget<O extends OutputManager<?>>force - When true the method will set focus on this widget unconditionally.mouse - If true then the focus request was caused by a mouse event.public void requestSync()
requestSync in interface Widget<O extends OutputManager<?>>public Point screenLocation()
screenLocation in interface Widget<O extends OutputManager<?>>public NativePoint screenPhysicalLocation()
screenPhysicalLocation in interface Widget<O extends OutputManager<?>>public NativePoint displayPhysicalLocation()
displayPhysicalLocation in interface Widget<O extends OutputManager<?>>public final Point getCachedScreenLocation()
screenLocation().screenLocation. null means no value is
cached.public final NativePoint getCachedScreenPhysicalLocation()
screenPhysicalLocation().screenPhysicalLocation. null means no value is
cached.public final void setCachedScreenLocation(Point p)
screenLocation(), in screenLocation.p - The computed location.public final void setCachedScreenPhysicalLocation(NativePoint p)
screenPhysicalLocation(), in screenPhysicalLocation.p - The computed location.public final boolean isScreenLocationCached()
screenLocation or screenPhysicalLocation contains a cached
value.true if either of screenLocation or
screenPhysicalLocation is not-null.public void reflectLocationChanged()
public void reflectAncestorChange()
ancestorCache and window).public void setEnabled(boolean enabled)
setEnabled in interface Widget<O extends OutputManager<?>>enabled - New enabled state.public void setHidden(boolean hidden)
setHidden in interface Widget<O extends OutputManager<?>>hidden - New hidden state.public void setHighlighted(boolean highlighted)
setHighlighted in interface Widget<O extends OutputManager<?>>highlighted - New highlighted state.public void setLocation(double x,
double y)
setLocation in interface Widget<O extends OutputManager<?>>x - Widget X.y - Widget Y.public void setLocation(Point origin)
setLocation in interface Widget<O extends OutputManager<?>>origin - Location to set.public void setPhysicalLocation(int x,
int y)
setPhysicalLocation in interface Widget<O extends OutputManager<?>>x - Widget physical X.y - Widget physical Y.protected void copyState(Widget<?> w)
w - The source widget which state needs to be copied.protected void setPhysicalDimensionInt(int width,
int height)
width - Widget physical width.height - Widget physical height.public NativeRectangle physicalBounds()
physicalBounds in interface Widget<O extends OutputManager<?>>public void resizeTo(NativePoint origin, NativeDimension size, boolean raise)
resizeTo in interface Widget<O extends OutputManager<?>>origin - The top-left window corner new position.size - The new window size.raise - Flag indicating if the 4GL WINDOW-RESIZED event needs to be raised.public final void setParent(Container<O> container)
setParent in interface Widget<O extends OutputManager<?>>container - Parent to set.public void setVisible(boolean visible)
setVisible in interface Widget<O extends OutputManager<?>>visible - New visible state.public void setWindow(Window<?> w)
setWindow in interface Widget<O extends OutputManager<?>>w - The windowpublic void show()
show in interface Widget<O extends OutputManager<?>>public boolean isTotallyObscured()
isTotallyObscured in interface Widget<O extends OutputManager<?>>true if widget is totally obscured.public boolean isVisible()
isVisible in interface Widget<O extends OutputManager<?>>true if widget is visible.public boolean isVisible(boolean recursive)
isVisible in interface Widget<O extends OutputManager<?>>recursive - false behaves as isVisible(), otherwise the method returns
true only when the parent's call to isVisible(true) returns
true.true if widget is visible.public boolean isHeader()
isHeader in interface Widget<O extends OutputManager<?>>true if widget is part of header.public boolean forceCursorOnFocus()
true so it needs to be overwritten if other return value
is required for particular widget implementation class.forceCursorOnFocus in interface Widget<O extends OutputManager<?>>true as the default value.public abstract double width()
width in interface Widget<O extends OutputManager<?>>public double initialWidth()
initialWidth in interface Widget<O extends OutputManager<?>>public double initialHeight()
initialHeight in interface Widget<O extends OutputManager<?>>protected void disable()
protected void enable()
protected <C extends WidgetConfig> void updateSizeWorker(C beforeUpdate)
This implementation uses the supplied config instance to detect whether
size has changed. If null is passed in the method does
nothing.
C - Widget config type.beforeUpdate - BaseConfig reference or null.protected <C extends WidgetConfig> void autoResize(C beforeUpdate)
C - Widget config type.beforeUpdate - BaseConfig reference or null.public boolean processMnemonic(int key)
processMnemonic in interface Widget<O extends OutputManager<?>>key - The pressed mnemonic key code.true if this widget accepted this mnemonic key. Not enabled or not
visible widget will not accept it. Returns false by default.protected final boolean processMnemonicImpl(int key,
MnemonicTrait m)
key - The pressed mnemonic key code.m - The element with mnemonic behavior.true if this widget accepted this mnemonic key. Not enabled or not
visible widget will not accept it.public void processEvent(Event evt)
processEvent in interface Widget<O extends OutputManager<?>>evt - Event to process.public <W extends WidgetConfig> W config()
config in interface Widget<O extends OutputManager<?>>W - Config type.public boolean isFocusable()
isFocusable in interface Widget<O extends OutputManager<?>>true if this widget can be focused under
certain conditions. false if, and only if, this
widget can never receive focus.public int resolveTitleFont()
public int resolveFont()
public Widget<O> findMouseSource(NativePoint p)
findMouseSource in interface Widget<O extends OutputManager<?>>p - The mouse physical location.null if none found.public NativePoint getPortableMouseEventCoordinates(NativePoint point)
point - The point (relative to the window's top-left corner) for which the coordinates for
the portable mouse events are needed.null if such an event can't be raised.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenere - The mouse event.public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenere - The mouse event.public void mouseClicked(java.awt.event.MouseEvent e)
In GUI mode, if the widget has a popup-menu attached, it will display it.
mouseClicked in interface java.awt.event.MouseListenere - The mouse event.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - The mouse event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenere - The mouse event.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenere - The mouse event.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenere - The mouse event.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenere - The mouse event.public void destroy()
destroy in interface Widget<O extends OutputManager<?>>public void registerWidgetListener(WidgetListener l)
registerWidgetListener in interface Widget<O extends OutputManager<?>>l - The widget state listener.public void unregisterWidgetListener(WidgetListener l)
unregisterWidgetListener in interface Widget<O extends OutputManager<?>>l - The widget state listener.public NativePoint translate(java.awt.event.MouseEvent evt)
evt - Mouse event.public byte getState()
getState in interface Widget<O extends OutputManager<?>>ScreenBuffer.UNINITIALIZED).public Rectangle getVisiblePart()
getVisiblePart in interface Widget<O extends OutputManager<?>>public void setState(byte state)
setState in interface Widget<O extends OutputManager<?>>state - The new state (for example ScreenBuffer.CHANGED).public static NativeRectangle clipRectangle(NativePoint origin, NativeDimension dimension)
origin - Physical location.dimension - Physical dimension.public int resolvePopupMenuId()
resolvePopupMenuId in interface Widget<O extends OutputManager<?>>protected NativeRectangle clipRectangle()
public boolean isRepaintDisabled()
isRepaintDisabled in interface Widget<O extends OutputManager<?>>private void _setEnabled(boolean enabled)
enabled flag in the configuration and in the widget's state.enabled - The widget's enabled state.protected MouseHoverAction createMouseHoverAction()
public void _setVisible(boolean visible)
visible flag in the configuration and in the widget's state.visible - The widget's visible state.public void _setHidden(boolean hidden)
hidden flag in the configuration and in the widget's state.hidden - The widget's hidden state.public boolean raiseLegacyMouseEvents()
raiseLegacyMouseEvents in interface Widget<O extends OutputManager<?>>true.public void sync()
OutputManager.sync(int)public void refresh(Rectangle rect)
rect - rectangle to mark for repaintingOutputManager.refresh(int, Rectangle)public void clear(Point origin, Dimension size, Color color)
origin - Upper left corner of the area to clear.size - Dimensions of the area.color - Color.OutputManager.clear(int, NativePoint, NativeDimension, Color)public ScreenBitmap getAndResetBitmap()
OutputManager.getAndResetBitmap(int)public void resetBitmap()
OutputManager.resetBitmap(int)public ScreenBitmap getAndSetBitmap(Rectangle rect)
rect - The extra clipping rectangle. null has no effect
on clipping.OutputManager.getAndSetBitmap(int, Rectangle)public ScreenBitmap getBitmapCopy()
OutputManager.getBitmapCopy(int)public void setBitmap(ScreenBitmap bitmap)
bitmap - The bitmap instance to set as the output primitive's bitmap.OutputManager.setBitmap(int, ScreenBitmap)public void clipWith(Rectangle rect)
true values. Else, if the bitmap
was just reset, fill it with false values and set the clipping region to true.rect - The clipping rectangle to be added.OutputManager.clipWith(int, Rectangle)public double screenHeight()
public int getTextWidthNative(java.lang.String txt,
int font)
GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>).txt - The text.font - The font index in the font table.getTextWidth(String, int, boolean)public int getTextWidthNative(java.lang.String txt,
FontDetails font)
GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>).txt - The text.font - The font details.getTextWidth(String, FontDetails, boolean)public int getTextHeightNative(java.lang.String txt,
FontDetails font)
GuiDriver.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>).txt - The text.font - The font details.public int getTextWidth(java.lang.String txt,
int font)
FontManager.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, com.goldencode.p2j.ui.client.FontDetails, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>).txt - The text.font - The font index in the font table.getTextWidth(String, int, boolean)public int getTextWidth(java.lang.String txt,
FontDetails font)
FontManager.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, com.goldencode.p2j.ui.client.FontDetails, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>).txt - The text.font - The font details.getTextWidth(String, int, boolean)public int getTextHeightNative(java.lang.String txt,
int font)
GuiDriver.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>).txt - The text.font - The font index in the font table.getTextHeight(String, int, boolean)public int getTextHeight(java.lang.String txt,
int font)
FontManager.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, int, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>).txt - The text.font - The font index in the font table.getTextHeight(String, int, boolean)public double screenWidth()
public Dimension screenDimension()
public boolean manageSystemActions()
true if the widget has its own event management.
false by default.public java.lang.String getSelectedText()
getSelectedText in interface Widget<O extends OutputManager<?>>null if there is no selected text or if the
widget type does not support clipboard operations.public int getDefaultEvent(KeyInput key, boolean inEditingBlock)
key - The current key.inEditingBlock - true if EDITING mode is active.public void processSystemKey(KeyInput key)
This must be called only in the context of widget-level event processing.
key - The key to be processed.public boolean ignoreAction(int action)
action - The event code.public <C extends WidgetConfig> void afterConfigUpdateBase(C beforeUpdate)
C - Widget config type.beforeUpdate - Config reference capturing the config state before
the owner's config was modified.public boolean isDirectManipulationActive()
isDirectManipulationActive in interface Widget<O extends OutputManager<?>>true if direct manipulation is active false if not.public void setDirectManipulationActive(boolean isActive)
setDirectManipulationActive in interface Widget<O extends OutputManager<?>>isActive - The new value for the flag.public boolean isDirectManipulationActiveOrInUIB()
isDirectManipulationActiveOrInUIB in interface Widget<O extends OutputManager<?>>true if direct manipulation is active false if not.public void activateDirectManipulation()
public void deactivateDirectManipulation()
protected boolean isDirectManipulationCapable()
TRUE if direct manipulation is available,
FALSE otherwise.public boolean isDirectManipulationRequired()
TRUE if direct manipulation is need to be installed,
FALSE if direct manipulation is need to be removed.public void setSensitiveForUIB(boolean sensitive)
setSensitiveForUIB in interface Widget<O extends OutputManager<?>>sensitive - The new value for the flag.protected void widgetRealized()
public void debug(java.lang.String message)
message - String parameterpublic boolean isTabStop()
isTabStop in interface Widget<O extends OutputManager<?>>true if not applicablepublic void postprocessConfig()
postprocessConfig in interface Widget<O extends OutputManager<?>>public boolean moveToBottom()
moveToBottom in interface Widget<O extends OutputManager<?>>true if operation was successful and
false otherwise.public boolean moveToTop()
moveToTop in interface Widget<O extends OutputManager<?>>true if operation was successful and
false otherwise.public ZOrderClass getZOrderClass()
getZOrderClass in interface Widget<O extends OutputManager<?>>public int getMenuMouse()
getMenuMouse in interface Widget<O extends OutputManager<?>>public org.roaringbitmap.RoaringBitmap getMouseActions()
getMouseActions in interface Widget<O extends OutputManager<?>>mouseActions().public void disableTooltip()
tooltipActive flag and reset the mouseActions, so they will be rebuilt next
time this widget is processed to be sent to the JS web driver.public void enableTooltip()
tooltipActive flag and reset the mouseActions, so they will be rebuilt next
time this widget is processed to be sent to the JS web driver.public boolean isThreeD()
true the widget should be represented with 3D visuals.
This implementation forwards the call to isThreeD() of the parent frame. If
no parent frame exists for this widget the method returns false.
isThreeD in interface Widget<O extends OutputManager<?>>public java.lang.String toString()
toString in class java.lang.Objectpublic void setMousePointer(MousePtrWrapper ptr)
setMousePointer in interface Widget<O extends OutputManager<?>>ptr - the custom mouse pointerpublic void setMousePointer(int windowId,
MousePtrWrapper ptr)
setMousePointer in interface Widget<O extends OutputManager<?>>windowId - the window's IDptr - the custom mouse pointerpublic java.util.Optional<MousePtrWrapper> getLoadedMousePointer()
getLoadedMousePointer in interface Widget<O extends OutputManager<?>>public java.util.Optional<MousePtrWrapper> getCustomMousePointer()
getCustomMousePointer in interface Widget<O extends OutputManager<?>>public MousePtrWrapper getEffectiveMousePointer()
getEffectiveMousePointer in interface Widget<O extends OutputManager<?>>public NativeRectangle getActualBounds()
getActualBounds in interface Widget<O extends OutputManager<?>>public boolean isRMBEntrySupported()
isRMBEntrySupported in interface Widget<O extends OutputManager<?>>true if this widget gains ENTRY event
when right/middle mouse button is clicked.public boolean clearWidget()
clearWidget in interface Widget<O extends OutputManager<?>>true on success. false if CLEAR cannot be applied to this
widget, e.g. if it is static text.protected void updateSystemParent(BaseConfig bcBefore)
bcBefore - Config reference capturing the config state before the owner's config was modified.protected int[] mouseActions()
MouseEvent codes and P2J specific
MouseEvt actions.
If null, it means the widget does not respond to mouse events.
protected Point prepParentLocation(Widget<?> parent)
parent - Parent component.public boolean supportsCustomMousePointer()
supportsCustomMousePointer in interface Widget<O extends OutputManager<?>>true if the widget supports
LOAD-MOUSE-POINTER() methodpublic java.util.Optional<Frame<?>> enclosingFrame()
enclosingFrame in interface Widget<O extends OutputManager<?>>public void unrealize()
unrealize in interface Widget<O extends OutputManager<?>>public void widgetStateChanged()
widgetStateChanged in interface Widget<O extends OutputManager<?>>public Menu<O> showPopupMenu(java.awt.event.MouseEvent e, java.lang.Runnable dismissHandler)
resolvePopupMenuId().e - The related mouse event that caused a popup to be shown. May be null, in this case
the location for popup is determined from current mouse cursor position.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 NativePoint getMousePosition()
getMousePosition in interface Widget<O extends OutputManager<?>>null.protected void triggerLocationChanged()
protected void reflectSizeChanged()
private void reflectVisibilityChanged()
private int getTextWidth(java.lang.String txt,
FontDetails font,
boolean useNative)
useNative flag is set, then the width is computed directly from the
driver. Otherwise, FontManager.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, com.goldencode.p2j.ui.client.FontDetails, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>) is used to determine the width:
the custom text metrics are interrogated first via and, if not found, it fallbacks to using
the driver to determine the width.txt - The text.font - Font details.useNative - Flag indicating that the GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>) needs to be used.private int getTextWidth(java.lang.String txt,
int font,
boolean useNative)
useNative flag is set, then the width is computed directly from the
driver. Otherwise, FontManager.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, com.goldencode.p2j.ui.client.FontDetails, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>) is used to determine the width:
the custom text metrics are interrogated first via and, if not found, it fallbacks to using
the driver to determine the width.txt - The text.font - The font index in the font table.useNative - Flag indicating that the GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>) needs to be used.private int getTextWidth(java.lang.String txt,
FontDetails font,
int fontNum,
boolean useNative)
useNative flag is set, then the width is computed directly from the
driver. Otherwise, FontManager.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, com.goldencode.p2j.ui.client.FontDetails, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>) is used to determine the width:
the custom text metrics are interrogated first via and, if not found, it fallbacks to using
the driver to determine the width.txt - The text.font - The font details. Leave it null to specify the font by
fontNum.fontNum - Font number. If font is not null, it is ignored.useNative - Flag indicating that the GuiDriver.getTextWidth(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>) needs to be used.private int getTextHeight(java.lang.String txt,
int font,
boolean useNative)
useNative flag is set, then the height is computed directly from the
driver. Otherwise, FontManager.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.Window<?>, int, com.goldencode.p2j.ui.client.driver.ScreenDriver<?>) is used to determine the height:
the custom text metrics are interrogated first via and, if not found, it fallbacks to using
the driver to determine the height.txt - The text.font - The font index in the font table.useNative - Flag indicating that the GuiDriver.getTextHeight(java.lang.String, com.goldencode.p2j.ui.client.FontDetails<F>) needs to be used.private void doTriggerContainerStateRedrawEnabled(AbstractContainer<O> c)
AbstractContainer.triggerContainerStateRedrawEnabled() on the supplied
container and all containers recursively down the widget tree.c - The root container.private boolean isTheSameFrame(Container<O> frameToTest)
frameToTest - The frame container candidate to test against the current one.TRUE if the container the same frame, FALSE otherwise.protected boolean isMouseDrag(java.awt.event.MouseEvent e)
e - The mouse event.true if is a drag in progress.protected void onOleDragging(java.awt.event.MouseEvent e,
Widget<?> widget)
e - The mouse event.widget - Source widget.protected void onOleDropEnd(java.awt.event.MouseEvent e,
Widget<?> widget)
e - The mouse event.widget - Target widget.public void oleDrag()
oleDrag in interface Widget<O extends OutputManager<?>>protected void oleDoDrop(java.awt.event.MouseEvent e)
e - The mouse event.protected boolean oleStartDragging(java.awt.event.MouseEvent e)
e - The mouse event.true if is a drag source has been selected.protected void oleDragging(java.awt.event.MouseEvent e)
e - The mouse event.public boolean preventFocusWhenMouseDownEventDefined()
true.preventFocusWhenMouseDownEventDefined in interface Widget<O extends OutputManager<?>>public boolean hasTooltip()
hasTooltip in interface Widget<O extends OutputManager<?>>true if widget has tooltip.