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
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasOverflow |
protected List<Widget> |
hiddens |
protected TextButton |
more |
protected Menu |
moreMenu |
forceLayoutCommand, forceLayoutOnResize, hadLayoutRunning, layoutCommand, layoutRequiredThisEventLoop, layoutRunning
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Modifier | Constructor and Description |
---|---|
|
HBoxLayoutContainer()
Creates a new HBoxlayout.
|
|
HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align)
Creates a new HBoxlayout.
|
protected |
HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align,
HBoxLayoutContainer.HBoxLayoutContainerAppearance appearance) |
|
HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutContainerAppearance appearance)
Creates a new HBoxlayout.
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addOverflowHandler(OverflowEvent.OverflowHandler handler)
Adds a
OverflowEvent handler. |
protected void |
addWidgetToMenu(Menu menu,
Widget w) |
protected void |
clearMenu() |
protected void |
doLayout() |
HBoxLayoutContainer.HBoxLayoutContainerAppearance |
getAppearance()
Returns the horizontal layout appearance.
|
HBoxLayoutContainer.HBoxLayoutAlign |
getHBoxLayoutAlign()
Returns the horizontal alignment.
|
protected int |
getWidgetWidth(Widget widget) |
protected void |
hideComponent(Widget w) |
protected void |
initMore() |
boolean |
isEnableOverflow()
Returns true if overflow is enabled.
|
protected boolean |
isHidden(Widget w) |
protected void |
onInsert(int index,
Widget child) |
protected void |
onOverflow() |
protected void |
onRemove(Widget child) |
protected void |
onUnoverflow() |
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).
|
protected void |
unhideComponent(Widget w) |
add, getContainerTarget, getPack, getPadding, getScrollOffset, insert, isAdjustForFlexRemainder, setAdjustForFlexRemainder, setPack, setPadding, setScrollOffset
insert, insert
applyLayout, applyLayout, forceLayout, forceLayoutOnChildren, forceLayoutOnChildren, getLeftRightMargins, getParentLayoutWidget, getSideMargins, getTopBottomMargins, isLayoutRunning, isOrWasLayoutRunning, isWidgetVisible, onBeforeDoLayout, onLoad, onResize, onResize
add, add, addAddHandler, addBeforeAddHandler, addBeforeRemoveHandler, addContainerHandler, addRemoveHandler, adjustIndex, adopt, checkIndexBoundsForInsertion, clear, disable, doAttachChildren, doDetachChildren, doPhysicalAttach, doPhysicalDetach, enable, ensureGroupingHandlerRegistration, findWidget, getChildren, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, onWidgetHide, onWidgetShow, orphan, remove, remove, remove
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onBlur, onBrowserEvent, onDetach, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onPosition, onRightClick, onShow, onShowContextMenu, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
protected List<Widget> hiddens
protected boolean hasOverflow
protected TextButton more
protected Menu moreMenu
public HBoxLayoutContainer()
public HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutContainerAppearance appearance)
appearance
- the hbox appearancepublic HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align)
align
- the horizontal alignmentprotected HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign align, HBoxLayoutContainer.HBoxLayoutContainerAppearance appearance)
public 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 alignmentprotected void addWidgetToMenu(Menu menu, Widget w)
protected void clearMenu()
protected void doLayout()
doLayout
in class ResizeContainer
protected int getWidgetWidth(Widget widget)
protected void hideComponent(Widget w)
protected void initMore()
protected boolean isHidden(Widget w)
protected void onRemove(Widget child)
onRemove
in class BoxLayoutContainer
protected void onOverflow()
protected void onUnoverflow()
protected void unhideComponent(Widget w)
Copyright © 2018. All rights reserved.