public abstract class Rect<O extends OutputManager<?>> extends AbstractWidget<O> implements WidgetWithConfig<RectangleConfig>
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
protected RectangleConfig |
config
Rectangle attributes.
|
insets, location, LOG, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
Rect(WidgetId id,
Container<O> owner)
This constructor creates a rectangle.
|
Rect(WidgetId id,
RectangleConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
afterConfigUpdate(RectangleConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
RectangleConfig |
config()
Provide access to the attributes stored in the widget.
|
Dimension |
dimension()
Get widget dimension.
|
abstract void |
draw()
Draw the rectangle.
|
boolean |
focusTraversable()
This component will not receive an input focus when Tab or Shift-Tab is pressed.
|
double |
height()
Calculate the height of this widget.
|
void |
initialize(WidgetId id,
RectangleConfig 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.
|
Dimension |
minimumSize()
Get widget minimum size.
|
double |
width()
Calculate the width of this widget.
|
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, findMouseSource, 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, insets, 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, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, updateSizeWorker, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
defaultMousePtr, enforceDefaultMousePtr, getLegacyWidget, isDirectManipulable
protected RectangleConfig config
public Rect(WidgetId id, Container<O> owner)
owner
- The parent container, frame which will include this
rectangle.id
- The widget's ID.public Rect(WidgetId id, RectangleConfig cfg)
Call initialize(com.goldencode.p2j.ui.WidgetId, com.goldencode.p2j.ui.RectangleConfig)
to finish the widget initialization.
id
- The widget's ID.cfg
- Configuration data.public void initialize(WidgetId id, RectangleConfig cfg)
This API is called after the widget is created and added to the registry.
initialize
in interface WidgetWithConfig<RectangleConfig>
id
- The widget's ID.cfg
- The config used to initialize this widget.public RectangleConfig config()
config
in interface Widget<O extends OutputManager<?>>
config
in interface ConfigOwner<RectangleConfig>
config
in class AbstractWidget<O extends OutputManager<?>>
public void afterConfigUpdate(RectangleConfig beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<RectangleConfig>
beforeUpdate
- public Dimension dimension()
dimension
in interface Widget<O extends OutputManager<?>>
dimension
in class AbstractWidget<O extends OutputManager<?>>
public abstract void draw()
draw
in interface Widget<O extends OutputManager<?>>
draw
in class AbstractWidget<O extends OutputManager<?>>
public double height()
height
in interface Widget<O extends OutputManager<?>>
height
in class AbstractWidget<O extends OutputManager<?>>
public Dimension minimumSize()
minimumSize
in interface Widget<O extends OutputManager<?>>
minimumSize
in class AbstractWidget<O extends OutputManager<?>>
public double width()
width
in interface Widget<O extends OutputManager<?>>
width
in class AbstractWidget<O extends OutputManager<?>>
public boolean focusTraversable()
focusTraversable
in interface Widget<O extends OutputManager<?>>
focusTraversable
in class AbstractWidget<O extends OutputManager<?>>
false
.