public class VerticalLayoutContainer extends InsertResizeContainer implements HasScrollSupport
A layout container that lays out its children in a single column. The lay out
properties for each child are specified using VerticalLayoutContainer.VerticalLayoutData
.
Note: This container must be given a size directly or by its parent.
VerticalLayoutContainer c = new VerticalLayoutContainer();
c.add(new FieldLabel(new TextField(), "Home"), new VerticalLayoutData(1, .5));
c.add(new FieldLabel(new TextField(), "Office"), new VerticalLayoutData(1, .5));
RootPanel.get().add(c);
Modifier and Type | Class and Description |
---|---|
static class |
VerticalLayoutContainer.VerticalLayoutData
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 |
---|
VerticalLayoutContainer()
Creates a vertical layout container.
|
Modifier and Type | Method and Description |
---|---|
void |
add(IsWidget child,
VerticalLayoutContainer.VerticalLayoutData layoutData)
Adds a widget to the vertical layout container with the specified layout
parameters.
|
HandlerRegistration |
addScrollHandler(ScrollHandler handler) |
protected void |
doLayout() |
protected void |
doPhysicalAttach(Widget child,
int beforeIndex) |
protected void |
doPhysicalDetach(Widget child) |
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,
VerticalLayoutContainer.VerticalLayoutData layoutData)
Inserts the widget at the specified index in the vertical 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, 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, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disableContextMenu, disableEvents, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, 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, onTouch, 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 VerticalLayoutContainer()
public void add(IsWidget child, VerticalLayoutContainer.VerticalLayoutData 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, VerticalLayoutContainer.VerticalLayoutData 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
protected void doPhysicalAttach(Widget child, int beforeIndex)
doPhysicalAttach
in class Container
protected void doPhysicalDetach(Widget child)
doPhysicalDetach
in class Container
Copyright © 2018. All rights reserved.