|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<T>
T
- the child component typepublic abstract class Container<T extends Component>
Class for any BoxComponent
that can contain other components.
Containers handle the basic behavior of containing components, namely
managing, attaching, and detaching the child widgets.
BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
protected boolean |
attachChildren
True to attach the container's children (defaults to true). |
protected boolean |
enableLayout
False to disable the container's layout, stopping it from executing (defaults to false). |
protected boolean |
layoutExecuted
|
protected boolean |
layoutNeeded
|
protected boolean |
layoutOnAttach
|
protected boolean |
layoutOnChange
True to execute the container's layout when children are inserted and removed (defaults to false). |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Container()
Creates a new container. |
Method Summary | |
---|---|
protected boolean |
add(T item)
Adds a item to the container. |
protected int |
adjustIndex(T child,
int beforeIndex)
|
protected void |
adopt(T child)
Sets the child's parent to this container. |
protected ContainerEvent |
createContainerEvent(T item)
|
void |
disable()
Disable this component. |
protected void |
doAttachChildren()
|
protected void |
doDetachChildren()
|
protected boolean |
doLayout()
|
protected boolean |
doLayout(boolean force)
|
void |
enable()
Enable this component. |
T |
findItem(com.google.gwt.user.client.Element elem)
Returns the component whose element, or child element, matches the given element. |
T |
getItem(int index)
Returns the item at the given index or null if index out of bounds. |
T |
getItemByItemId(java.lang.String itemId)
Returns the item with the specified item id. |
int |
getItemCount()
Returns the number of children. |
java.util.List<T> |
getItems()
Returns the child items. |
protected Layout |
getLayout()
|
El |
getLayoutTarget()
Returns the container's layout target. |
com.google.gwt.user.client.ui.Widget |
getWidget(int index)
Returns the widget at the given index. |
int |
indexOf(T item)
Returns the index of the item. |
protected boolean |
insert(T item,
int index)
Adds a item into the container. |
protected boolean |
isLayoutNeeded()
|
java.util.Iterator<T> |
iterator()
Returns an iterator over the container's children. |
protected boolean |
layout()
Executes the container's layout. |
protected boolean |
layout(boolean force)
* Executes the container's layout. |
protected void |
notifyHide()
|
protected void |
notifyShow()
|
protected void |
onAfterLayout()
|
protected void |
onAttach()
|
protected void |
onBeforeLayoutExcecuted(Layout layout)
|
protected void |
onInsert(T item,
int index)
|
protected void |
onLayoutExcecuted(Layout layout)
|
protected void |
onRemove(T item)
|
protected void |
orphan(T child)
|
protected boolean |
remove(T item)
Removes the item from the container. |
protected boolean |
remove(T component,
boolean force)
|
boolean |
removeAll()
Removes all the container's items. |
protected boolean |
removeAll(boolean force)
|
void |
scrollIntoView(T item)
Scrolls the item into view. |
protected void |
setLayout(Layout layout)
Sets the container's layout. |
protected void |
setLayoutNeeded(boolean layoutNeeded)
|
protected void |
setLayoutOnChange(boolean change)
|
protected Component |
wrapWidget(com.google.gwt.user.client.ui.Widget widget)
Helper Method for the subclasses that wish to support automatic wrapping of Widget instances in WidgetComponents If the widget is a component, no wrapping is performed |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, afterRender, createComponentEvent, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onResize, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean attachChildren
protected boolean enableLayout
protected boolean layoutOnChange
protected boolean layoutExecuted
protected boolean layoutNeeded
protected boolean layoutOnAttach
Constructor Detail |
---|
public Container()
Method Detail |
---|
public void disable()
Component
disable
in class Component
public void enable()
Component
enable
in class Component
public T findItem(com.google.gwt.user.client.Element elem)
elem
- the element
null
if no matchpublic T getItem(int index)
index
- the index
public T getItemByItemId(java.lang.String itemId)
itemId
- the item id
null
if no matchpublic int getItemCount()
public java.util.List<T> getItems()
public El getLayoutTarget()
public com.google.gwt.user.client.ui.Widget getWidget(int index)
index
- the index
public int indexOf(T item)
item
- the item
public java.util.Iterator<T> iterator()
public boolean removeAll()
public void scrollIntoView(T item)
item
- the itemprotected boolean add(T item)
item
- the item to be addedprotected int adjustIndex(T child, int beforeIndex)
protected void adopt(T child)
child
- the child widgetprotected ContainerEvent createContainerEvent(T item)
protected void doAttachChildren()
doAttachChildren
in class Component
protected void doDetachChildren()
doDetachChildren
in class Component
protected boolean doLayout()
protected boolean doLayout(boolean force)
protected Layout getLayout()
protected boolean insert(T item, int index)
item
- the item to insertindex
- the insert locationprotected boolean isLayoutNeeded()
protected boolean layout()
FlowLayout
will be used.
protected boolean layout(boolean force)
FlowLayout
will be used.
force
- true to force the layout call, also if caching things it is
not needed
protected void notifyHide()
notifyHide
in class Component
protected void notifyShow()
notifyShow
in class Component
protected void onAfterLayout()
protected void onAttach()
onAttach
in class Component
protected void onBeforeLayoutExcecuted(Layout layout)
protected void onInsert(T item, int index)
protected void onLayoutExcecuted(Layout layout)
protected void onRemove(T item)
protected final void orphan(T child)
protected boolean remove(T item)
item
- the item to remove
true
if the item was removedprotected boolean remove(T component, boolean force)
protected boolean removeAll(boolean force)
protected void setLayout(Layout layout)
layout
- the new layoutprotected void setLayoutNeeded(boolean layoutNeeded)
protected void setLayoutOnChange(boolean change)
protected Component wrapWidget(com.google.gwt.user.client.ui.Widget widget)
widget
- the widget to be wrapped
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |