com.smartgwt.client.widgets.layout
Class Layout

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.layout.Layout
All Implemented Interfaces:
HasHandlers, EventListener, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers
Direct Known Subclasses:
ColumnTree, FilterBuilder, HLayout, HStack, Toolbar, ToolStrip, VLayout, VStack

public class Layout
extends Canvas

A subclass of Canvas that automatically arranges other Canvases according to a layout policy.

A Layout manages a set of "member" Canvases initialized via the "members" property. Layouts can have both "members", which are managed by the Layout, and normal Canvas children, which are unmanaged.

Rather than using the Layout class directly, use the HLayout, VLayout, HStack and VStack classes, which are subclasses of Layout preconfigured for horizontal or vertical stacking, with the "fill" (VLayout) or "none" (VStack) LayoutPolicy already set.

Layouts and Stacks may be nested to create arbitrarily complex layouts.

To show a resizer bar after (to the right or bottom of) a layout member, set showResizeBar to true on that member component (not on the HLayout or VLayout). Resizer bars override membersMargin spacing.

Like other Canvas subclasses, Layout and Stack components may have % width and height values. To create a dynamically-resizing layout that occupies the entire page (or entire parent component), set width and height to "100%".


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Layout()
           
Layout(JavaScriptObject jsObj)
           
 
Method Summary
 void addMember(Canvas component)
          Add a canvas to the layout, optionally at a specific position.
 void addMember(Canvas component, int position)
          Add a canvas to the layout, optionally at a specific position.
 void addMember(Widget widget)
          Add a canvas to the layout, optionally at a specific position.
 void addMember(Widget widget, int position)
           
protected  void addMemberPostCreate(Object componentJS)
           
protected  void addMemberPostCreate(Object componentJS, int position)
           
protected  void addMemberPreCreate(Object componentJS)
           
protected  void addMemberPreCreate(Object componentJS, int position)
           
protected  JavaScriptObject create()
           
 Boolean getAnimateMembers()
          If true when members are added / removed, they should be animated as they are shown or hidden in position
 Integer getAnimateMemberTime()
          If specified this is the duration of show/hide animations when members are being shown or hidden due to being added / removed from this layout.
 Boolean getCanDropComponents()
          Layouts provide a default implementation of a drag and drop interaction.
 LayoutResizeBarPolicy getDefaultResizeBars()
          Policy for whether resize bars are shown on members by default.
protected  Canvas getDropComponent(Canvas dragTarget, int dropPosition)
           
 int getDropLineThickness()
          Thickness, in pixels of the dropLine shown during drag and drop when canDropComponents is set to true.
 int getDropPosition()
          Get the position a new member would be dropped.
 Boolean getEnforcePolicy()
          Whether the layout policy is continuously enforced as new members are added or removed and as members are resized.
 LayoutPolicy getHPolicy()
          Sizing policy applied to members on horizonal axis
 Integer getLayoutBottomMargin()
          Space outside of all members, on the bottom side.
 Integer getLayoutLeftMargin()
          Space outside of all members, on the left-hand side.
 Integer getLayoutMargin()
          Space outside of all members.
 Integer getLayoutRightMargin()
          Space outside of all members, on the right-hand side.
 Integer getLayoutTopMargin()
          Space outside of all members, on the top side.
 Boolean getLeaveScrollbarGap()
          Whether to leave a gap for a vertical scrollbar even when one is not actually present.
 Boolean getManagePercentBreadth()
          If set, a Layout with breadthPolicy:"fill" will specially interpret a percentage breadth on a member as a percentage of available space excluding the layoutMargin.
 Canvas getMember(int index)
          Given a numerical index or a member ID, return a pointer to the appropriate member.
 Canvas getMember(String memberID)
          Given a numerical index or a member ID, return a pointer to the appropriate member.
 void getMemberDefaultBreadth(Canvas member, int defaultBreadth)
          Return the breadth for a member of this layout which either didn't specify a breadth or specified a percent breadth with managePercentBreadth:true.
 int getMemberNumber(Canvas member)
          Given a member Canvas or member ID, return the index of that member within this layout's members array
 int getMemberNumber(String memberID)
          Given a member Canvas or member ID, return the index of that member within this layout's members array
 void getMemberOffset(Canvas member, int defaultOffset, String alignment)
          An optional method that, if it exists, allows the manipulation of the calculated offset for members of this layout.
 int getMemberOverlap()
          Number of pixels by which each member should overlap the preceding member, used for creating an "stack of cards" appearance for the members of a Layout.
 Canvas[] getMembers()
          Return the members in the Layout.
 int getMembersMargin()
          Space between each member of the layout.
 int getMinMemberSize()
          Minimum size, in pixels, below which members should never be shrunk, even if this requires the Layout to overflow.
