| com.gwtext.client.widgets.Component com.gwtext.client.widgets.BoxComponent com.gwtext.client.widgets.Container
All known Subclasses: com.gwtext.client.widgets.Panel,
Container | public class Container extends BoxComponent implements HasWidgets(Code) | | Base class for any
BoxComponent that can contain other components. Containers handle the basic behavior of
containing items, namely adding, inserting and removing them. The specific layout logic required to visually render
contained items is delegated to any one of the different layout classes available. This class is intended to be extended
and should generally not need to be created directly via the new keyword.
|
Method Summary | |
public void | add(Component component, LayoutData layoutData) Add a Component to the Container. | public void | add(Widget widget) Add a widget to the Container. | public void | add(Widget widget, LayoutData layoutData) Add a widget to the Container. | public void | add(Component component) Add a Component to the Container. | native public void | addListener(ContainerListener listener) Add a Container listener. | native public void | bubble(ComponentTraversalCallback cb) Bubbles up the component/container heirarchy, calling the specified function with each component. | native public void | cascade(ComponentTraversalCallback cb) Cascades down the component/container heirarchy from this component (called first), calling the specified function with each component. | public void | clear() Remove all child elements destroying them. | native protected JavaScriptObject | create(JavaScriptObject config) | native public void | doLayout() Force this container's layout to be recalculated. | native public Component[] | findBy(ComponentTraversalCallback cb) Find a component under this container at any level by a custom function. | native public Component | findByID(String id) Find a component under this container at any level by id. | native public Component[] | findByType(String xtype) Find a component under this container at any level by xtype. | public int | getActiveItem() Return the Active Item index. | public String | getActiveItemID() | public boolean | getAutoDestroy() | public boolean | getBufferResize() | native public Component | getComponent(String id) Gets a direct child Component by id. | native public Component | getComponent(int index) Gets a direct child Component by by index. | native public Component[] | getComponents() The collection of components in this container. | protected JavaScriptObject | getConfigPrototype() | public boolean | getHideBorders() True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false). | public Component[] | getItems() The collection of components in this container. | public ContainerLayout | getLayout() | public boolean | getMonitorResize() | public String | getXType() | public void | insert(int index, Component component) Inserts a Component into this Container at a specified index. | public Iterator | iterator() | native public void | remove(String id) Removes a component from this container. | public boolean | remove(Widget w) | native public void | remove(Component component, boolean autoDestroy) Removes a component from this container. | native public void | remove(String id, boolean autoDestroy) Removes a component from this container. | native public void | removeAll() Removes all child components without destroying them. | native public void | removeAll(boolean autoDestroy) Removes all components from this container. | public void | setActiveItem(int activeItem) A string component id or the numeric index of the component that should be initially activated within the
container's layout on render. | public void | setActiveItemID(String activeItem) A string component id or the numeric index of the component that should be initially activated within the
container's layout on render. | public void | setAutoDestroy(boolean autoDestroy) If true the container will automatically destroy any contained component that is removed from it, else destruction
must be handled manually (defaults to true). | public void | setBufferResize(boolean bufferResize) When set to true (100 milliseconds), the layout assigned for this container will buffer
the frequency it calculates and does a re-layout of components. | public void | setDefaults(DefaultsHandler defaultsHandler) | public void | setHideBorders(boolean hideBorders) True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false). | public void | setLayout(ContainerLayout layout) The layout type to be used in this container. | public void | setMonitorResize(boolean monitorResize) True to automatically monitor window resize events to handle anything that is sensitive to the current size of the
viewport. |
Container | public Container()(Code) | | |
Container | public Container(JavaScriptObject jsObj)(Code) | | |
Container | public Container(Element element)(Code) | | |
add | public void add(Component component, LayoutData layoutData)(Code) | | Add a Component to the Container.
Parameters: component - the component to add Parameters: layoutData - the layout to use when adding the component |
add | public void add(Widget widget)(Code) | | Add a widget to the Container.
Parameters: widget - the widget to add |
add | public void add(Widget widget, LayoutData layoutData)(Code) | | Add a widget to the Container.
Parameters: widget - the widget to add Parameters: layoutData - the layout to use when adding the component |
add | public void add(Component component)(Code) | | Add a Component to the Container.
Parameters: component - the component to add |
addListener | native public void addListener(ContainerListener listener)(Code) | | Add a Container listener.
Parameters: listener - the listener |
bubble | native public void bubble(ComponentTraversalCallback cb)(Code) | | Bubbles up the component/container heirarchy, calling the specified function with each component.
If the function returns false at any point, the bubble is stopped.
Parameters: cb - the traversal callback |
cascade | native public void cascade(ComponentTraversalCallback cb)(Code) | | Cascades down the component/container heirarchy from this component (called first), calling the specified function with each component.
If the function returns false at any point, the cascade is stopped on that branch.
Parameters: cb - the traversal callback |
clear | public void clear()(Code) | | Remove all child elements destroying them.
|
create | native protected JavaScriptObject create(JavaScriptObject config)(Code) | | |
doLayout | native public void doLayout()(Code) | | Force this container's layout to be recalculated. A call to this function is required after adding a new component
to an already rendered container. If you are not dynamically adding and removing components after render, this function will generally not need to be called.
|
findBy | native public Component[] findBy(ComponentTraversalCallback cb)(Code) | | Find a component under this container at any level by a custom function. If the passed function returns true,
the component will be included in the results.
Parameters: cb - the find function an array of Components |
findByID | native public Component findByID(String id)(Code) | | Find a component under this container at any level by id.
Parameters: id - the component ID the component |
findByType | native public Component[] findByType(String xtype)(Code) | | Find a component under this container at any level by xtype.
Parameters: xtype - the components xtype an array of components |
getActiveItem | public int getActiveItem()(Code) | | Return the Active Item index.
the active item index |
getActiveItemID | public String getActiveItemID()(Code) | | the active Item ID |
getAutoDestroy | public boolean getAutoDestroy()(Code) | | true if Component is configured to auto destroy contained components on destruction |
getBufferResize | public boolean getBufferResize()(Code) | | true if buffer resize is enabled |
getComponent | native public Component getComponent(String id)(Code) | | Gets a direct child Component by id.
Parameters: id - the component ID the component |
getComponent | native public Component getComponent(int index)(Code) | | Gets a direct child Component by by index.
Parameters: index - the component index the component |
getComponents | native public Component[] getComponents()(Code) | | The collection of components in this container.
child components |
getConfigPrototype | protected JavaScriptObject getConfigPrototype()(Code) | | |
getHideBorders | public boolean getHideBorders()(Code) | | True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false).
true if hide borders |
getMonitorResize | public boolean getMonitorResize()(Code) | | true if monitor resize |
insert | public void insert(int index, Component component)(Code) | | Inserts a Component into this Container at a specified index. Fires the beforeadd event before inserting, then fires
the add event after the Component has been inserted.
Parameters: index - the index to insert the component at Parameters: component - the component to insert |
remove | native public void remove(String id)(Code) | | Removes a component from this container. Fires the beforeremove event before removing, then fires the remove event after the component has been removed.
Parameters: id - the id of the Component to remove |
remove | public boolean remove(Widget w)(Code) | | |
remove | native public void remove(Component component, boolean autoDestroy)(Code) | | Removes a component from this container. Fires the beforeremove event before removing, then fires the remove event after the component has been removed.
Parameters: component - the id of the Component to remove Parameters: autoDestroy - true to automatically invoke the Component's destroy method |
remove | native public void remove(String id, boolean autoDestroy)(Code) | | Removes a component from this container. Fires the beforeremove event before removing, then fires the remove event after the component has been removed.
Parameters: id - the id of the Component to remove Parameters: autoDestroy - true to automatically invoke the Component's destroy method |
removeAll | native public void removeAll()(Code) | | Removes all child components without destroying them.
|
removeAll | native public void removeAll(boolean autoDestroy)(Code) | | Removes all components from this container. Fires the beforeremove event before removing, then fires the remove event
after the component has been removed.
Parameters: autoDestroy - true to automatically invoke the component's destroy |
setAutoDestroy | public void setAutoDestroy(boolean autoDestroy)(Code) | | If true the container will automatically destroy any contained component that is removed from it, else destruction
must be handled manually (defaults to true).
Parameters: autoDestroy - true to autodestroy |
setBufferResize | public void setBufferResize(boolean bufferResize)(Code) | | When set to true (100 milliseconds), the layout assigned for this container will buffer
the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers
with a large amount of sub components that frequent calls to layout are expensive.
Parameters: bufferResize - true to buffer resize |
setHideBorders | public void setHideBorders(boolean hideBorders)(Code) | | True to hide the borders of each contained component, false to defer to the component's existing border settings (defaults to false).
Parameters: hideBorders - true to hide borders |
setLayout | public void setLayout(ContainerLayout layout) throws IllegalStateException(Code) | | The layout type to be used in this container. If not specified, a default ContainerLayout will be created and used.
Parameters: layout - the layout to use throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setMonitorResize | public void setMonitorResize(boolean monitorResize) throws IllegalStateException(Code) | | True to automatically monitor window resize events to handle anything that is sensitive to the current size of the
viewport. This value is typically managed by the chosen layout and should not need to be set manually.
Parameters: monitorResize - true to monitor resize throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
Methods inherited from com.gwtext.client.widgets.Component | public void addClass(String cls)(Code)(Java Doc) native public void addClassCreated(String cls)(Code)(Java Doc) native public void addEvent(String events)(Code)(Java Doc) public void addEvents(String[] events)(Code)(Java Doc) protected void addListener(String event, JavaScriptObject fn)(Code)(Java Doc) native public void addListener(String event, Function funtion)(Code)(Java Doc) native protected void addListener(ComponentListener listener)(Code)(Java Doc) protected void afterRender()(Code)(Java Doc) protected void beforeDestroy()(Code)(Java Doc) protected void check() throws IllegalStateException(Code)(Java Doc) public Component cloneComponent()(Code)(Java Doc) public Component cloneComponent(Component overrides)(Code)(Java Doc) native protected JavaScriptObject cloneConfig(JavaScriptObject config)(Code)(Java Doc) abstract protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc) native public void destroy()(Code)(Java Doc) public void disable()(Code)(Java Doc) public void enable()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) protected void error(String message) throws IllegalStateException(Code)(Java Doc) public void focus()(Code)(Java Doc) native public void focus(boolean selectText)(Code)(Java Doc) native public void focus(boolean selectText, int delay)(Code)(Java Doc) public Element getApplyTo()(Code)(Java Doc) protected String getAttribute(String attribute)(Code)(Java Doc) protected boolean getAttributeAsBoolean(String attribute)(Code)(Java Doc) protected float getAttributeAsFloat(String attribute)(Code)(Java Doc) protected int getAttributeAsInt(String attribute)(Code)(Java Doc) protected JavaScriptObject getAttributeAsJavaScriptObject(String attribute)(Code)(Java Doc) public boolean getAutoShow()(Code)(Java Doc) public String getCls()(Code)(Java Doc) native protected static JavaScriptObject getComponentJS(String id)(Code)(Java Doc) public JavaScriptObject getConfig()(Code)(Java Doc) abstract protected JavaScriptObject getConfigPrototype()(Code)(Java Doc) public String getCtCls()(Code)(Java Doc) public String getDisabledClass()(Code)(Java Doc) native public ExtElement getEl()(Code)(Java Doc) native protected Element getElement(JavaScriptObject jsObj)(Code)(Java Doc) public Element getElement()(Code)(Java Doc) public String getHideMode()(Code)(Java Doc) public boolean getHideParent()(Code)(Java Doc) public String getId()(Code)(Java Doc) native public String getItemId()(Code)(Java Doc) public JavaScriptObject getJsObj()(Code)(Java Doc) public int getOffsetHeight()(Code)(Java Doc) public int getOffsetWidth()(Code)(Java Doc) public JavaScriptObject getOrCreateJsObj()(Code)(Java Doc) native public Container getOwnerContainer()(Code)(Java Doc) public Element getRenderTo()(Code)(Java Doc) public String[] getStateEvents()(Code)(Java Doc) public String getStateId()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) protected Element getStyleElement()(Code)(Java Doc) public String getTitle()(Code)(Java Doc) public String getXType()(Code)(Java Doc) native public String getXTypes()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void hide()(Code)(Java Doc) protected void initComponent()(Code)(Java Doc) public boolean isCreated()(Code)(Java Doc) public boolean isDisabled()(Code)(Java Doc) public boolean isHidden()(Code)(Java Doc) native public boolean isRendered()(Code)(Java Doc) native public boolean isVisible()(Code)(Java Doc) native public boolean isXType(String xtype)(Code)(Java Doc) native public boolean isXType(String xtype, boolean shallow)(Code)(Java Doc) protected void onDestroy()(Code)(Java Doc) native public void removeClass(String cls)(Code)(Java Doc) native public void render(String id)(Code)(Java Doc) native public void render(String id, String position)(Code)(Java Doc) native public void render(String id, int position)(Code)(Java Doc) native public void render(Element element)(Code)(Java Doc) native public void render(Element element, String position)(Code)(Java Doc) native public void render(Element element, int position)(Code)(Java Doc) public void setApplyTo(Element element) throws IllegalStateException(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, long value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, double value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, Date value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) public void setAutoEl(String autoEl)(Code)(Java Doc) public void setAutoShow(boolean autoShow) throws IllegalStateException(Code)(Java Doc) public void setCls(String cls)(Code)(Java Doc) public void setCtCls(String ctCls) throws IllegalStateException(Code)(Java Doc) public void setDisabled(boolean disabled)(Code)(Java Doc) public void setDisabledClass(String disabledClass)(Code)(Java Doc) public void setEl(Element el) throws IllegalStateException(Code)(Java Doc) public void setEl(String elementID) throws IllegalStateException(Code)(Java Doc) public void setHeight(String height)(Code)(Java Doc) public void setHideMode(String hideMode)(Code)(Java Doc) public void setHideParent(boolean hideParent) throws IllegalStateException(Code)(Java Doc) final public void setId(String id) throws IllegalStateException(Code)(Java Doc) public void setRenderTo(Element elem) throws IllegalStateException(Code)(Java Doc) public void setStateEvents(String[] stateEvents) throws IllegalStateException(Code)(Java Doc) public void setStateId(String stateId) throws IllegalStateException(Code)(Java Doc) public void setStyle(String style) throws IllegalStateException(Code)(Java Doc) public void setTitle(String title)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(String width)(Code)(Java Doc) public void show()(Code)(Java Doc)
|
|
|