com.sencha.gxt.widget.core.client.container
Class VerticalLayoutContainer

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.container.Container
                  extended by com.sencha.gxt.widget.core.client.container.ResizeContainer
                      extended by com.sencha.gxt.widget.core.client.container.InsertResizeContainer
                          extended by com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer
All Implemented Interfaces:
HasScrollHandlers, HasAttachHandlers, HasResizeHandlers, HasHandlers, EventListener, HasEnabled, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, HasScrollSupport, HasLayout, AddEvent.HasAddHandlers, BeforeAddEvent.HasBeforeAddHandlers, BeforeHideEvent.HasBeforeHideHandlers, BeforeRemoveEvent.HasBeforeRemoveHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, ContainerHandler.HasContainerHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, RemoveEvent.HasRemoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId, java.lang.Iterable<Widget>

public class VerticalLayoutContainer
extends InsertResizeContainer
implements HasScrollHandlers, HasScrollSupport

A layout container that lays out its children in a single column. The lay out properties for each child are specified using VerticalLayoutContainer.VerticalLayoutData.

Code Snippet:

    VerticalLayoutContainer c = new VerticalLayoutContainer();
    c.add(new FieldLabel(new TextField(), "Home"), new VerticalLayoutData(1, -1));
    c.add(new FieldLabel(new TextField(), "Office"), new VerticalLayoutData(1, -1));
    RootPanel.get().add(c);
 


Nested Class Summary
static class VerticalLayoutContainer.VerticalLayoutData
          Specifies parameters that control the layout of the widget in the container.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
InsertPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
VerticalLayoutContainer()
          Creates a vertical layout container.
 
Method Summary
 void add(IsWidget child, VerticalLayoutContainer.VerticalLayoutData layoutData)
          Adds a widget to the vertical layout container with the specified layout parameters.
 HandlerRegistration addScrollHandler(ScrollHandler handler)
           
 ScrollSupport.ScrollMode getScrollMode()
          Returns the scroll mode from the container's ScrollSupport instance.
 ScrollSupport getScrollSupport()
          Returns the scroll support instance.
 void insert(IsWidget w, int beforeIndex, VerticalLayoutContainer.VerticalLayoutData layoutData)
          Inserts the widget at the specified index in the vertical layout container.
 boolean isAdjustForScroll()
          Returns true if the container reserves space for the scroll bar.
 void setAdjustForScroll(boolean adjustForScroll)
          True to request that the container reserve space for the scroll bar (defaults to false).
 void setScrollMode(ScrollSupport.ScrollMode scrollMode)
          Sets the scroll mode on the container's ScrollSupport instance.
 void setScrollSupport(ScrollSupport support)
          Sets the scroll support.
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.InsertResizeContainer
insert, insert
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.ResizeContainer
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.Container
add, add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disableEvents, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, onBrowserEvent, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
add
 
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel
add
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Constructor Detail

VerticalLayoutContainer

public VerticalLayoutContainer()
Creates a vertical layout container.

Method Detail

add

@UiChild(tagname="child")
public void add(IsWidget child,
                               VerticalLayoutContainer.VerticalLayoutData layoutData)
Adds a widget to the vertical layout container with the specified layout parameters.

Parameters:
child - the widget to add to the layout container
layoutData - the parameters that describe how to lay out the widget

addScrollHandler

public HandlerRegistration addScrollHandler(ScrollHandler handler)
Specified by:
addScrollHandler in interface HasScrollHandlers

getScrollMode

public ScrollSupport.ScrollMode getScrollMode()
Returns the scroll mode from the container's ScrollSupport instance.

Returns:
the scroll mode

getScrollSupport

public ScrollSupport getScrollSupport()
Description copied from interface: HasScrollSupport
Returns the scroll support instance.

Specified by:
getScrollSupport in interface HasScrollSupport
Returns:
the scroll support instance

insert

public void insert(IsWidget w,
                   int beforeIndex,
                   VerticalLayoutContainer.VerticalLayoutData layoutData)
Inserts the widget at the specified index in the vertical layout container.

Parameters:
w - the widget to insert in the layout container
beforeIndex - the insert index
layoutData - the parameters that describe how to lay out the widget

isAdjustForScroll

public boolean isAdjustForScroll()
Returns true if the container reserves space for the scroll bar.

Returns:
true if the container reserves space for the scroll bar

setAdjustForScroll

public void setAdjustForScroll(boolean adjustForScroll)
True to request that the container reserve space for the scroll bar (defaults to false).

Parameters:
adjustForScroll - true to reserve space for the scroll bar

setScrollMode

public void setScrollMode(ScrollSupport.ScrollMode scrollMode)
Sets the scroll mode on the container's ScrollSupport instance. The scroll mode will not be preserved if setScrollSupport(ScrollSupport) is called AFTER calling this method.

Parameters:
scrollMode - the scroll mode

setScrollSupport

public void setScrollSupport(ScrollSupport support)
Description copied from interface: HasScrollSupport
Sets the scroll support.

Specified by:
setScrollSupport in interface HasScrollSupport
Parameters:
support - the scroll support


Copyright © 2012. All Rights Reserved.