public class HBoxLayoutContainer extends BoxLayoutContainer implements OverflowEvent.HasOverflowHandlers
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);
ToolBar
Modifier and Type | Class and Description |
---|---|
static class |
HBoxLayoutContainer.HBoxLayoutAlign
The vertical alignment of the horizontal widgets.
|
static interface |
HBoxLayoutContainer.HBoxLayoutContainerAppearance |
BoxLayoutContainer.BoxLayoutContainerAppearance, BoxLayoutContainer.BoxLayoutData, BoxLayoutContainer.BoxLayoutPack
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
InsertPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
Constructor and Description |
---|
HBoxLayoutContainer()
Creates a new HBoxlayout.
|
HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align)
Creates a new HBoxlayout.
|
HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutContainerAppearance appearance)
Creates a new HBoxlayout.
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addOverflowHandler(OverflowEvent.OverflowHandler handler)
Adds a
OverflowEvent handler. |
HBoxLayoutContainer.HBoxLayoutContainerAppearance |
getAppearance()
Returns the horizontal layout appearance.
|
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).
|
add, getPack, getPadding, getScrollOffset, insert, isAdjustForFlexRemainder, setAdjustForFlexRemainder, setPack, setPadding, setScrollOffset
insert, insert
forceLayout, isLayoutRunning, isOrWasLayoutRunning, onResize
add, add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, clear, disable, enable, findWidget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove, remove, remove
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, getShadowPosition, getStateId, getTabIndex, 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, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
add
add
getWidgetIndex
getWidget, getWidgetCount, getWidgetIndex, remove
public HBoxLayoutContainer()
public HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutContainerAppearance appearance)
appearance
- the hbox appearancepublic HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align)
align
- the horizontal alignmentpublic HandlerRegistration addOverflowHandler(OverflowEvent.OverflowHandler handler)
OverflowEvent.HasOverflowHandlers
OverflowEvent
handler.addOverflowHandler
in interface OverflowEvent.HasOverflowHandlers
handler
- the handlerpublic HBoxLayoutContainer.HBoxLayoutContainerAppearance getAppearance()
getAppearance
in class BoxLayoutContainer
public HBoxLayoutContainer.HBoxLayoutAlign getHBoxLayoutAlign()
public boolean isEnableOverflow()
public void setEnableOverflow(boolean enableOverflow)
enableOverflow
- true to enable overflow supportpublic void setHBoxLayoutAlign(HBoxLayoutContainer.HBoxLayoutAlign hBoxLayoutAlign)
hBoxLayoutAlign
- the vertical alignmentCopyright © 2015. All rights reserved.