public interface Container<O extends OutputManager<?>> extends Widget<O>
| Modifier and Type | Method and Description |
|---|---|
Container<O> |
add(int pos,
Widget<O> widget)
Add the widget on the specified position.
|
Container<O> |
add(Widget<O> widget)
Add widget to container.
|
Container<O> |
add(Widget<O> before,
Widget<O> widget)
Add the new widget before the given widget's position.
|
void |
addContainerStateListener(ContainerStateListener<O> listener)
Adds container state listener.
|
Point |
childrenLocation(Widget<O> child)
Get children location for one child.
|
boolean |
clipping()
This method should be overridden in a container that allows clipping.
|
Widget<O> |
currentFocus()
Get widget which is in focus.
|
Widget<O> |
currentFocus(boolean recurse)
Get widget which is in focus.
|
Widget<O> |
defaultFocus()
Get default focusable widget.
|
void |
detach(Widget<O> widget)
Detach this widget from this container.
|
void |
doLayout()
Lay out container.
|
void |
endSizeChange(boolean repaint)
Indicates the ending of the resize process.
|
void |
firstFocus()
Set focus to first focusable widget.
|
Widget<O> |
focus()
Returns the focused direct child Component.
|
Widget<O> |
get(int index)
Get widget for provided index or
null if no such component
exists. |
Rectangle |
getClipRect()
Get clipping rectangle.
|
java.util.Set<Widget<?>> |
getIgnoreFocus()
Returns the set of widgets that are never selected for focus.
|
LayoutManager<O> |
getLayout()
Get active layout manager for the container.
|
java.util.List<Widget<O>> |
getTabItemList()
Returns the tab item list for this container.
|
boolean |
hasFocusable(Widget<O> exclude)
Reports if there is at least 1 focusable widget that is not the given
widget.
|
Insets |
insets()
Get container insets.
|
void |
lastFocus()
Set focus to last focusable widget.
|
void |
moveAfterTabItem(Widget<O> widget,
Widget<O> after)
Mode specified after before the widget "after".
|
void |
moveBeforeTabItem(Widget<O> widget,
Widget<O> before)
Mode specified widget before the widget "before".
|
void |
moveToBottom(Widget<O> widget)
Mode specified widget to the bottom of the widget list.
|
boolean |
moveToBottomInClass(Widget<O> widget)
Mode specified widget to the bottom of the widget list considering Z-order class.
|
void |
moveToTop(Widget<O> widget)
Move specified widget to the top of the widget list.
|
boolean |
moveToTopInClass(Widget<O> widget)
Move specified widget to the top of the widget list considering Z-order class.
|
void |
moveToZpos(Widget<O> widget,
int pos)
Move widget to specified position in the widget list.
|
void |
nextFocus()
Select next focusable widget.
|
boolean |
parentOf(Widget<O> w)
The method returns
true if this container is parent of the supplied widget. |
void |
prevFocus()
Select previous focusable widget.
|
void |
remove(Widget<O> widget)
Remove specified widget from the widget list.
|
void |
removeContainerStateListener(ContainerStateListener<O> listener)
Removes container state listener.
|
void |
replace(Widget<O> oldWidget,
Widget<O> newWidget)
Replace specified widget with another with preserving widget Z-order.
|
void |
setFocus(Widget<O> focus)
Set focus to specified widget.
|
void |
setHeight(double height)
Set container height.
|
void |
setIgnoreFocus(java.util.Collection<Widget<?>> widgets)
Sets the set of widgets that are never selected for focus.
|
void |
setInsets(Insets insets)
Set container insets.
|
void |
setLayout(LayoutManager<O> manager)
Set layout manager for the container.
|
void |
setSize(Dimension size)
Set container size.
|
void |
setSize(double width,
double height)
Set container size.
|
void |
setWidth(double width)
Set container width.
|
void |
startSizeChange(boolean saveOldRect)
Indicates the beginning of the resize process.
|
Widget<O>[] |
widgets()
Get all widgets stored in the container.
|
default java.util.List<Widget<O>> |
widgetsAsList()
Get all widgets stored in the container.
|
java.util.List<Widget<O>> |
widgetsAsList(boolean system)
Get all widgets stored in the container.
|
acceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, destroy, dimension, displayPhysicalLocation, draw, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, height, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, minimumSize, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, width, windowContainer<O> add(Widget<O> widget)
widget - Widget to add.this for fluent syntax support.Container<O> add(Widget<O> before, Widget<O> widget)
before - The widget to insert before.widget - The child widget to add.this for fluent syntax support.java.lang.IllegalArgumentException - when the argument is null or instance of TopLevelWindowContainer<O> add(int pos, Widget<O> widget)
pos - The widget's position.widget - The child widget to add.this for fluent syntax support.java.lang.IllegalArgumentException - when the argument is null or instance of TopLevelWindowboolean clipping()
true if container clips its children.Widget<O> currentFocus(boolean recurse)
The method allows to choose whether the focused widget is searched in the nested
containers (recurse == true) or whether only this container is searched
(recurse == false).
recurse - The parameter controls whether the method should recurse to the nested
containers when searching for the focused widget.Widget<O> defaultFocus()
void doLayout()
void endSizeChange(boolean repaint)
startSizeChange and endSizeChange calls is
suppressed.repaint - If true then the current bounding rectangle and
the rectangle saved during startSizeChange call
are repainted.Widget<O> focus()
Widget<O> get(int index)
null if no such component
exists.index - Widget index.null if index is out
of range.Rectangle getClipRect()
boolean hasFocusable(Widget<O> exclude)
exclude - A widget to ignore or null if any focusable
widget will do.true if there is at least one other widget that
can be focused.Insets insets()
insets in interface Widget<O extends OutputManager<?>>void moveBeforeTabItem(Widget<O> widget, Widget<O> before)
widget - Widget to move.before - The widget before to insert mover.void moveAfterTabItem(Widget<O> widget, Widget<O> after)
widget - Widget to move.after - The widget before to insert mover.void moveToBottom(Widget<O> widget)
widget - Widget to mover.void moveToTop(Widget<O> widget)
widget - Widget to mover.boolean moveToBottomInClass(Widget<O> widget)
widget - Widget to mover.true if the widget was movedboolean moveToTopInClass(Widget<O> widget)
widget - Widget to mover.true if the widget was movedvoid moveToZpos(Widget<O> widget, int pos)
widget - Widget to mover.pos - Position in Z-order.void nextFocus()
void prevFocus()
void remove(Widget<O> widget)
widget - Widget to remove.void replace(Widget<O> oldWidget, Widget<O> newWidget)
oldWidget - Old widget.newWidget - New widget.void setFocus(Widget<O> focus)
focus - Widget to set focus on.void setHeight(double height)
height - New container height.void setInsets(Insets insets)
insets - Insets to set.void setLayout(LayoutManager<O> manager)
manager - New layout manager.LayoutManager<O> getLayout()
void setSize(Dimension size)
size - Size to set.void setSize(double width,
double height)
width - New width.height - New height.void setWidth(double width)
width - Width to set.void startSizeChange(boolean saveOldRect)
startSizeChange and endSizeChange calls is
suppressed.saveOldRect - If true then the current bounding rectangle is
saved for future repainting.Widget<O>[] widgets()
java.util.List<Widget<O>> getTabItemList()
default java.util.List<Widget<O>> widgetsAsList()
java.util.List<Widget<O>> widgetsAsList(boolean system)
system - Set to true to return the child widgets as part of the system-level widget hierarchy.void firstFocus()
void lastFocus()
void detach(Widget<O> widget)
widget - Widget to detach.java.util.Set<Widget<?>> getIgnoreFocus()
null.void setIgnoreFocus(java.util.Collection<Widget<?>> widgets)
null may be used to clear the set.widgets - Set of widgets or null.Point childrenLocation(Widget<O> child)
child - Child component.void addContainerStateListener(ContainerStateListener<O> listener)
listener - A container state listener.void removeContainerStateListener(ContainerStateListener<O> listener)
listener - A container state listener.