public class Layout extends Canvas implements HasMembersChangedHandlers
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) policies
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%".
LayoutPolicy
,
VLayout
,
HLayout
,
VStack
,
HStack
,
LayoutSpacer
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Constructor and Description |
---|
Layout() |
Layout(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
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(com.google.gwt.user.client.ui.Widget widget)
Add a canvas to the layout, optionally at a specific position.
|
void |
addMember(com.google.gwt.user.client.ui.Widget widget,
int position) |
protected void |
addMemberPostCreate(java.lang.Object componentJS) |
protected void |
addMemberPostCreate(java.lang.Object componentJS,
int position) |
protected void |
addMemberPreCreate(java.lang.Object componentJS) |
protected void |
addMemberPreCreate(java.lang.Object componentJS,
int position) |
void |
addMembers(Canvas... newMembers)
Add one or more canvases to the layout.
|
void |
addMembers(Canvas[] newMembers,
int position)
Add one or more canvases to the layout at specific positions.
|
com.google.gwt.event.shared.HandlerRegistration |
addMembersChangedHandler(MembersChangedHandler handler)
Add a membersChanged handler.
|
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName . |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName . |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
java.lang.Boolean |
getAnimateMembers()
If true when members are added / removed, they should be animated as they are shown or hidden in position
|
java.lang.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.
|
java.lang.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) |
Canvas |
getDropLine()
Line showed to mark the drop position when components are being dragged onto this Layout.
|
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.
|
java.lang.String |
getEditProxyConstructor()
Default class used to construct the
EditProxy for this component when the component is
first placed into edit mode . |
java.lang.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 horizontal axis
|
java.lang.Integer |
getLayoutBottomMargin()
Space outside of all members, on the bottom side.
|
java.lang.Integer |
getLayoutLeftMargin()
Space outside of all members, on the left-hand side.
|
java.lang.Integer |
getLayoutMargin()
Space outside of all members.
|
java.lang.Integer |
getLayoutRightMargin()
Space outside of all members, on the right-hand side.
|
java.lang.Integer |
getLayoutTopMargin()
Space outside of all members, on the top side.
|
java.lang.Boolean |
getLeaveScrollbarGap()
Whether to leave a gap for a vertical scrollbar even when one is not actually present.
|
LocatorStrategy |
getLocateMembersBy()
Part of the
AutomatedTesting system, strategy to use when generated locators for
members from within this Layout's members array. |
LocatorTypeStrategy |
getLocateMembersType()
LocatorTypeStrategy to use when finding members within this layout. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
Getter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
java.lang.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(java.lang.String memberID)
Given a numerical index or a member name or 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(java.lang.String memberID)
Given a member Canvas or member ID or name, return the index of that member within this layout's members array
|
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()
An array of canvases that will be contained within this layout.
|
int |
getMembersMargin()
Space between each member of the layout.
|
int |
getMinMemberSize()
Minimum size, in pixels, below which flexible-sized members should never be shrunk, even if this requires the Layout to
overflow.
|
static Layout |
getOrCreateRef(com.google.gwt.core.client.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 accommodate members. |
java.lang.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? |
Splitbar |
getResizeBar()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
java.lang.String |
getResizeBarClass()
Default class to use for creating
resizeBars . |
int |
getResizeBarSize()
Thickness of the resizeBar in pixels.
|
java.lang.Boolean |
getReverseOrder()
Reverse the order of stacking for this Layout, so that the last member is shown first.
|
java.lang.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.
|
java.lang.Boolean |
getShowDropLines()
Controls whether to show a drop-indicator during a drag and drop operation.
|
java.lang.String |
getStackZIndex()
For use in conjunction with
memberOverlap , controls
the z-stacking order of members. |
java.lang.Boolean |
getVertical()
Should this layout appear with members stacked vertically or horizontally.
|
LayoutPolicy |
getVPolicy()
Sizing policy applied to members on vertical axis
|
java.lang.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.
|
protected void |
onInit_Layout() |
protected void |
onInit() |
void |
reflow()
Layout members according to current settings.
|
void |
reflow(java.lang.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 |
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(java.lang.Boolean animateMembers)
If true when members are added / removed, they should be animated as they are shown or hidden in position
|
void |
setAnimateMemberTime(java.lang.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(java.lang.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.
|
static void |
setDefaultProperties(Layout layoutProperties)
Class level method to set the default properties of this class.
|
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 |
setEditProxyConstructor(java.lang.String editProxyConstructor)
Default class used to construct the
EditProxy for this component when the component is
first placed into edit mode . |
void |
setEnforcePolicy(java.lang.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 horizontal axis
|
void |
setLayoutBottomMargin(java.lang.Integer layoutBottomMargin)
Space outside of all members, on the bottom side.
|
void |
setLayoutLeftMargin(java.lang.Integer layoutLeftMargin)
Space outside of all members, on the left-hand side.
|
void |
setLayoutMargin(java.lang.Integer layoutMargin)
Space outside of all members.
|
void |
setLayoutRightMargin(java.lang.Integer layoutRightMargin)
Space outside of all members, on the right-hand side.
|
void |
setLayoutTopMargin(java.lang.Integer layoutTopMargin)
Space outside of all members, on the top side.
|
void |
setLeaveScrollbarGap(java.lang.Boolean leaveScrollbarGap)
Whether to leave a gap for a vertical scrollbar even when one is not actually present.
|
void |
setLocateMembersBy(LocatorStrategy locateMembersBy)
Part of the
AutomatedTesting system, strategy to use when generated locators for
members from within this Layout's members array. |
void |
setLocateMembersType(LocatorTypeStrategy locateMembersType)
LocatorTypeStrategy to use when finding members within this layout. |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.layout.LayoutLogicalStructure s)
Setter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
void |
setManagePercentBreadth(java.lang.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 flexible-sized 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 accommodate members. |
void |
setPaddingAsLayoutMargin(java.lang.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
this.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 Class.changeDefaults() |
void |
setPlaceHolderProperties(Canvas placeHolderProperties)
If
this.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(java.lang.String resizeBarClass)
Default class to use for creating
resizeBars . |
void |
setResizeBarSize(int resizeBarSize)
Thickness of the resizeBar in pixels.
|
void |
setReverseOrder(java.lang.Boolean reverseOrder)
Reverse the order of stacking for this Layout, so that the last member is shown first.
|
void |
setShowDragPlaceHolder(java.lang.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 |
setShowDropLines(java.lang.Boolean showDropLines)
Controls whether to show a drop-indicator during a drag and drop operation.
|
void |
setStackZIndex(java.lang.String stackZIndex)
For use in conjunction with
memberOverlap , controls
the z-stacking order of members. |
void |
setVertical(java.lang.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 show is complete.
|
void |
showMember(Canvas member,
Function callback)
Show the specified member, firing the specified callback when the show is complete.
|
addChild, addChild, 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, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, encloses, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoMaskComponents, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeavePageSpace, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentCanvas, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseDragMask, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAllowExternalFilters, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoMaskComponents, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeavePageSpace, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setPadding, setPageLeft, setPageTop, setParentCanvas, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseDragMask, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateEditNode, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
addDrawHandler, applyFactoryProperties, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
public Layout()
public Layout(com.google.gwt.core.client.JavaScriptObject jsObj)
public static Layout getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName, Canvas defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
public static void changeAutoChildDefaults(java.lang.String autoChildName, FormItem defaults)
autoChildName
.autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties
without destroying or wiping out non-overridden properties.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public void setAnimateMembers(java.lang.Boolean animateMembers)
animateMembers
- Default value is nullpublic java.lang.Boolean getAnimateMembers()
public void setAnimateMemberTime(java.lang.Integer animateMemberTime)
Note : This is an advanced setting
animateMemberTime
- Default value is nullpublic java.lang.Integer getAnimateMemberTime()
public void setCanDropComponents(java.lang.Boolean canDropComponents) throws java.lang.IllegalStateException
canAcceptDrop
:true and canDropComponents:true
on a Layout, when a droppable Canvas (canDrop:true
is dragged over
the layout, it 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 Layout.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
canDropComponents
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDragdrop overview and related methods
public java.lang.Boolean getCanDropComponents()
canAcceptDrop
:true and canDropComponents:true
on a Layout, when a droppable Canvas (canDrop:true
is dragged over
the layout, it 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 Layout.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.Dragdrop overview and related methods
public void setDefaultResizeBars(LayoutResizeBarPolicy defaultResizeBars)
showResizeBar
for members of this layout.defaultResizeBars
- Default value is "marked"Canvas.setShowResizeBar(java.lang.Boolean)
public LayoutResizeBarPolicy getDefaultResizeBars()
showResizeBar
for members of this layout.Canvas.getShowResizeBar()
public Canvas getDropLine() throws java.lang.IllegalStateException
For an overview of how to use and configure AutoChildren, see Using AutoChildren
.
java.lang.IllegalStateException
- if this widget has not yet been rendered.public void setDropLineThickness(int dropLineThickness) throws java.lang.IllegalStateException
canDropComponents
is set to true
. See the
discussion in Layout
for more info.
Note : This is an advanced setting
dropLineThickness
- Default value is 2java.lang.IllegalStateException
- this property cannot be changed after the component has been createdLayout
,
Dragdrop overview and related methods
,
Drag move Examplepublic int getDropLineThickness()
canDropComponents
is set to true
. See the
discussion in Layout
for more info.Layout
,
Dragdrop overview and related methods
,
Drag move Examplepublic void setEditProxyConstructor(java.lang.String editProxyConstructor) throws java.lang.IllegalStateException
EditProxy
for this component when the component is
first placed into edit mode
.setEditProxyConstructor
in class Canvas
editProxyConstructor
- See SCClassName
. Default value is "LayoutEditProxy"java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getEditProxyConstructor()
EditProxy
for this component when the component is
first placed into edit mode
.getEditProxyConstructor
in class Canvas
SCClassName
public void setEnforcePolicy(java.lang.Boolean enforcePolicy)
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
enforcePolicy
- Default value is truepublic java.lang.Boolean getEnforcePolicy()
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.
public void setHPolicy(LayoutPolicy hPolicy)
Note : This is an advanced setting
hPolicy
- Default value is "fill"public LayoutPolicy getHPolicy()
public void setLayoutBottomMargin(java.lang.Integer layoutBottomMargin)
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
layoutBottomMargin
- Default value is nullpublic java.lang.Integer getLayoutBottomMargin()
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
public void setLayoutLeftMargin(java.lang.Integer layoutLeftMargin)
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
layoutLeftMargin
- Default value is nullpublic java.lang.Integer getLayoutLeftMargin()
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
public void setLayoutMargin(java.lang.Integer layoutMargin)
layoutLeftMargin
and related properties does not have a
true setter method.Layout.setLayoutMargin()
may be called with no arguments to
reflow the layout.
layoutMargin
- optional new setting for layout.layoutMargin. Regardless of whether a new layout margin is
passed, the layout reflows according to the current settings for layoutStartMargin et al. Default value is nullsetLayoutLeftMargin(java.lang.Integer)
,
setLayoutRightMargin(java.lang.Integer)
,
setLayoutBottomMargin(java.lang.Integer)
,
setLayoutTopMargin(java.lang.Integer)
,
setPaddingAsLayoutMargin(java.lang.Boolean)
,
User Sizing Examplepublic java.lang.Integer getLayoutMargin()
layoutLeftMargin
and related properties does not have a
true setter method.Layout.setLayoutMargin()
may be called with no arguments to
reflow the layout.getLayoutLeftMargin()
,
getLayoutRightMargin()
,
getLayoutBottomMargin()
,
getLayoutTopMargin()
,
getPaddingAsLayoutMargin()
,
User Sizing Examplepublic void setLayoutRightMargin(java.lang.Integer layoutRightMargin)
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
layoutRightMargin
- Default value is nullpublic java.lang.Integer getLayoutRightMargin()
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
public void setLayoutTopMargin(java.lang.Integer layoutTopMargin)
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
layoutTopMargin
- Default value is nullpublic java.lang.Integer getLayoutTopMargin()
layoutMargin
. Requires a manual call to
setLayoutMargin()
if changed on the fly.
public void setLeaveScrollbarGap(java.lang.Boolean leaveScrollbarGap) throws java.lang.IllegalStateException
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.
leaveScrollbarGap
- Default value is falsejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getLeaveScrollbarGap()
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.
public void setLocateMembersBy(LocatorStrategy locateMembersBy)
AutomatedTesting
system, strategy to use when generated locators for
members from within this Layout's members array.
Note : This is an advanced setting
locateMembersBy
- Default value is nullpublic LocatorStrategy getLocateMembersBy()
AutomatedTesting
system, strategy to use when generated locators for
members from within this Layout's members array.public void setLocateMembersType(LocatorTypeStrategy locateMembersType)
LocatorTypeStrategy
to use when finding members within this layout.
Note : This is an advanced setting
locateMembersType
- Default value is nullpublic LocatorTypeStrategy getLocateMembersType()
LocatorTypeStrategy
to use when finding members within this layout.public void setManagePercentBreadth(java.lang.Boolean managePercentBreadth) throws java.lang.IllegalStateException
layoutMargin
. If false,
percentages work exactly as for a non-member, with layoutMargins, if any, ignored.managePercentBreadth
- Default value is truejava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getManagePercentBreadth()
layoutMargin
. If false,
percentages work exactly as for a non-member, with layoutMargins, if any, ignored.public void setMemberOverlap(int memberOverlap) throws java.lang.IllegalStateException
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
.
memberOverlap
- Default value is 0java.lang.IllegalStateException
- this property cannot be changed after the component has been createdLayoutMember overview and related methods
public int getMemberOverlap()
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
.
LayoutMember overview and related methods
public void setMembers(Canvas... members)
layoutAlign
-- specifies the member's alignment along the breadth axis; valid values are "top", "center" and
"bottom" for a horizontal layout and "left", "center" and "right" for a vertical layout (see defaultLayoutAlign
for default implementation.)
showResizeBar
-- set to true to show a resize bar
(default is false) layout policy
.
members
- Default value is nullpublic Canvas[] getMembers()
layoutAlign
-- specifies the member's alignment along the breadth axis; valid values are "top", "center" and
"bottom" for a horizontal layout and "left", "center" and "right" for a vertical layout (see defaultLayoutAlign
for default implementation.)
showResizeBar
-- set to true to show a resize bar
(default is false) layout policy
.public void setMembersMargin(int membersMargin)
Requires a manual call to reflow()
if changed on the fly.
membersMargin
- Default value is 0public int getMembersMargin()
Requires a manual call to reflow()
if changed on the fly.
public void setMinMemberSize(int minMemberSize)
Does not apply to members given a fixed size in pixels - such members will never be shrunk below their specified size in general.
minMemberSize
- Default value is 1public int getMinMemberSize()
Does not apply to members given a fixed size in pixels - such members will never be shrunk below their specified size in general.
public void setOverflow(Overflow overflow)
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 accommodate members.setOverflow
in class Canvas
overflow
- Default value is "visible"Sizing overview and related methods
public Overflow getOverflow()
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 accommodate members.getOverflow
in class Canvas
Sizing overview and related methods
public void setPaddingAsLayoutMargin(java.lang.Boolean paddingAsLayoutMargin)
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
precedence over this value.
Note : This is an advanced setting
paddingAsLayoutMargin
- Default value is truepublic java.lang.Boolean getPaddingAsLayoutMargin()
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
precedence over this value.
public void setPlaceHolderDefaults(Canvas placeHolderDefaults) throws java.lang.IllegalStateException
this.showDragPlaceHolder
is true, this
defaults object determines the default appearance of the placeholder displayed when the user drags a widget out of this
layout.styleName
to "layoutPlaceHolder"
placeHolderDefaults
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDragdrop overview and related methods
public void setPlaceHolderProperties(Canvas placeHolderProperties) throws java.lang.IllegalStateException
this.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.placeHolderProperties
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdDragdrop overview and related methods
,
Drag move Examplepublic Splitbar getResizeBar()
Using AutoChildren
for details.
A MultiAutoChild created to resize members of this Layout
.
A resize bar will be created for any member of this Layout
that has
showResizeBar
set to true
. Resize bars will be
instances of the class specified by resizeBarClass
by default, and will
automatically be sized to the member's breadth, and to the thickness specified by
resizeBarSize
.
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 resizeBarClass
or
resizeBarConstructor
to this custom class.
Alternatively, Canvas.setAutoChildProperties(java.lang.String,
com.smartgwt.client.widgets.Canvas)
may be called to set resizeBar properties:
final Splitbar resizeBarProperties = new Splitbar(); //... layout.setAutoChildProperties("resizeBar", resizeBarProperties);See
AutoChildUsage
for more information.
If you create a custom resize bar class in Java, enable Reflection
to
allow it to be used.
Alternatively, you can use the SmartClient class system to create a simple
SmartClient subclass of either Splitbar
or ImgSplitbar
for use with this API - see the Skinning Guide
for details.
The built-in Splitbar
class supports drag resizing of its target member,
and clicking on the bar with a mouse to collapse/uncollapse the target member.
public void setResizeBarClass(java.lang.String resizeBarClass)
resizeBars
. This may be
overridden by resizeBarConstructor
. Classes that are valid by default are Splitbar
, ImgSplitbar
, and Snapbar
.
Note : This is an advanced setting
resizeBarClass
- Default value is "Splitbar"Splitbar
,
ImgSplitbar
public java.lang.String getResizeBarClass()
resizeBars
. This may be
overridden by resizeBarConstructor
. Classes that are valid by default are Splitbar
, ImgSplitbar
, and Snapbar
.
Splitbar
,
ImgSplitbar
public void setResizeBarSize(int resizeBarSize)
Note : This is an advanced setting
resizeBarSize
- Default value is 7public int getResizeBarSize()
public void setReverseOrder(java.lang.Boolean reverseOrder)
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.
reverseOrder
- Default value is falsepublic java.lang.Boolean getReverseOrder()
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.
public void setShowDragPlaceHolder(java.lang.Boolean showDragPlaceHolder)
showDragPlaceHolder
- Default value is nullDragdrop overview and related methods
,
Drag move Examplepublic java.lang.Boolean getShowDragPlaceHolder()
Dragdrop overview and related methods
,
Drag move Examplepublic void setShowDropLines(java.lang.Boolean showDropLines)
showDropLines
- Default value is nullDragdrop overview and related methods
public java.lang.Boolean getShowDropLines()
Dragdrop overview and related methods
public void setStackZIndex(java.lang.String stackZIndex) throws java.lang.IllegalStateException
memberOverlap
, controls
the z-stacking order of members. If set to "lastOnTop", members stack from the first member at bottom to the last member at top. If set to "firstOnTop", members stack from the last member at bottom to the first member at top.
stackZIndex
- Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getStackZIndex()
memberOverlap
, controls
the z-stacking order of members. If set to "lastOnTop", members stack from the first member at bottom to the last member at top. If set to "firstOnTop", members stack from the last member at bottom to the first member at top.
public void setVertical(java.lang.Boolean vertical)
false
if
unspecified.vertical
- Default value is nullpublic java.lang.Boolean getVertical()
false
if
unspecified.public void setVPolicy(LayoutPolicy vPolicy)
Note : This is an advanced setting
vPolicy
- Default value is "fill"public LayoutPolicy getVPolicy()
public int getDropPosition()
Use this method to obtain the drop position for e.g. a custom drop handler.
public Canvas getMember(java.lang.String memberID)
If passed a member Canvas, just returns it.
memberID
- identifier for the required membergetMemberNumber(java.lang.String)
public void getMemberDefaultBreadth(Canvas member, int defaultBreadth)
managePercentBreadth
:true. Called only for
Layouts which have a layout policy
for the breadth axis of "fill", since
Layouts with a breadth policy of "none" leave all member breadths alone.
member
- Component to be sizeddefaultBreadth
- Value of the currently calculated member breadth. This may be returned verbatim or manipulated in this method.LayoutMember overview and related methods
public int getMemberNumber(java.lang.String memberID)
If passed a number, just returns it.
memberID
- identifier for the required membergetMember(java.lang.String)
public java.lang.Boolean hasMember(Canvas canvas)
canvas
- the canvas to check forpublic void hideDropLine()
canDropComponents
set to true. This method is only
useful for custom implementations of Layout.drop()
as the default
implementation calls this method automatically.public void hideMember(Canvas member)
Members can always be directly
hidden via member.hide()
, but if animation
is enabled, animation will only occur if hideMember() is called to hide the member.
member
- Member to hidepublic void hideMember(Canvas member, Function callback)
Members can always be directly
hidden via member.hide()
, but if animation
is enabled, animation will only occur if hideMember() is called to hide the member.
member
- Member to hidecallback
- callback to fire when the member is hidden.public com.google.gwt.event.shared.HandlerRegistration addMembersChangedHandler(MembersChangedHandler handler)
Fires once at initialization if the layout has any initial members, and then fires whenever members are added, removed or reordered.
addMembersChangedHandler
in interface HasMembersChangedHandlers
handler
- the membersChanged handlerHandlerRegistration
used to remove this handlerpublic void reflow()
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
.
public void reflow(java.lang.String reason)
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
.
reason
- reason reflow() had to be called (appear in logs if enabled)public void reflowNow()
public void removeMember(Canvas member)
member
- the canvas to be removed from the layoutpublic void removeMembers(Canvas... members)
members
- array of members to be removed, or single memberpublic void removeMembers(Canvas members)
members
- array of members to be removed, or single memberpublic void reorderMember(int memberNum, int newPosition)
memberNum
- current position of the member to move to a new positionnewPosition
- new position to move the member topublic void reorderMembers(int start, int end, int newPosition)
start
- beginning of range of members to moveend
- end of range of members to move, non-inclusivenewPosition
- new position to move the members topublic void setVisibleMember(Canvas member)
member
- member to showpublic void showMember(Canvas member)
Members can always be directly
shown via member.show()
, but if animation
is enabled, animation will only occur if showMember() is called to show the member.
member
- Member to showpublic void showMember(Canvas member, Function callback)
Members can always be directly
shown via member.show()
, but if animation
is enabled, animation will only occur if showMember() is called to show the member.
member
- Member to showcallback
- action to fire when the member has been shownpublic static void setDefaultProperties(Layout layoutProperties)
Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
layoutProperties
- properties that should be used as new defaults when instances of this class are createdprotected void onInit_Layout()
public void addMembers(Canvas... newMembers)
newMembers
- canvases to be addedpublic void addMembers(Canvas[] newMembers, int position)
newMembers
- array of canvases to be addedposition
- position to add newMembers
positionpublic void addMember(com.google.gwt.user.client.ui.Widget widget)
widget
- the canvas object to be added to the layoutpublic void addMember(Canvas component)
component
- the canvas object to be added to the layoutpublic void addMember(com.google.gwt.user.client.ui.Widget widget, int position)
public void addMember(Canvas component, int position)
component
- the canvas object to be added to the layoutposition
- the position in the layout to place newMember (starts with 0);
if omitted, it will be added at the last positionprotected void addMemberPreCreate(java.lang.Object componentJS)
protected void addMemberPostCreate(java.lang.Object componentJS)
protected void addMemberPreCreate(java.lang.Object componentJS, int position)
protected void addMemberPostCreate(java.lang.Object componentJS, int position)
public void setDefaultLayoutAlign(Alignment alignment) throws java.lang.IllegalStateException
layoutAlign
.alignment
- defaultLayoutAlign Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setDefaultLayoutAlign(VerticalAlignment alignment) throws java.lang.IllegalStateException
layoutAlign
.alignment
- defaultLayoutAlign Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setDropLineProperties(Canvas dropLineProperties) throws java.lang.IllegalStateException
java.lang.IllegalStateException
public void setAlign(Alignment alignment)
public void setAlign(VerticalAlignment alignment)
alignment
- alignment Default value is nullpublic Canvas getMember(int index)
If passed a member Canvas, just returns it.
index
- index for the memberpublic int getMemberNumber(Canvas member)
If passed a number, just returns it.
member
- the memberpublic com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.layout.LayoutLogicalStructure s)
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
LogicalStructure
interface,
which supports Eclipse's logical structure debugging facility.getLogicalStructure
in interface LogicalStructure
getLogicalStructure
in class Canvas