public abstract class Container extends Component implements ContainerHandler.HasContainerHandlers
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
Container() |
Modifier and Type | Method and Description |
---|---|
void |
add(IsWidget child)
Adds a widget to this panel.
|
void |
add(Widget child)
Adds the specified widget to the container.
|
HandlerRegistration |
addAddHandler(AddEvent.AddHandler handler)
Adds the
AddEvent.AddHandler to the Container |
HandlerRegistration |
addBeforeAddHandler(BeforeAddEvent.BeforeAddHandler handler)
Adds the
BeforeAddEvent.BeforeAddHandler to the Container |
HandlerRegistration |
addBeforeRemoveHandler(BeforeRemoveEvent.BeforeRemoveHandler handler)
Adds the
BeforeRemoveEvent.BeforeRemoveHandler to the Container |
HandlerRegistration |
addContainerHandler(ContainerHandler handler)
Adds the
ContainerHandler to the Container |
HandlerRegistration |
addRemoveHandler(RemoveEvent.RemoveHandler handler)
Adds the
RemoveEvent.RemoveHandler to the Container |
protected int |
adjustIndex(Widget child,
int beforeIndex) |
protected void |
adopt(Widget child) |
protected void |
checkIndexBoundsForInsertion(int index) |
void |
clear()
Clears the container's children
|
void |
disable()
Disable this widget.
|
protected void |
doAttachChildren() |
protected void |
doDetachChildren() |
protected void |
doPhysicalAttach(Widget child,
int beforeIndex) |
protected void |
doPhysicalDetach(Widget child) |
void |
enable()
Enable this widget.
|
protected GroupingHandlerRegistration |
ensureGroupingHandlerRegistration(Widget widget) |
Widget |
findWidget(Element elem)
Returns the widget whose element, or child element, matches the given
element.
|
protected WidgetCollection |
getChildren()
Gets the list of children contained in this panel.
|
protected XElement |
getContainerTarget() |
Widget |
getItemByItemId(String itemId)
Returns the child widget with the specified item id.
|
Widget |
getWidget(int index) |
int |
getWidgetCount() |
int |
getWidgetIndex(IsWidget child) |
int |
getWidgetIndex(Widget child) |
protected void |
insert(Widget child,
int beforeIndex)
Insert a new child Widget into this Panel at a specified index, attaching
its Element to the specified container Element.
|
Iterator<Widget> |
iterator() |
protected void |
onInsert(int index,
Widget child) |
protected void |
onRemove(Widget child) |
protected void |
onWidgetHide(Widget source) |
protected void |
onWidgetShow(Widget source) |
protected void |
orphan(Widget child) |
boolean |
remove(int index) |
boolean |
remove(IsWidget child) |
boolean |
remove(Widget child) |
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onBlur, onBrowserEvent, onDetach, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onResize, onRightClick, onShow, onShowContextMenu, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
public void add(IsWidget child)
child
- the child widget to be addedpublic void add(Widget child)
Panel#add(Widget)
for a
number of things you must take into consideration.child
- the child widget to be added.UnsupportedOperationException
- if the derived class has not properly
overridden the method. See Panel#add(Widget)
for more
information.public HandlerRegistration addAddHandler(AddEvent.AddHandler handler)
AddEvent.AddHandler
to the ContaineraddAddHandler
in interface AddEvent.HasAddHandlers
handler
- the handlerHandlerRegistration
public HandlerRegistration addBeforeAddHandler(BeforeAddEvent.BeforeAddHandler handler)
BeforeAddEvent.BeforeAddHandler
to the ContaineraddBeforeAddHandler
in interface BeforeAddEvent.HasBeforeAddHandlers
handler
- the handlerHandlerRegistration
public HandlerRegistration addBeforeRemoveHandler(BeforeRemoveEvent.BeforeRemoveHandler handler)
BeforeRemoveEvent.BeforeRemoveHandler
to the ContaineraddBeforeRemoveHandler
in interface BeforeRemoveEvent.HasBeforeRemoveHandlers
handler
- the handlerHandlerRegistration
public HandlerRegistration addContainerHandler(ContainerHandler handler)
ContainerHandler
to the ContaineraddContainerHandler
in interface ContainerHandler.HasContainerHandlers
handler
- the handlerHandlerRegistration
public HandlerRegistration addRemoveHandler(RemoveEvent.RemoveHandler handler)
RemoveEvent.RemoveHandler
to the ContaineraddRemoveHandler
in interface RemoveEvent.HasRemoveHandlers
handler
- the handlerHandlerRegistration
public void clear()
public void disable()
Component
public void enable()
Component
public Widget findWidget(Element elem)
elem
- the elementnull
if no matchpublic Widget getItemByItemId(String itemId)
itemId
- the item idnull
if no matchpublic Widget getWidget(int index)
public int getWidgetCount()
public int getWidgetIndex(IsWidget child)
public int getWidgetIndex(Widget child)
public Iterator<Widget> iterator()
public boolean remove(int index)
public boolean remove(IsWidget child)
public boolean remove(Widget child)
protected int adjustIndex(Widget child, int beforeIndex)
protected final void adopt(Widget child)
protected void checkIndexBoundsForInsertion(int index)
protected void doAttachChildren()
protected void doDetachChildren()
protected void doPhysicalAttach(Widget child, int beforeIndex)
protected void doPhysicalDetach(Widget child)
protected GroupingHandlerRegistration ensureGroupingHandlerRegistration(Widget widget)
protected WidgetCollection getChildren()
protected XElement getContainerTarget()
protected void insert(Widget child, int beforeIndex)
domInsert
.child
- the child Widget to be addedbeforeIndex
- the index before which child
will be
insertedprotected void onInsert(int index, Widget child)
protected void onRemove(Widget child)
protected void onWidgetHide(Widget source)
protected void onWidgetShow(Widget source)
protected final void orphan(Widget child)
Copyright © 2018. All rights reserved.