static Layout getOrCreateRef(JavaScriptObject jsObj)
           
 Overflow getOverflow()
          Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if members exceed its specified size, whereas an overflow:visible Layout will grow to accomodate members.
 Boolean getPaddingAsLayoutMargin()
          If this widget has padding specified (as 'this.padding' or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?
 String getResizeBarClass()
          Class to use for creating resizeBars.
 int getResizeBarSize()
          Thickness of the resizeBars in pixels
 Boolean getReverseOrder()
          Reverse the order of stacking for this Layout, so that the last member is shown first.
 Boolean getShowDragPlaceHolder()
          If set to true, when a member is dragged out of layout, a visible placeholder canvas will be displayed in place of the dragged widget for the duration of the drag and drop interaction.
 String getStackZIndex()
          For use in conjunction with memberOverlap, controls the z-stacking order of members.
 Boolean getVertical()
          Should this layout appear with members stacked vertically or horizontally.
 LayoutPolicy getVPolicy()
          Sizing policy applied to members on vertical axis
 Boolean hasMember(Canvas canvas)
          Returns true if the layout includes the specified canvas.
 void hideDropLine()
          Calling this method hides the dropLine shown during a drag and drop interaction with a Layout that has canDropComponents set to true.
 void hideMember(Canvas member)
          Hide the specified member, firing the specified callback when the hide is complete.
 void hideMember(Canvas member, Function callback)
          Hide the specified member, firing the specified callback when the hide is complete.
 void membersChanged()
          Fires once at initialization if the layout has any initial members, and then fires whenever members are added, removed or reordered.
protected  void onInit()
           
 void reflow()
          Layout members according to current settings.
 void reflow(String reason)
          Layout members according to current settings.
 void reflowNow()
          Layout members according to current settings, immediately.
 void removeMember(Canvas member)
          Removes the specified member from the layout.
 void removeMembers(Canvas[] members)
          Removes the specified members from the layout.
 void reorderMember(int memberNum, int newPosition)
          Shift a member of the layout to a new position
 void reorderMembers(int start, int end, int newPosition)
          Move a range of members to a new position
 void setAlign(Alignment alignment)
          Alignment of all members in this Layout on the length axis.
 void setAlign(VerticalAlignment alignment)
          Alignment of all members in this Layout on the length axis.
 void setAnimateMembers(Boolean animateMembers)
          If true when members are added / removed, they should be animated as they are shown or hidden in position
 void setAnimateMemberTime(Integer animateMemberTime)
          If specified this is the duration of show/hide animations when members are being shown or hidden due to being added / removed from this layout.
 void setCanDropComponents(Boolean canDropComponents)
          Layouts provide a default implementation of a drag and drop interaction.
 void setDefaultLayoutAlign(Alignment alignment)
          Specifies the default alignment for layout members on the breadth axis.
 void setDefaultLayoutAlign(VerticalAlignment alignment)
          Specifies the default alignment for layout members on the breadth axis.
 void setDefaultResizeBars(LayoutResizeBarPolicy defaultResizeBars)
          Policy for whether resize bars are shown on members by default.
 void setDropLineProperties(Canvas dropLineProperties)
           
 void setDropLineThickness(int dropLineThickness)
          Thickness, in pixels of the dropLine shown during drag and drop when canDropComponents is set to true.
 void setEnforcePolicy(Boolean enforcePolicy)
          Whether the layout policy is continuously enforced as new members are added or removed and as members are resized.
 void setHPolicy(LayoutPolicy hPolicy)
          Sizing policy applied to members on horizonal axis
 void setLayoutBottomMargin(Integer layoutBottomMargin)
          Space outside of all members, on the bottom side.
 void setLayoutLeftMargin(Integer layoutLeftMargin)
          Space outside of all members, on the left-hand side.
 void setLayoutMargin(Integer layoutMargin)
          Space outside of all members.
 void setLayoutRightMargin(Integer layoutRightMargin)
          Space outside of all members, on the right-hand side.
 void setLayoutTopMargin(Integer layoutTopMargin)
          Space outside of all members, on the top side.
 void setLeaveScrollbarGap(Boolean leaveScrollbarGap)
          Whether to leave a gap for a vertical scrollbar even when one is not actually present.
 void setManagePercentBreadth(Boolean managePercentBreadth)
          If set, a Layout with breadthPolicy:"fill" will specially interpret a percentage breadth on a member as a percentage of available space excluding the layoutMargin.
 void setMemberOverlap(int memberOverlap)
          Number of pixels by which each member should overlap the preceding member, used for creating an "stack of cards" appearance for the members of a Layout.
 void setMembers(Canvas... members)
          An array of canvases that will be contained within this layout.
 void setMembersMargin(int membersMargin)
          Space between each member of the layout.
 void setMinMemberSize(int minMemberSize)
          Minimum size, in pixels, below which members should never be shrunk, even if this requires the Layout to overflow.
 void setOverflow(Overflow overflow)
          Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if members exceed its specified size, whereas an overflow:visible Layout will grow to accomodate members.
 void setPaddingAsLayoutMargin(Boolean paddingAsLayoutMargin)
          If this widget has padding specified (as 'this.padding' or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?
 void setPlaceHolderDefaults(Canvas placeHolderDefaults)
          If showDragPlaceHolder is true, this defaults object determines the default appearance of the placeholder displayed when the user drags a widget out of this layout.
Default value for this property sets the placeholder styleName to "layoutPlaceHolder"
To modify this object, use com.smartgwt.client..Class#changeDefaults
 void setPlaceHolderProperties(Canvas placeHolderProperties)
          If showDragPlaceHolder is true, this properties object can be used to customize the appearance of the placeholder displayed when the user drags a widget out of this layout.
 void setResizeBarClass(String resizeBarClass)
          Class to use for creating resizeBars.
 void setResizeBarSize(int resizeBarSize)
          Thickness of the resizeBars in pixels
 void setReverseOrder(Boolean reverseOrder)
          Reverse the order of stacking for this Layout, so that the last member is shown first.
 void setShowDragPlaceHolder(Boolean showDragPlaceHolder)
          If set to true, when a member is dragged out of layout, a visible placeholder canvas will be displayed in place of the dragged widget for the duration of the drag and drop interaction.
 void setStackZIndex(String stackZIndex)
          For use in conjunction with memberOverlap, controls the z-stacking order of members.
 void setVertical(Boolean vertical)
          Should this layout appear with members stacked vertically or horizontally.
 void setVisibleMember(Canvas member)
          Hide all other members and make the single parameter member visible.
 void setVPolicy(LayoutPolicy vPolicy)
          Sizing policy applied to members on vertical axis
 void showMember(Canvas member)
          Show the specified member, firing the specified callback when the hide is complete.
 void showMember(Canvas member, Function callback)
          Show the specified member, firing the specified callback when the hide is complete.
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, adjustForContent, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, convertToCanvasArray, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowTime, getAnimateTime, getAppImgDir, getAutoShowParent, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionCursor, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getLeftAsString, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getTopAsString, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, parentResized, redraw, redraw, removeChild, removeChild, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowTime, setAnimateTime, setAppImgDir, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionCursor, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNoDoubleClicks, setOpacity, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, updateHover, updateHover, updateShadow, visibleAtPoint, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, hashCode, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

Layout

public Layout()

Layout

public Layout(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static Layout getOrCreateRef(JavaScriptObject jsObj)

create

protected JavaScriptObject create()
Overrides:
create in class Canvas

setOverflow

public void setOverflow(Overflow overflow)
                 throws IllegalStateException
Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if members exceed its specified size, whereas an overflow:visible Layout will grow to accomodate members.

Overrides:
setOverflow in class Canvas
Parameters:
overflow - overflow Default value is "visible"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getOverflow

public Overflow getOverflow()
Normal Overflow settings can be used on layouts, for example, an overflow:auto Layout will scroll if members exceed its specified size, whereas an overflow:visible Layout will grow to accomodate members.

Overrides:
getOverflow in class Canvas
Returns:
Overflow

setVertical

public void setVertical(Boolean vertical)
Should this layout appear with members stacked vertically or horizontally. Defaults to false if unspecified.

Parameters:
vertical - vertical Default value is null

getVertical

public Boolean getVertical()
Should this layout appear with members stacked vertically or horizontally. Defaults to false if unspecified.

Returns:
Boolean

setVPolicy

public void setVPolicy(LayoutPolicy vPolicy)
Sizing policy applied to members on vertical axis

Note : This is an advanced setting

Parameters:
vPolicy - vPolicy Default value is "fill"

getVPolicy

public LayoutPolicy getVPolicy()
Sizing policy applied to members on vertical axis

Returns:
LayoutPolicy

setHPolicy

public void setHPolicy(LayoutPolicy hPolicy)
Sizing policy applied to members on horizonal axis

Note : This is an advanced setting

Parameters:
hPolicy - hPolicy Default value is "fill"

getHPolicy

public LayoutPolicy getHPolicy()
Sizing policy applied to members on horizonal axis

Returns:
LayoutPolicy

setMinMemberSize

public void setMinMemberSize(int minMemberSize)
                      throws IllegalStateException
Minimum size, in pixels, below which members should never be shrunk, even if this requires the Layout to overflow.

Parameters:
minMemberSize - minMemberSize Default value is 1
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getMinMemberSize

public int getMinMemberSize()
Minimum size, in pixels, below which members should never be shrunk, even if this requires the Layout to overflow.

Returns:
int

setEnforcePolicy

public void setEnforcePolicy(Boolean enforcePolicy)
Whether the layout policy is continuously enforced as new members are added or removed and as members are resized.

This setting implies that any member that resizes larger, or any added member, will take space from other members in order to allow the overall layout to stay the same size.

Note : This is an advanced setting

Parameters:
enforcePolicy - enforcePolicy Default value is true

getEnforcePolicy

public Boolean getEnforcePolicy()
Whether the layout policy is continuously enforced as new members are added or removed and as members are resized.

This setting implies that any member that resizes larger, or any added member, will take space from other members in order to allow the overall layout to stay the same size.

Returns:
Boolean

setReverseOrder

public void setReverseOrder(Boolean reverseOrder)
Reverse the order of stacking for this Layout, so that the last member is shown first.

Requires a manual call to reflow() if changed on the fly.

In RTL mode, for horizontal Layouts the value of this flag will be flipped during initialization.

Parameters:
reverseOrder - reverseOrder Default value is false

getReverseOrder

public Boolean getReverseOrder()
Reverse the order of stacking for this Layout, so that the last member is shown first.

Requires a manual call to reflow() if changed on the fly.

In RTL mode, for horizontal Layouts the value of this flag will be flipped during initialization.

Returns:
Boolean

setPaddingAsLayoutMargin

public void setPaddingAsLayoutMargin(Boolean paddingAsLayoutMargin)
If this widget has padding specified (as 'this.padding' or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?

If this setting is false, padding will not affect member positioning (as CSS padding normally does not affect absolutely positioned children). Leaving this setting true allows a designer to more effectively control layout purely from CSS.

Note that layoutMargin if specified, takes precidence over this value.

Note : This is an advanced setting

Parameters:
paddingAsLayoutMargin - paddingAsLayoutMargin Default value is true

getPaddingAsLayoutMargin

public Boolean getPaddingAsLayoutMargin()
If this widget has padding specified (as 'this.padding' or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?

If this setting is false, padding will not affect member positioning (as CSS padding normally does not affect absolutely positioned children). Leaving this setting true allows a designer to more effectively control layout purely from CSS.

Note that layoutMargin if specified, takes precidence over this value.

Returns:
Boolean

setLayoutMargin

public void setLayoutMargin(Integer layoutMargin)
Space outside of all members. This attribute, along with layoutLeftMargin and related properties does not have a true setter method.
It may be assigned directly at runtime. After setting the property, setLayoutMargin(java.lang.Integer) may be called with no arguments to reflow the layout. Method to force a reflow of the layout after directly assigning a value to any of the layout*Margin properties. Takes no arguments.

Parameters:
layoutMargin - layoutMargin Default value is null

getLayoutMargin

public Integer getLayoutMargin()
Space outside of all members. This attribute, along with layoutLeftMargin and related properties does not have a true setter method.
It may be assigned directly at runtime. After setting the property, setLayoutMargin(java.lang.Integer) may be called with no arguments to reflow the layout.

Returns:
Integer

setLayoutLeftMargin

public void setLayoutLeftMargin(Integer layoutLeftMargin)
Space outside of all members, on the left-hand side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Parameters:
layoutLeftMargin - layoutLeftMargin Default value is null

getLayoutLeftMargin

public Integer getLayoutLeftMargin()
Space outside of all members, on the left-hand side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Returns:
Integer

setLayoutRightMargin

public void setLayoutRightMargin(Integer layoutRightMargin)
Space outside of all members, on the right-hand side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Parameters:
layoutRightMargin - layoutRightMargin Default value is null

getLayoutRightMargin

public Integer getLayoutRightMargin()
Space outside of all members, on the right-hand side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Returns:
Integer

setLayoutTopMargin

public void setLayoutTopMargin(Integer layoutTopMargin)
Space outside of all members, on the top side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Parameters:
layoutTopMargin - layoutTopMargin Default value is null

getLayoutTopMargin

public Integer getLayoutTopMargin()
Space outside of all members, on the top side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Returns:
Integer

setLayoutBottomMargin

public void setLayoutBottomMargin(Integer layoutBottomMargin)
Space outside of all members, on the bottom side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Parameters:
layoutBottomMargin - layoutBottomMargin Default value is null

getLayoutBottomMargin

public Integer getLayoutBottomMargin()
Space outside of all members, on the bottom side. Defaults to layoutMargin.

Requires a manual call to setLayoutMargin() if changed on the fly.

Returns:
Integer

setMembersMargin

public void setMembersMargin(int membersMargin)
Space between each member of the layout.

Requires a manual call to reflow() if changed on the fly.

Parameters:
membersMargin - membersMargin Default value is 0

getMembersMargin

public int getMembersMargin()
Space between each member of the layout.

Requires a manual call to reflow() if changed on the fly.

Returns:
int

setLeaveScrollbarGap

public void setLeaveScrollbarGap(Boolean leaveScrollbarGap)
                          throws IllegalStateException
Whether to leave a gap for a vertical scrollbar even when one is not actually present.

This setting avoids the layout resizing all members when the vertical scrollbar is introduced or removed, which can avoid unnecessary screen shifting and improve performance.

Parameters:
leaveScrollbarGap - leaveScrollbarGap Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getLeaveScrollbarGap

public Boolean getLeaveScrollbarGap()
Whether to leave a gap for a vertical scrollbar even when one is not actually present.

This setting avoids the layout resizing all members when the vertical scrollbar is introduced or removed, which can avoid unnecessary screen shifting and improve performance.

Returns:
Boolean

setMemberOverlap

public void setMemberOverlap(int memberOverlap)
                      throws IllegalStateException
Number of pixels by which each member should overlap the preceding member, used for creating an "stack of cards" appearance for the members of a Layout.

memberOverlap can be used in conjunction with stackZIndex to create a particular visual stacking order.

Note that overlap of individual members can be accomplished with a negative setting for extraSpace.

Parameters:
memberOverlap - memberOverlap Default value is 0
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getMemberOverlap

public int getMemberOverlap()
Number of pixels by which each member should overlap the preceding member, used for creating an "stack of cards" appearance for the members of a Layout.

memberOverlap can be used in conjunction with stackZIndex to create a particular visual stacking order.

Note that overlap of individual members can be accomplished with a negative setting for extraSpace.

Returns:
int

setDefaultResizeBars

public void setDefaultResizeBars(LayoutResizeBarPolicy defaultResizeBars)
                          throws IllegalStateException
Policy for whether resize bars are shown on members by default.

Parameters:
defaultResizeBars - defaultResizeBars Default value is "marked"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDefaultResizeBars

public LayoutResizeBarPolicy getDefaultResizeBars()
Policy for whether resize bars are shown on members by default.

Returns:
LayoutResizeBarPolicy

setResizeBarClass

public void setResizeBarClass(String resizeBarClass)
Class to use for creating resizeBars.

A resize bar will be created for any Layout member that specifies 'showResizeBar:true'. Resize bars will be instances of the class specified by this property, and will automatically be sized to the member's breadth and to the thickness given by resizeBarSize.
Classes that are valid by default are Splitbar and ImgSplitbar.

To customize the appearance or behavior of resizeBars within some layout a custom resize bar class can be created by subclassing Splitbar or ImgSplitbar and setting this property on your layout to use your new class.

Resize bars will automatically be sized to the member's breadth and to the thickness given by layout.resizeBarSize. The built-in Splitbar class supports drag resizing of its target member, and clicking on the bar to hide the target member.

Note : This is an advanced setting

Parameters:
resizeBarClass - resizeBarClass Default value is "Splitbar"

getResizeBarClass

public String getResizeBarClass()
Class to use for creating resizeBars.

A resize bar will be created for any Layout member that specifies 'showResizeBar:true'. Resize bars will be instances of the class specified by this property, and will automatically be sized to the member's breadth and to the thickness given by resizeBarSize.
Classes that are valid by default are Splitbar and ImgSplitbar.

To customize the appearance or behavior of resizeBars within some layout a custom resize bar class can be created by subclassing Splitbar or ImgSplitbar and setting this property on your layout to use your new class.

Resize bars will automatically be sized to the member's breadth and to the thickness given by layout.resizeBarSize. The built-in Splitbar class supports drag resizing of its target member, and clicking on the bar to hide the target member.

Returns:
String

setResizeBarSize

public void setResizeBarSize(int resizeBarSize)
Thickness of the resizeBars in pixels

Note : This is an advanced setting

Parameters:
resizeBarSize - resizeBarSize Default value is 7

getResizeBarSize

public int getResizeBarSize()
Thickness of the resizeBars in pixels

Returns:
int

setAnimateMembers

public void setAnimateMembers(Boolean animateMembers)
If true when members are added / removed, they should be animated as they are shown or hidden in position

Parameters:
animateMembers - animateMembers Default value is null

getAnimateMembers

public Boolean getAnimateMembers()
If true when members are added / removed, they should be animated as they are shown or hidden in position

Returns:
Boolean

setAnimateMemberTime

public void setAnimateMemberTime(Integer animateMemberTime)
If specified this is the duration of show/hide animations when members are being shown or hidden due to being added / removed from this layout.

Note : This is an advanced setting

Parameters:
animateMemberTime - animateMemberTime Default value is null

getAnimateMemberTime

public Integer getAnimateMemberTime()
If specified this is the duration of show/hide animations when members are being shown or hidden due to being added / removed from this layout.

Returns:
Integer

setCanDropComponents

public void setCanDropComponents(Boolean canDropComponents)
                          throws IllegalStateException
Layouts provide a default implementation of a drag and drop interaction. If you set 'canAcceptDrop':true and canDropComponents:true on a Layout, when a droppable Canvas ('canDrop:true' is dragged over the layout will show a dropLine (a simple insertion line) at the drop location.

When the drop occurs, the dragTarget (obtained using EventHandler.getDragTarget()) is added as a member of this layout at the location shown by the dropLine (calculated by getDropPosition()). This default behavior allows either members or external components that have canDragReposition (or canDrag) and canDrop set to true to be added to or reordered within the Layout.

You can control the thickness of the dropLine via dropLineThickness and you can customize the style using css styling in the skin file (look for .layoutDropLine in skin_styles.css for your skin).

If you want to dynamically create a component to be added to the Layout in response to a drop event you can do so as follows:

 isc.VLayout.create({
  
 ...various layout properties...
   canDropComponents: true,
   drop : function () {
     // create the new
 component 
     var newMember = isc.Canvas.create(); 
     // add to the layout at the current drop position
 
     // (the dropLine will be showing here)
     this.addMember(newMember, this.getDropPosition());  
    
 // hide the dropLine that was automatically shown 
     // by builtin Smart GWT methods
    
 this.hideDropLine();
   }
 });
 
If you want to completely suppress the builtin drag and drop logic, but still receive drag and drop events for your own custom implementation, set canAcceptDrop to true and canDropComponents to false on your Layout.

Note : This is an advanced setting

Parameters:
canDropComponents - canDropComponents Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanDropComponents

public Boolean getCanDropComponents()
Layouts provide a default implementation of a drag and drop interaction. If you set 'canAcceptDrop':true and canDropComponents:true on a Layout, when a droppable Canvas ('canDrop:true' is dragged over the layout will show a dropLine (a simple insertion line) at the drop location.

When the drop occurs, the dragTarget (obtained using EventHandler.getDragTarget()) is added as a member of this layout at the location shown by the dropLine (calculated by getDropPosition()). This default behavior allows either members or external components that have canDragReposition (or canDrag) and canDrop set to true to be added to or reordered within the Layout.

You can control the thickness of the dropLine via dropLineThickness and you can customize the style using css styling in the skin file (look for .layoutDropLine in skin_styles.css for your skin).

If you want to dynamically create a component to be added to the Layout in response to a drop event you can do so as follows:

 isc.VLayout.create({
  
 ...various layout properties...
   canDropComponents: true,
   drop : function () {
     // create the new
 component 
     var newMember = isc.Canvas.create(); 
     // add to the layout at the current drop position
 
     // (the dropLine will be showing here)
     this.addMember(newMember, this.getDropPosition());  
    
 // hide the dropLine that was automatically shown 
     // by builtin Smart GWT methods
    
 this.hideDropLine();
   }
 });
 
If you want to completely suppress the builtin drag and drop logic, but still receive drag and drop events for your own custom implementation, set canAcceptDrop to true and canDropComponents to false on your Layout.

Returns:
Boolean

setDropLineThickness

public void setDropLineThickness(int dropLineThickness)
                          throws IllegalStateException
Thickness, in pixels of the dropLine shown during drag and drop when canDropComponents is set to true. See the discussion in Layout for more info.

Note : This is an advanced setting

Parameters:
dropLineThickness - dropLineThickness Default value is 2
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDropLineThickness

public int getDropLineThickness()
Thickness, in pixels of the dropLine shown during drag and drop when canDropComponents is set to true. See the discussion in Layout for more info.

Returns:
int

setShowDragPlaceHolder

public void setShowDragPlaceHolder(Boolean showDragPlaceHolder)
If set to true, when a member is dragged out of layout, a visible placeholder canvas will be displayed in place of the dragged widget for the duration of the drag and drop interaction.

Parameters:
showDragPlaceHolder - showDragPlaceHolder Default value is null

getShowDragPlaceHolder

public Boolean getShowDragPlaceHolder()
If set to true, when a member is dragged out of layout, a visible placeholder canvas will be displayed in place of the dragged widget for the duration of the drag and drop interaction.

Returns:
Boolean

setStackZIndex

public void setStackZIndex(String stackZIndex)
                    throws IllegalStateException
For use in conjunction with memberOverlap, controls the z-stacking order of members.

If "lastOnTop", members stack from the first member at bottom to the last member at top. If "firstOnTop", members stack from the last member at bottom to the first member at top.

Parameters:
stackZIndex - stackZIndex Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getStackZIndex

public String getStackZIndex()
For use in conjunction with memberOverlap, controls the z-stacking order of members.

If "lastOnTop", members stack from the first member at bottom to the last member at top. If "firstOnTop", members stack from the last member at bottom to the first member at top.

Returns:
String

setManagePercentBreadth

public void setManagePercentBreadth(Boolean managePercentBreadth)
                             throws IllegalStateException
If set, a Layout with breadthPolicy:"fill" will specially interpret a percentage breadth on a member as a percentage of available space excluding the layoutMargin. If false, percentages work exactly as for a non-member, with layoutMargins, if any, ignored.

Parameters:
managePercentBreadth - managePercentBreadth Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getManagePercentBreadth

public Boolean getManagePercentBreadth()
If set, a Layout with breadthPolicy:"fill" will specially interpret a percentage breadth on a member as a percentage of available space excluding the layoutMargin. If false, percentages work exactly as for a non-member, with layoutMargins, if any, ignored.

Returns:
Boolean

getMemberOffset

public void getMemberOffset(Canvas member,
                            int defaultOffset,
                            String alignment)
An optional method that, if it exists, allows the manipulation of the calculated offset for members of this layout. Returns the offset for the specified member.

Parameters:
member - Component to be positioned
defaultOffset - Value of the currently calculated member offset. This may be returned verbatim or manupulated in this method.
alignment - alignment of the enclosing layout

getMemberDefaultBreadth

public void getMemberDefaultBreadth(Canvas member,
                                    int defaultBreadth)
Return the breadth for a member of this layout which either didn't specify a breadth or specified a percent breadth with managePercentBreadth:true.

Called only for Layouts which have a LayoutPolicy for the breadth axis of "fill", since Layouts with a breadth policy of "none" leave all member breadths alone.

Parameters:
member - Component to be sized
defaultBreadth - Value of the currently calculated member breadth. This may be returned verbatim or manipulated in this method.

reflow

public void reflow()
Layout members according to current settings.

Members will reflow automatically when the layout is resized, members resize, the list of members changes or members change visibility. It is only necessary to manually call reflow() after changing settings on the layout, for example, layout.reverseOrder.


reflow

public void reflow(String reason)
Layout members according to current settings.

Members will reflow automatically when the layout is resized, members resize, the list of members changes or members change visibility. It is only necessary to manually call reflow() after changing settings on the layout, for example, layout.reverseOrder.

Parameters:
reason - reason reflow() had to be called (appear in logs if enabled)

reflowNow

public void reflowNow()
Layout members according to current settings, immediately.
Generally, when changes occur that require a layout to reflow (such as members being shown or hidden), the Layout will reflow only after a delay, so that multiple changes cause only one reflow. To remove this delay for cases where it is not helpful, reflowNow() can be called.


hasMember

public Boolean hasMember(Canvas canvas)
Returns true if the layout includes the specified canvas.

Parameters:
canvas - the canvas to check for
Returns:
true if the layout includes the specified canvas

removeMember

public void removeMember(Canvas member)
Removes the specified member from the layout. If it has a resize bar, the bar will be destroyed.

Parameters:
member - the canvas to be removed from the layout

setVisibleMember

public void setVisibleMember(Canvas member)
Hide all other members and make the single parameter member visible.

Parameters:
member - member to show

reorderMember

public void reorderMember(int memberNum,
                          int newPosition)
Shift a member of the layout to a new position

Parameters:
memberNum - current position of the member to move to a new position
newPosition - new position to move the member to

reorderMembers

public void reorderMembers(int start,
                           int end,
                           int newPosition)
Move a range of members to a new position

Parameters:
start - beginning of range of members to move
end - end of range of members to move, non-inclusive
newPosition - new position to move the members to

membersChanged

public void membersChanged()
Fires once at initialization if the layout has any initial members, and then fires whenever members are added, removed or reordered.


getDropPosition

public int getDropPosition()
Get the position a new member would be dropped. This drop position switches in the middle of each member, and both edges (before beginning, after end) are legal drop positions

Use this method to obtain the drop position for e.g. a custom drop handler.

Returns:
the position a new member would be dropped

hideDropLine

public void hideDropLine()
Calling this method hides the dropLine shown during a drag and drop interaction with a Layout that has canDropComponents set to true. This method is only useful for custom implementations of com.smartgwt.client.widgets.layout.Layout#drop as the default implementation calls this method automatically.


onInit

protected void onInit()
Overrides:
onInit in class BaseWidget

getDropComponent

protected Canvas getDropComponent(Canvas dragTarget,
                                  int dropPosition)

setMembers

public void setMembers(Canvas... members)
An array of canvases that will be contained within this layout. You can set the following properties on these canvases (in addition to the standard component properties): Height and width settings found on members are interpreted by the Layout according to the vPolicy.

Parameters:
members - members Default value is null

addMember

public void addMember(Widget widget)
Add a canvas to the layout, optionally at a specific position.

Parameters:
widget - the canvas object to be added to the layout

addMember

public void addMember(Canvas component)
Add a canvas to the layout, optionally at a specific position.

Parameters:
component - the canvas object to be added to the layout

addMember

public void addMember(Widget widget,
                      int position)

addMember

public void addMember(Canvas component,
                      int position)
Add a canvas to the layout, optionally at a specific position.

Parameters:
component - the canvas object to be added to the layout
position - the position in the layout to place newMember (starts with 0); if omitted, it will be added at the last position

addMemberPreCreate

protected void addMemberPreCreate(Object componentJS)

addMemberPostCreate

protected void addMemberPostCreate(Object componentJS)

addMemberPreCreate

protected void addMemberPreCreate(Object componentJS,
                                  int position)

addMemberPostCreate

protected void addMemberPostCreate(Object componentJS,
                                   int position)

setPlaceHolderProperties

public void setPlaceHolderProperties(Canvas placeHolderProperties)
                              throws IllegalStateException
If showDragPlaceHolder is true, this properties object can be used to customize the appearance of the placeholder displayed when the user drags a widget out of this layout.

Parameters:
placeHolderProperties - placeHolderProperties Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

setPlaceHolderDefaults

public void setPlaceHolderDefaults(Canvas placeHolderDefaults)
                            throws IllegalStateException
If showDragPlaceHolder is true, this defaults object determines the default appearance of the placeholder displayed when the user drags a widget out of this layout.
Default value for this property sets the placeholder styleName to "layoutPlaceHolder"
To modify this object, use com.smartgwt.client..Class#changeDefaults

Parameters:
placeHolderDefaults - placeHolderDefaults Default value is {...}
Throws:
IllegalStateException - this property cannot be changed after the component has been created

setDefaultLayoutAlign

public void setDefaultLayoutAlign(Alignment alignment)
                           throws IllegalStateException
Specifies the default alignment for layout members on the breadth axis. Can be overridden on a per-member basis by setting layoutAlign.
If unset, default member layout alignment will be "top" for a horizontal layout, and left for a vertical layout.

Parameters:
alignment - defaultLayoutAlign Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

setDefaultLayoutAlign

public void setDefaultLayoutAlign(VerticalAlignment alignment)
                           throws IllegalStateException
Specifies the default alignment for layout members on the breadth axis. Can be overridden on a per-member basis by setting layoutAlign.
If unset, default member layout alignment will be "top" for a horizontal layout, and left for a vertical layout.

Parameters:
alignment - defaultLayoutAlign Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

setDropLineProperties

public void setDropLineProperties(Canvas dropLineProperties)
                           throws IllegalStateException
Throws:
IllegalStateException

setAlign

public void setAlign(Alignment alignment)
Alignment of all members in this Layout on the length axis. Defaults to "top" for vertical Layouts, and "left" for horizontal Layouts.

Overrides:
setAlign in class Canvas
Parameters:
alignment - alignment Default value is null

setAlign

public void setAlign(VerticalAlignment alignment)
Alignment of all members in this Layout on the length axis. Defaults to "top" for vertical Layouts, and "left" for horizontal Layouts.

Parameters:
alignment - alignment Default value is null

removeMembers

public void removeMembers(Canvas[] members)
Removes the specified members from the layout. If any of the removed members have resize bars, the bars will be destroyed.

Parameters:
members - array of members to be removed, or reference to single member.

getMembers

public Canvas[] getMembers()
Return the members in the Layout.

Returns:
the members

showMember

public void showMember(Canvas member)
Show the specified member, firing the specified callback when the hide is complete.

Members can always be directly shown via member.show(), but if animateMembers is enabled, animation will only occur if showMember() is called to show the member.

Parameters:
member - Member to show

showMember

public void showMember(Canvas member,
                       Function callback)
Show the specified member, firing the specified callback when the hide is complete.

Members can always be directly shown via member.show(), but if animateMembers is enabled, animation will only occur if showMember() is called to show the member.

Parameters:
member - Member to show
callback - action to fire when the member has been shown

hideMember

public void hideMember(Canvas member)
Hide the specified member, firing the specified callback when the hide is complete.

Members can always be directly hidden via member.hide(), but if animateMembers is enabled, animation will only occur if hideMember() is called to hide the member.

Parameters:
member - Member to hide

hideMember

public void hideMember(Canvas member,
                       Function callback)
Hide the specified member, firing the specified callback when the hide is complete.

Members can always be directly hidden via member.hide(), but if animateMembers is enabled, animation will only occur if hideMember() is called to hide the member.

Parameters:
member - Member to hide
callback - callback to fire when the member is hidden.

getMember

public Canvas getMember(int index)
Given a numerical index or a member ID, return a pointer to the appropriate member.

If passed a member Canvas, just returns it.

Parameters:
index - index for the member
Returns:
member widget

getMember

public Canvas getMember(String memberID)
Given a numerical index or a member ID, return a pointer to the appropriate member.

If passed a member Canvas, just returns it.

Parameters:
memberID - identifier for the required member
Returns:
member widget

getMemberNumber

public int getMemberNumber(Canvas member)
Given a member Canvas or member ID, return the index of that member within this layout's members array

If passed a number, just returns it.

Parameters:
member - the member
Returns:
index of the member canvas (or -1 if not found)

getMemberNumber

public int getMemberNumber(String memberID)
Given a member Canvas or member ID, return the index of that member within this layout's members array

If passed a number, just returns it.

Parameters:
memberID - identifier for the required member
Returns:
index of the member canvas (or -1 if not found)