|
|||||||||
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>
com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
com.extjs.gxt.ui.client.widget.LayoutContainer
public class LayoutContainer
A Container
that lays out its children using a
Layout
. Layouts are responsible for connecting the child
components to the container. Layouts are very flexible as they can create any
internal element structure, inserting its child components at any location.
For example, a TableLayout lays out its children using HTML tables.
LayoutContainer container = new LayoutContainer(); container.add(new Button("Click Me")); container.setSize(300, 300); container.setBorders(true); RootPanel.get().add(container);
FlowLayout
is the the default layout and will be used if not a layout
is not specified. You must size/position containers unless they are in an
existing container that lays out its children.
Layout
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 |
---|
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
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 | |
---|---|
LayoutContainer()
Creates a new layout container. |
|
LayoutContainer(Layout layout)
Creates a new layout container. |
Method Summary | |
---|---|
boolean |
add(com.google.gwt.user.client.ui.Widget widget)
Adds a widget to this Container. |
boolean |
add(com.google.gwt.user.client.ui.Widget widget,
LayoutData layoutData)
Adds a widget to this Container. |
Html |
addText(java.lang.String text)
Creates a new HTML instance and adds it to the container. |
WidgetComponent |
findComponent(com.google.gwt.user.client.ui.Widget widget)
Returns the widget component that wraps the given widget. |
Layout |
getLayout()
Returns the layout which is associated with the container, or null if one has not been set. |
El |
getLayoutTarget()
Override this method to specify the element to be used by the layout as the container. |
int |
getWindowResizeDelay()
Returns the window resize delay. |
boolean |
insert(com.google.gwt.user.client.ui.Widget widget,
int index)
Inserts a widget into this Container at a specified index. |
boolean |
insert(com.google.gwt.user.client.ui.Widget widget,
int index,
LayoutData layoutData)
Inserts a widget into this Container at a specified index. |
boolean |
isLayoutOnChange()
Returns true if the layout will be executed when widgets are
added or removed. |
boolean |
isMonitorWindowResize()
Returns true if browser resizing is monitored |
boolean |
layout()
Executes the container's layout. |
boolean |
layout(boolean force)
* Executes the container's layout. |
protected void |
onBlur(ComponentEvent ce)
|
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
protected void |
onFocus(ComponentEvent ce)
|
protected void |
onRender(com.google.gwt.user.client.Element parent,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
boolean |
remove(com.google.gwt.user.client.ui.Widget widget)
Removes a component from this container. |
boolean |
removeAll()
Removes all of children from this container. |
void |
setLayout(Layout layout)
Sets the container's layout. |
void |
setLayoutData(Component component,
LayoutData layoutData)
Sets the component's layout data. |
void |
setLayoutOnChange(boolean layoutOnChange)
Specifies if the container's layout should be called when widgets are added or removed. |
void |
setMonitorWindowResize(boolean monitorWindowResize)
True to have onWindowResize executed when the browser window is resized (default to false). |
void |
setWindowResizeDelay(int delay)
Sets delay in milliseconds used to buffer window resizing (defaults to 100). |
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer |
---|
addScrollListener, afterRender, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
add, adjustIndex, adopt, createContainerEvent, disable, doAttachChildren, doDetachChildren, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, insert, isLayoutNeeded, iterator, notifyHide, notifyShow, onAfterLayout, onAttach, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, remove, removeAll, scrollIntoView, setLayoutNeeded, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, 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 |
Constructor Detail |
---|
public LayoutContainer()
public LayoutContainer(Layout layout)
layout
- the layoutMethod Detail |
---|
public boolean add(com.google.gwt.user.client.ui.Widget widget)
widget
- the widget to add. If the widget is not a Component instance
it will be wrapped in a WidgetComponentpublic boolean add(com.google.gwt.user.client.ui.Widget widget, LayoutData layoutData)
widget
- the widget to add. If the widget is not a Component instance
it will be wrapped in a WidgetComponentlayoutData
- the layout datapublic Html addText(java.lang.String text)
text
- the html text
public WidgetComponent findComponent(com.google.gwt.user.client.ui.Widget widget)
widget
- the wrapped widget
public Layout getLayout()
null
if one has not been set.
getLayout
in class Container<Component>
null
public El getLayoutTarget()
getLayoutTarget
in class Container<Component>
public int getWindowResizeDelay()
Component
getWindowResizeDelay
in class Component
public boolean insert(com.google.gwt.user.client.ui.Widget widget, int index)
widget
- the widget to insert. If the widget is not a Component
instance it will be wrapped in a WidgetComponentindex
- the index at which the component will be inserted inpublic boolean insert(com.google.gwt.user.client.ui.Widget widget, int index, LayoutData layoutData)
widget
- the widget to insert. If the widget is not a Component
instance it will be wrapped in a WidgetComponentindex
- the index at which the component will be inserted inlayoutData
- the component's layout datapublic boolean isLayoutOnChange()
true
if the layout will be executed when widgets are
added or removed.
public boolean isMonitorWindowResize()
Component
isMonitorWindowResize
in class Component
public boolean layout()
Container
FlowLayout
will be used.
layout
in class Container<Component>
public boolean layout(boolean force)
Container
FlowLayout
will be used.
layout
in class Container<Component>
force
- true to force the layout call, also if caching things it is
not needed
public boolean remove(com.google.gwt.user.client.ui.Widget widget)
widget
- the widget to removepublic boolean removeAll()
removeAll
in class Container<Component>
public void setLayout(Layout layout)
setLayout
in class Container<Component>
layout
- the new layoutpublic void setLayoutData(Component component, LayoutData layoutData)
component
- the componentlayoutData
- the layout datapublic void setLayoutOnChange(boolean layoutOnChange)
false
.
setLayoutOnChange
in class Container<Component>
layoutOnChange
- true
to enablepublic void setMonitorWindowResize(boolean monitorWindowResize)
Component
setMonitorWindowResize
in class Component
monitorWindowResize
- true to monitor window resizingpublic void setWindowResizeDelay(int delay)
Component
setWindowResizeDelay
in class Component
delay
- the delaypublic void onComponentEvent(ComponentEvent ce)
Component
Component.onBrowserEvent(com.google.gwt.user.client.Event)
method
should not be overridden or modified.
onComponentEvent
in class ScrollContainer<Component>
ce
- the base eventprotected void onFocus(ComponentEvent ce)
protected void onBlur(ComponentEvent ce)
protected void onRender(com.google.gwt.user.client.Element parent, int index)
Component
onRender
in class Component
parent
- the target elementindex
- the insert location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |