public abstract class GenericWidget extends LightweightWidget implements WidgetWithConfig<BaseConfig>
AbstractWidget.| Modifier and Type | Field and Description |
|---|---|
protected BaseConfig |
config
The widget config.
|
insets, listeners, location, LOG, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
GenericWidget()
The (only) constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterConfigUpdate(BaseConfig beforeUpdate)
The method is called after the configuration associated with the
owner changes.
|
BaseConfig |
config()
Get externalizable widget config which can be used to restore widget
state after via network.
|
double |
height()
Get widget height.
|
void |
initialize(WidgetId id,
BaseConfig cfg)
This implementation is required by the
WidgetWithConfig protocol,
but is neither called or used for non-containers. |
void |
setSize(double width,
double height)
Set the widget dimensions.
|
double |
width()
Get widget width.
|
dimension, minimumSize_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, disableTooltip, displayPhysicalLocation, draw, drawCaret, enable, enableTooltip, enclosingFrame, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChanged, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalDimensionInt, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, triggerLocationChanged, unrealize, unregisterWidgetListener, updateSizeWorker, updateSystemParent, widgetRealized, widgetStateChanged, windowclone, 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 BaseConfig config
BaseConfig.widthChars
and BaseConfig.heightChars while laying out.public void afterConfigUpdate(BaseConfig beforeUpdate)
The implemented logic must be idempotent - the method must produce the same results if executed once or multiple times not relying on any particular call sequence or related state. This is necessary so that the method can be repeated or retried as often as necessary without causing unintended effects
afterConfigUpdate in interface ConfigOwner<BaseConfig>beforeUpdate - Config reference capturing the config state before
the owner's config was modified.public BaseConfig config()
config in interface Widget<GuiOutputManager>config in interface ConfigOwner<BaseConfig>config in class AbstractWidget<GuiOutputManager>public double height()
height in interface Widget<GuiOutputManager>height in class AbstractWidget<GuiOutputManager>public void initialize(WidgetId id, BaseConfig cfg)
WidgetWithConfig protocol,
but is neither called or used for non-containers.initialize in interface WidgetWithConfig<BaseConfig>id - The widget's ID.cfg - The config used to initialize this widget.public void setSize(double width,
double height)
width - the new widget widthheight - the new widget heightpublic double width()
width in interface Widget<GuiOutputManager>width in class AbstractWidget<GuiOutputManager>