public class FlowLayoutContainer extends InsertContainer implements HasScrollHandlers, 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);
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
InsertPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
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
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
fireEvent
add
add
getWidgetIndex
getWidget, getWidgetCount, getWidgetIndex, remove
public FlowLayoutContainer()
@UiChild(tagname="child") 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)
addScrollHandler
in interface HasScrollHandlers
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 © 2015. All rights reserved.