| net.mygwt.ui.client.widget.Component net.mygwt.ui.client.widget.Container net.mygwt.ui.client.widget.ScrollContainer net.mygwt.ui.client.widget.WidgetContainer
All known Subclasses: net.mygwt.ui.client.widget.ContentPanel, net.mygwt.ui.client.widget.Viewport, net.mygwt.samples.data.client.Page, net.mygwt.samples.explorer.client.Page,
WidgetContainer | public class WidgetContainer extends ScrollContainer (Code) | | A Container that lays out its children using a Layout .
- Events:
- BeforeAdd : (widget, item, index)
Fires before a item is added or inserted. Listeners can set the
doit field to false to cancel the action.
- widget : this
- item : the item being added
- index : the index at which the item will be added
- BeforeRemove : (widget, item)
Fires before a item is removed. Listeners can set the doit
field to false to cancel the action.
- widget : this
- item : the item being removed
- Add : (widget, item, index)
Fires after a item has been added or inserted.
- widget : this
- item : the item that was added
- index : the index at which the item will be added
- Remove : (widget, item)
Fires after a item has been removed.
- widget : this
- item : the item being removed
See Also: Layout |
Field Summary | |
protected boolean | disableLayout disableLayout specifies if the container's layout is disabled. | protected Size | lastSize The size at the last time the layout executed. | protected Layout | layout The container's layout. |
Method Summary | |
public void | add(Widget widget) Adds a widget to the container. | public void | add(Widget widget, Object layoutData) Adds a widget the the container. | public void | addText(String text) Creates a new HTML instance and adds it to the container. | public Layout | getLayout() Returns the layout which is associated with the container, or
null if one has not been set. | public Object | getLayoutData(Widget widget) Returns the widget's layout data. | public boolean | getLayoutOnChange() Returns true if the layout will be executed when widgets are
added or removed. | public Element | getLayoutTarget() Override this method to specify the element the container's children will
be inserted. | public boolean | getMonitorResize() Returns the monitor resize state. | public int | indexOf(Widget widget) Returns the index of the widget. | public void | insert(Widget widget, int index) Inserts a widget into the container. | public void | insert(Widget widget, int index, Object layoutData) Inserts a widget into the container. | public void | layout() Asks the layout to lay out the container's children. | public void | layout(boolean force) Asks the layout to lay out the container's children. | protected void | onAttach() | protected void | onLayout() | protected void | onRender() | protected void | onResize(int width, int height) | public boolean | remove(Widget widget) | public void | removeAll() Removes all widgets. | public void | removeLayoutData(Widget widget) Removes the layout data for the specified widget. | public void | setLayout(Layout layout) Sets the container's layout. | public void | setLayoutData(Widget widget, Object layoutData) Sets the layout data for the widget. | public void | setLayoutOnChange(boolean layoutOnChange) Specifies if the container's layout should be called when widgets are added
or removed. | public void | setMonitorResize(boolean monitorResize) Sets the monitor resize state. |
disableLayout | protected boolean disableLayout(Code) | | disableLayout specifies if the container's layout is disabled. Default
value is false .
|
lastSize | protected Size lastSize(Code) | | The size at the last time the layout executed.
|
add | public void add(Widget widget)(Code) | | Adds a widget to the container.
Parameters: widget - the widget to add |
add | public void add(Widget widget, Object layoutData)(Code) | | Adds a widget the the container.
Parameters: widget - the widget to add Parameters: layoutData - the layout data |
addText | public void addText(String text)(Code) | | Creates a new HTML instance and adds it to the container.
Parameters: text - the html text |
getLayout | public Layout getLayout()(Code) | | Returns the layout which is associated with the container, or
null if one has not been set.
the container's layout or null |
getLayoutData | public Object getLayoutData(Widget widget)(Code) | | Returns the widget's layout data.
Parameters: widget - the widget the layout data |
getLayoutOnChange | public boolean getLayoutOnChange()(Code) | | Returns true if the layout will be executed when widgets are
added or removed.
the layout on change state |
getLayoutTarget | public Element getLayoutTarget()(Code) | | Override this method to specify the element the container's children will
be inserted.
the element to be used as the panel's container |
getMonitorResize | public boolean getMonitorResize()(Code) | | Returns the monitor resize state.
true if resizing is being monitored |
indexOf | public int indexOf(Widget widget)(Code) | | Returns the index of the widget.
Parameters: widget - the widget the index |
insert | public void insert(Widget widget, int index)(Code) | | Inserts a widget into the container.
Parameters: widget - the widget to add Parameters: index - the insert location |
insert | public void insert(Widget widget, int index, Object layoutData)(Code) | | Inserts a widget into the container.
Parameters: widget - the widget to insert Parameters: index - the insert location Parameters: layoutData - the layout data |
layout | public void layout()(Code) | | Asks the layout to lay out the container's children. If a layout has not
been set a FlowLayout will be used. If the size of the
container has not changed since the last time layout was called it will not
be execute. See
WidgetContainer.layout(boolean) to force the layout to execute.
|
layout | public void layout(boolean force)(Code) | | Asks the layout to lay out the container's children. If a layout has not
been set a FlowLayout will be used.
Parameters: force - true to force the layout to execute |
onAttach | protected void onAttach()(Code) | | |
onLayout | protected void onLayout()(Code) | | |
onRender | protected void onRender()(Code) | | |
onResize | protected void onResize(int width, int height)(Code) | | |
remove | public boolean remove(Widget widget)(Code) | | |
removeAll | public void removeAll()(Code) | | Removes all widgets.
|
removeLayoutData | public void removeLayoutData(Widget widget)(Code) | | Removes the layout data for the specified widget.
Parameters: widget - the widget |
setLayout | public void setLayout(Layout layout)(Code) | | Sets the container's layout.
Parameters: layout - the new layout |
setLayoutData | public void setLayoutData(Widget widget, Object layoutData)(Code) | | Sets the layout data for the widget.
Parameters: widget - the widget Parameters: layoutData - the widget's layout data |
setLayoutOnChange | public void setLayoutOnChange(boolean layoutOnChange)(Code) | | Specifies if the container's layout should be called when widgets are added
or removed. Default value is false .
Parameters: layoutOnChange - true to enable |
setMonitorResize | public void setMonitorResize(boolean monitorResize)(Code) | | Sets the monitor resize state. When true the container's
layout will be executed when the container is resized. Default value is
true .
Parameters: monitorResize - true to monitor resizing |
Methods inherited from net.mygwt.ui.client.widget.Component | public void addListener(int eventType, Listener listener)(Code)(Java Doc) public void addStyleName(String style)(Code)(Java Doc) public void addWidgetListener(WidgetListener listener)(Code)(Java Doc) protected void afterRender()(Code)(Java Doc) protected Component blur()(Code)(Java Doc) public void disable()(Code)(Java Doc) protected void disableContextMenu(boolean disable)(Code)(Java Doc) public void disableTextSelection(boolean disable)(Code)(Java Doc) public void dispose()(Code)(Java Doc) public void enable()(Code)(Java Doc) public void enableEvents(boolean enable)(Code)(Java Doc) public boolean fireEvent(int type)(Code)(Java Doc) public boolean fireEvent(int type, BaseEvent be)(Code)(Java Doc) public boolean fireEvent(int eventType, Widget widget, Widget item)(Code)(Java Doc) public boolean fireEvent(int eventType, Widget widget, Widget item, int index)(Code)(Java Doc) public Component focus()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public Rectangle getBounds(boolean content)(Code)(Java Doc) protected Menu getContextMenu()(Code)(Java Doc) public Object getData()(Code)(Java Doc) public Object getData(String key)(Code)(Java Doc) public String getDisabledStyle()(Code)(Java Doc) public Element getElement()(Code)(Java Doc) protected Element getFocusElement()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public int getHeight(boolean content)(Code)(Java Doc) public String getId()(Code)(Java Doc) public int getStyle()(Code)(Java Doc) public ToolTip getToolTip()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public int getWidth(boolean content)(Code)(Java Doc) public void hide()(Code)(Java Doc) public boolean isDisposed()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isRendered()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) protected void onAttach()(Code)(Java Doc) public void onBaseEvent(BaseEvent be)(Code)(Java Doc) public void onBrowserEvent(Event event)(Code)(Java Doc) protected void onDestroy()(Code)(Java Doc) protected void onDetach()(Code)(Java Doc) protected void onDisable()(Code)(Java Doc) protected void onEnable()(Code)(Java Doc) protected void onHide()(Code)(Java Doc) protected void onHideContextMenu()(Code)(Java Doc) protected void onLoad()(Code)(Java Doc) protected void onRender()(Code)(Java Doc) protected void onResize(int width, int height)(Code)(Java Doc) protected void onRightClick(BaseEvent be)(Code)(Java Doc) protected void onShow()(Code)(Java Doc) protected void onShowContextMenu(int x, int y)(Code)(Java Doc) public void recalculate()(Code)(Java Doc) public void removeAllListeners()(Code)(Java Doc) public void removeFromParent()(Code)(Java Doc) public void removeListener(int eventType, Listener listener)(Code)(Java Doc) public void removeStyleName(String style)(Code)(Java Doc) public void removeWidgetListener(WidgetListener listener)(Code)(Java Doc) protected void render()(Code)(Java Doc) public void setBorders(boolean show)(Code)(Java Doc) public void setBounds(int x, int y, int width, int height)(Code)(Java Doc) public void setBounds(Rectangle rect)(Code)(Java Doc) protected void setContextMenu(Menu menu)(Code)(Java Doc) public void setData(Object data)(Code)(Java Doc) public void setData(String key, Object data)(Code)(Java Doc) public void setDisabledStyle(String style)(Code)(Java Doc) public void setElement(Element elem)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setHeight(int height)(Code)(Java Doc) public void setHeight(String height)(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public void setIntStyleAttribute(String attr, int value)(Code)(Java Doc) public void setPagePosition(int x, int y)(Code)(Java Doc) public void setPixelSize(int width, int height)(Code)(Java Doc) public void setSize(int width, int height)(Code)(Java Doc) public void setSize(String width, String height)(Code)(Java Doc) public void setStyleAttribute(String attr, String value)(Code)(Java Doc) public void setStyleName(String style)(Code)(Java Doc) public void setTitle(String title)(Code)(Java Doc) public void setToolTip(String text)(Code)(Java Doc) public void setToolTip(String title, String text)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(int width)(Code)(Java Doc) public void setWidth(String width)(Code)(Java Doc) public void show()(Code)(Java Doc) public void unhook(int type, EventListener listener)(Code)(Java Doc)
|
|
|