com.extjs.gxt.ui.client.widget
クラス Container<T extends Component>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.Container<T>
Type Parameters:
T - the child component type
すべての実装インターフェース:
Observable, com.google.gwt.user.client.EventListener
Direct Known Subclasses:
ButtonBar, HtmlContainer, Menu, ScrollContainer, Table, TabPanel, ToolBar, Tree

public abstract class Container<T extends Component>
extends BoxComponent

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.

When children are added to a container they are not physcially added to the DOM of the container. Subclasses are responsible for connecting the child components.

Container does not define a root element. setElement must be called by any subclass to ensure the container has an element.


入れ子クラス 概要
 
クラス com.google.gwt.user.client.ui.UIObject から継承された 入れ子クラス/インターフェース
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field 概要
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたフィールド(Fields)
DEBUG_ID_PREFIX
 
コンストラクタ 概要
Container()
          Creates a new container.
 
メソッド 概要
 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.
 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.
 java.util.Iterator<T> iterator()
          Returns an iterator over the container's children.
 boolean removeAll()
          Removes all the container's items.
 void scrollIntoView(T item)
          Scrolls the item into view.
 
クラス com.extjs.gxt.ui.client.widget.BoxComponentから継承されたメソッド
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShim, setSize, setSize, setWidth, setWidth
 
クラス com.extjs.gxt.ui.client.widget.Componentから継承されたメソッド
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isEnabled, isRendered, isVisible, onBrowserEvent, onComponentEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, show, toString
 
クラス com.google.gwt.user.client.ui.Widget から継承されたメソッド
getParent, isAttached
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたメソッド
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタ 詳細

Container

public Container()
Creates a new container.

メソッド 詳細

findItem

public T findItem(com.google.gwt.user.client.Element elem)
Returns the component whose element, or child element, matches the given element.

パラメータ:
elem - the element
戻り値:
the matching component or null if no match

getItem

public T getItem(int index)
Returns the item at the given index or null if index out of bounds.

パラメータ:
index - the index
戻り値:
the item

getItemByItemId

public T getItemByItemId(java.lang.String itemId)
Returns the item with the specified item id.

パラメータ:
itemId - the item id
戻り値:
the button or null if no match

getItemCount

public int getItemCount()
Returns the number of children.

戻り値:
the component count

getItems

public java.util.List<T> getItems()
Returns the child items.

戻り値:
the children

getWidget

public com.google.gwt.user.client.ui.Widget getWidget(int index)
Returns the widget at the given index. If the child is a WidgetComponent, the wrapped widget is returned.

パラメータ:
index - the index
戻り値:
the widget

indexOf

public int indexOf(T item)
Returns the index of the item.

パラメータ:
item - the item
戻り値:
the index

iterator

public java.util.Iterator<T> iterator()
Returns an iterator over the container's children.

戻り値:
an iterator

removeAll

public boolean removeAll()
Removes all the container's items.

戻り値:
true if all items where removed

scrollIntoView

public void scrollIntoView(T item)
Scrolls the item into view.

パラメータ:
item - the item