public class HorizontalLayoutContainer extends InsertResizeContainer implements HasScrollSupport
HorizontalLayoutContainer.HorizontalLayoutData
.
Code Snippet:
HorizontalLayoutContainer c = new HorizontalLayoutContainer(); HorizontalLayoutData layoutData = new HorizontalLayoutData(100, 100, new Margins(5)); c.add(new TextButton("Button 1"), layoutData); c.add(new TextButton("Button 2"), layoutData); c.add(new TextButton("Button 3"), layoutData); RootPanel.get().add(c);
Modifier and Type | Class and Description |
---|---|
static class |
HorizontalLayoutContainer.HorizontalLayoutData
Specifies parameters that control the layout of the widget in the
container.
|
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
Constructor and Description |
---|
HorizontalLayoutContainer()
Creates a horizontal layout container.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IsWidget child,
HorizontalLayoutContainer.HorizontalLayoutData layoutData)
Adds a widget to the horizontal layout container with the specified layout
parameters.
|
HandlerRegistration |
addScrollHandler(ScrollHandler handler) |
protected void |
doLayout() |
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,
HorizontalLayoutContainer.HorizontalLayoutData layoutData)
Inserts the widget at the specified index in the horizontal layout
container.
|
boolean |
isAdjustForScroll()
Returns true if the container reserves space for the scroll bar.
|
protected void |
onInsert(int index,
Widget child) |
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.
|
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, getContainerTarget, getItemByItemId, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, onRemove, 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
public HorizontalLayoutContainer()
public void add(IsWidget child, HorizontalLayoutContainer.HorizontalLayoutData layoutData)
child
- the widget to add to the layout containerlayoutData
- the parameters that describe how to lay out the widgetpublic HandlerRegistration addScrollHandler(ScrollHandler handler)
public ScrollSupport.ScrollMode getScrollMode()
ScrollSupport
instance.public ScrollSupport getScrollSupport()
HasScrollSupport
getScrollSupport
in interface HasScrollSupport
public void insert(IsWidget w, int beforeIndex, HorizontalLayoutContainer.HorizontalLayoutData layoutData)
w
- the widget to insert in the layout containerbeforeIndex
- the insert indexlayoutData
- the parameters that describe how to lay out the widgetpublic boolean isAdjustForScroll()
public void setAdjustForScroll(boolean adjustForScroll)
adjustForScroll
- true to reserve space for the scroll barpublic void setScrollMode(ScrollSupport.ScrollMode scrollMode)
ScrollSupport
instance. The scroll mode will not be preserved if
setScrollSupport(ScrollSupport)
is called AFTER calling this
method.scrollMode
- the scroll modepublic void setScrollSupport(ScrollSupport support)
HasScrollSupport
setScrollSupport
in interface HasScrollSupport
support
- the scroll supportprotected void doLayout()
doLayout
in class ResizeContainer
Copyright © 2018. All rights reserved.