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

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.BoxLayoutContainer
                              extended by com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasHandlers, EventListener, HasEnabled, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, InsertPanel, InsertPanel.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, 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, OverflowEvent.HasOverflowHandlers, RemoveEvent.HasRemoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId, java.lang.Iterable<Widget>
Direct Known Subclasses:
ToolBar

public class HBoxLayoutContainer
extends BoxLayoutContainer
implements OverflowEvent.HasOverflowHandlers

A layout container for horizontal rows of widgets. Provides support for automatic overflow (i.e. when there are too many widgets to display in the available width -- see setEnableOverflow(boolean)).

Code Snippet:

    HBoxLayoutContainer c = new HBoxLayoutContainer();
    c.setHBoxLayoutAlign(HBoxLayoutAlign.TOP);
    BoxLayoutData layoutData = new BoxLayoutData(new Margins(5, 0, 0, 5));
    c.add(new TextButton("Button 1"), layoutData);
    c.add(new TextButton("Button 2"), layoutData);
    c.add(new TextButton("Button 3"), layoutData);
    Viewport v = new Viewport();
    v.add(c);
    RootPanel.get().add(v);
 

See Also:
ToolBar

Nested Class Summary
static class HBoxLayoutContainer.HBoxLayoutAlign
          The vertical alignment of the horizontal widgets.
 
Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.container.BoxLayoutContainer
BoxLayoutContainer.BoxLayoutContainerAppearance, BoxLayoutContainer.BoxLayoutData, BoxLayoutContainer.BoxLayoutPack
 
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
HBoxLayoutContainer()
          Creates a new HBoxlayout.
HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align)
          Creates a new HBoxlayout.
 
Method Summary
 HandlerRegistration addOverflowHandler(OverflowEvent.OverflowHandler handler)
          Adds a OverflowEvent handler.
 HBoxLayoutContainer.HBoxLayoutAlign getHBoxLayoutAlign()
          Returns the horizontal alignment.
 boolean isEnableOverflow()
          Returns true if overflow is enabled.
 void setEnableOverflow(boolean enableOverflow)
          True to show a drop down icon when the available width is less than the required width (defaults to true).
 void setHBoxLayoutAlign(HBoxLayoutContainer.HBoxLayoutAlign hBoxLayoutAlign)
          Sets the vertical alignment for child items (defaults to TOP).
 
Methods inherited from class com.sencha.gxt.widget.core.client.container.BoxLayoutContainer
add, getPack, getPadding, getScrollOffset, insert, isAdjustForFlexRemainder, setAdjustForFlexRemainder, setPack, setPadding, setScrollOffset
 
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

HBoxLayoutContainer

public HBoxLayoutContainer()
Creates a new HBoxlayout.


HBoxLayoutContainer

public HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align)
Creates a new HBoxlayout.

Parameters:
align - the horizontal alignment
Method Detail

addOverflowHandler

public HandlerRegistration addOverflowHandler(OverflowEvent.OverflowHandler handler)
Description copied from interface: OverflowEvent.HasOverflowHandlers
Adds a OverflowEvent handler.

Specified by:
addOverflowHandler in interface OverflowEvent.HasOverflowHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

getHBoxLayoutAlign

public HBoxLayoutContainer.HBoxLayoutAlign getHBoxLayoutAlign()
Returns the horizontal alignment.

Returns:
the horizontal alignment

isEnableOverflow

public boolean isEnableOverflow()
Returns true if overflow is enabled.

Returns:
the overflow state

setEnableOverflow

public void setEnableOverflow(boolean enableOverflow)
True to show a drop down icon when the available width is less than the required width (defaults to true).

Parameters:
enableOverflow - true to enable overflow support

setHBoxLayoutAlign

public void setHBoxLayoutAlign(HBoxLayoutContainer.HBoxLayoutAlign hBoxLayoutAlign)
Sets the vertical alignment for child items (defaults to TOP).

Parameters:
hBoxLayoutAlign - the vertical alignment


Copyright © 2012. All Rights Reserved.