public class FlowLayoutContainer extends InsertContainer implements HasScrollSupport
FlowLayoutContainer c = new FlowLayoutContainer(); c.setScrollMode(ScrollMode.ALWAYS); MarginData layoutData = new MarginData(new Margins(0, 5, 0, 0)); 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);
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 |
---|
FlowLayoutContainer()
Creates a flow layout container.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IsWidget child,
MarginData layoutData)
Adds a widget to a flow 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,
MarginData layoutData)
Inserts the widget at the specified index in the flow layout container.
|
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, setElement
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, onInsert, 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, onLoad, onPosition, onResize, 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 FlowLayoutContainer()
public void add(IsWidget child, MarginData 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, MarginData layoutData)
w
- the widget to insert in the layout containerbeforeIndex
- the insert indexlayoutData
- the parameters that describe how to lay out the widgetpublic 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 supportCopyright © 2018. All rights reserved.