public class PortalLayout extends Layout
Portlet
windows. A PortalLayout displays Portlets in columns and supports drag-drop interaction for moving Portlets around
within the PortalLayout. Portlets may be drag-reordered within columns, dragged into other columns, or dragged next to
other Portlets to sit next to them horizontally within a column.config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Constructor and Description |
---|
PortalLayout() |
PortalLayout(int numColumns) |
PortalLayout(com.google.gwt.core.client.JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(int index)
Adds a new portal column to this layout at the specified position
|
void |
addPortlet(Portlet portlet)
Adds a
Portlet instance to this portalLayout in the specified position. |
void |
addPortlet(Portlet portlet,
int colNum,
int rowNum)
Adds a
Portlet instance to this portalLayout in the specified position. |
void |
addPortlet(Portlet portlet,
int colNum,
int rowNum,
int rowOffset)
Adds a
Portlet instance to this portalLayout in the specified position. |
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 |
getCanResizeColumns()
Are columns in this PortalLayout drag-resizeable?
|
java.lang.Boolean |
getCanResizePortlets()
Should the height and width of
Portlets be drag-resizable? |
java.lang.Boolean |
getCanResizeRows()
Deprecated.
Use
canResizePortlets instead. |
java.lang.Boolean |
getCanShrinkColumnWidths()
Controls whether the PortalLayout will shrink column widths to avoid overflowing the PortalLayout horizontally.
|
java.lang.Boolean |
getCanStretchColumnWidths()
Controls whether the PortalLayout will stretch column widths, if needed to accommodate the width of
Portlets . |
Layout |
getColumn()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
java.lang.String |
getColumnBorder()
Border to show around columns in this PortalLayout
|
Overflow |
getColumnOverflow()
Controls the
overflow setting for each column. |
int |
getColumnWidth(int colNumber)
Gets the width of a column in the PortalLayout.
|
Canvas |
getDropPortlet(Canvas dragTarget,
java.lang.Integer colNum,
java.lang.Integer rowNum,
java.lang.Integer dropPosition)
This method is called when the user drops components into the rows or columns of this PortalLayout.
|
java.lang.String[] |
getDropTypes()
dropTypes is set to ["PortalColumn"] in order to allow the dragging of columns within the
PortalLayout . |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure()
Getter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
int |
getNumColumns()
Initial number of columns to show in this PortalLayout.
|
static PortalLayout |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
Overflow |
getOverflow()
Controls how the PortalLayout reacts when column widths or
Portlet widths
overflow the width of the PortalLayout. |
PortalPosition |
getPortalPosition(Portlet portlet)
Gets the position of the
Portlet within this PortalLayout. |
Portlet[][][] |
getPortletArray()
Returns a multi-level array of the
Portlets in this PortalLayout,
where the first level corresponds to columns, the second to rows, and the third to Portlets within rows. |
java.lang.String[] |
getPortletDropTypes()
|
Portlet[] |
getPortlets()
Returns a flat array of all the
Portlets in this PortalLayout. |
java.lang.Boolean |
getPreventColumnUnderflow()
Controls whether the last
Portlet in a column will be stretched to fill the
column's height, or left at its specified height. |
java.lang.Boolean |
getPreventRowUnderflow()
Controls whether the last
Portlet in a row will be stretched to fill the
row's width, or left at its specified width. |
java.lang.Boolean |
getPreventUnderflow()
Controls whether the last column will be stretched to fill the PortalLayout's width, or left at its specified width.
|
Layout |
getRow()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
Layout |
getRowLayout()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
java.lang.Boolean |
getShowColumnMenus()
Should a menu be shown within each column with options to add / remove columns?
|
java.lang.Boolean |
getStretchColumnWidthsProportionally()
When
stretching column widths , should
we stretch all column widths proportionally, or just stretch the columns that need extra width? |
protected void |
onInit_PortalLayout() |
void |
onInit() |
void |
portletMaximized(Portlet portlet)
Notification method called after a
Portlet has been maximized (whether by
user action or programmatically). |
void |
portletMinimized(Portlet portlet)
Notification method called after a
Portlet has been minimized (whether by
user action or programmatically). |
void |
portletRestored(Portlet portlet)
Notification method called after a
Portlet has been restored to its normal place
(after having been maximized). |
void |
portletsChanged()
Fires at initialization if the PortalLayout has any initial
portlets , and then fires whenever portlets are added,
removed or reordered. |
void |
portletsResized()
Fires when
portlets or columns in this PortalLayout are
resized. |
void |
removeColumn(int index)
Removes the specified column from this layout.
|
void |
removePortlet(Portlet portlet)
Removes a
Portlet which is currently rendered in this PortalLayout. |
void |
setCanResizeColumns(java.lang.Boolean canResizeColumns)
Are columns in this PortalLayout drag-resizeable?
|
void |
setCanResizePortlets(java.lang.Boolean canResizePortlets)
Should the height and width of
Portlets be drag-resizable? |
void |
setCanResizeRows(java.lang.Boolean canResizeRows)
Deprecated.
Use
canResizePortlets instead. |
void |
setCanShrinkColumnWidths(java.lang.Boolean canShrinkColumnWidths)
Controls whether the PortalLayout will shrink column widths to avoid overflowing the PortalLayout horizontally.
|
void |
setCanStretchColumnWidths(java.lang.Boolean canStretchColumnWidths)
Controls whether the PortalLayout will stretch column widths, if needed to accommodate the width of
Portlets . |
void |
setColumnBorder(java.lang.String columnBorder)
Border to show around columns in this PortalLayout
If this method is called after the component has been drawn/initialized: Sets the columnBorder for to the specified value and updates any drawn columns to reflect this. |
void |
setColumnOverflow(Overflow columnOverflow)
Controls the
overflow setting for each column. |
void |
setColumnPreventUnderflow(boolean preventColumnUnderflow)
Sets
preventColumnUnderflow and
reflows the layout to implement it. |
void |
setColumnWidth(int colNumber,
int width)
Sets the width of a column in the PortalLayout.
|
void |
setColumnWidth(int colNumber,
java.lang.String width)
Sets the width of a column in the PortalLayout.
|
static void |
setDefaultProperties(PortalLayout portalLayoutProperties)
Class level method to set the default properties of this class.
|
void |
setDropTypes(java.lang.String... dropTypes)
dropTypes is set to ["PortalColumn"] in order to allow the dragging of columns within the
PortalLayout . |
com.smartgwt.logicalstructure.core.LogicalStructureObject |
setLogicalStructure(com.smartgwt.logicalstructure.widgets.layout.PortalLayoutLogicalStructure s)
Setter implementing the
LogicalStructure interface,
which supports Eclipse's logical structure debugging facility. |
void |
setNumColumns(int numColumns)
Initial number of columns to show in this PortalLayout.
|
void |
setOverflow(Overflow overflow)
Controls how the PortalLayout reacts when column widths or
Portlet widths
overflow the width of the PortalLayout. |
void |
setPortletDropTypes(java.lang.String... portletDropTypes)
|
void |
setPortlets(Portlet... portlets)
A convenience attribute which you can use to populate a PortalLayout with
Portlets on initialization. |
void |
setPreventColumnUnderflow(java.lang.Boolean preventColumnUnderflow)
Controls whether the last
Portlet in a column will be stretched to fill the
column's height, or left at its specified height. |
void |
setPreventRowUnderflow(java.lang.Boolean preventRowUnderflow)
Controls whether the last
Portlet in a row will be stretched to fill the
row's width, or left at its specified width. |
void |
setPreventUnderflow(java.lang.Boolean preventUnderflow)
Controls whether the last column will be stretched to fill the PortalLayout's width, or left at its specified width.
|
void |
setShowColumnMenus(java.lang.Boolean showColumnMenus)
Should a menu be shown within each column with options to add / remove columns?
If this method is called after the component has been drawn/initialized: Sets showColumnMenus and updates existing columns to reflect the new setting. |
void |
setStretchColumnWidthsProportionally(java.lang.Boolean stretchColumnWidthsProportionally)
When
stretching column widths , should
we stretch all column widths proportionally, or just stretch the columns that need extra width? |
java.lang.Boolean |
willAcceptPortletDrop(Canvas dragTarget,
java.lang.Integer colNum,
java.lang.Integer rowNum,
java.lang.Integer dropPosition)
Returns true if the dragged
Portlet , or other component, can be dropped onto
this PortalLayout (other components would be auto-wrapped in a Portlet ). |
boolean |
willClosePortlet(Portlet portlet)
Method called when a
Portlet
in this PortalLayout is about to be closed. |
boolean |
willMaximizePortlet(Portlet portlet)
Method called when a
Portlet
in this PortalLayout is about to be maximized. |
boolean |
willMinimizePortlet(Portlet portlet)
Method called when a
Portlet
in this PortalLayout is about to be minimized. |
boolean |
willRestorePortlet(Portlet portlet)
|
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, addMembers, addMembers, addMembersChangedHandler, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getChildTabPosition, getDefaultResizeBars, getDropComponent, getDropLine, getDropLineThickness, getDropPosition, getEditProxyConstructor, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutEndMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutStartMargin, getLayoutTopMargin, getLeaveScrollbarGap, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOverlap, getMembers, getMembersLength, getMembersMargin, getMinMemberLength, getMinMemberSize, getPaddingAsLayoutMargin, getResizeBar, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getShowDropLines, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, layoutIsDirty, onInit_Layout, reflow, reflow, reflowNow, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, revealChild, revealChild, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEditProxyConstructor, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutEndMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutStartMargin, setLayoutTopMargin, setLeaveScrollbarGap, setLocateMembersBy, setLocateMembersType, setLogicalStructure, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinBreadthMember, setMinBreadthMember, setMinBreadthMember, setMinMemberLength, setMinMemberSize, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setShowDropLines, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
addChild, addChild, addChild, addChild, addChild, addClearHandler, 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, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, 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, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoMaskComponents, getAutoParent, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, removeChild, removeChild, removePeer, removePeer, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeFonts, resizeFonts, resizeFonts, resizeIcons, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAllowExternalFilters, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, 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, setAutoParent, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeavePageSpace, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
addDrawHandler, applyFactoryProperties, completeCreation, 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, isDrawn, 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, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, 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, unsinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
public PortalLayout()
public PortalLayout(com.google.gwt.core.client.JavaScriptObject jsObj)
public PortalLayout(int numColumns)
public static PortalLayout 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. For usage tips on this
param, see SGWTProperties
.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. For usage tips on this
param, see SGWTProperties
.AutoChildUsage
protected com.google.gwt.core.client.JavaScriptObject create()
public void setCanResizeColumns(java.lang.Boolean canResizeColumns)
Note that the displayed width of a column will
automatically shrink and stretch to accomodate the width of Portlets
-- see canStretchColumnWidths
and
canShrinkColumnWidths
for an
explanation. This setting affects the intrinsic width of a column -- that is, the width it will try to return to
when not necessary to stretch or shrink to accomodate Portlet widths.
If this method is called after the component has been drawn/initialized:
Set whether columns in this portalLayout are drag-resizable, and update any drawn columns to reflect this.
canResizeColumns
- Whether columns are drag-resizable. Default value is truesetCanStretchColumnWidths(java.lang.Boolean)
,
setCanShrinkColumnWidths(java.lang.Boolean)
,
Sizing overview and related methods
public java.lang.Boolean getCanResizeColumns()
Note that the displayed width of a column will
automatically shrink and stretch to accomodate the width of Portlets
-- see canStretchColumnWidths
and
canShrinkColumnWidths
for an
explanation. This setting affects the intrinsic width of a column -- that is, the width it will try to return to
when not necessary to stretch or shrink to accomodate Portlet widths.
getCanStretchColumnWidths()
,
getCanShrinkColumnWidths()
,
Sizing overview and related methods
public void setCanResizePortlets(java.lang.Boolean canResizePortlets)
Portlets
be drag-resizable? Note that changing the height of a Portlet will change the height of all the Portlets in the same row to match.
If
the height of Portlets causes a column to overflow, that column will scroll vertically (independent of other columns),
depending on the columnOverflow
setting.
Changing the width of a Portlet will potentially cause columns to stretch and shrink their displayed
widths in order to accomodate the Portlets, depending on the value of canStretchColumnWidths
and canShrinkColumnWidths
.
However, the
instrinsic width of the columns will remain the same, so that the columns will resume their former widths when no
longer necessary to stretch or shrink to accomodate the widths of Portlets. To allow drag-resizing of the intrinsic
width of columns, see canResizeColumns
.
The net effect is that (by default) PortalLayouts behave like layouts when Portlet sizes do not cause overflow, but
behave more like stacks when overflow occurs.
If this method is called after the component has been drawn/initialized:
Set whether the height and width of Portlets
should be drag-resizable, and update any drawn Portlets to reflect this.
canResizePortlets
- Whether drag-resizing the height and width of portlets is allowed. Default value is falsesetCanResizeColumns(java.lang.Boolean)
,
setCanStretchColumnWidths(java.lang.Boolean)
,
setCanShrinkColumnWidths(java.lang.Boolean)
,
setColumnOverflow(com.smartgwt.client.types.Overflow)
,
Sizing overview and related methods
public java.lang.Boolean getCanResizePortlets()
Portlets
be drag-resizable? Note that changing the height of a Portlet will change the height of all the Portlets in the same row to match.
If
the height of Portlets causes a column to overflow, that column will scroll vertically (independent of other columns),
depending on the columnOverflow
setting.
Changing the width of a Portlet will potentially cause columns to stretch and shrink their displayed
widths in order to accomodate the Portlets, depending on the value of canStretchColumnWidths
and canShrinkColumnWidths
.
However, the
instrinsic width of the columns will remain the same, so that the columns will resume their former widths when no
longer necessary to stretch or shrink to accomodate the widths of Portlets. To allow drag-resizing of the intrinsic
width of columns, see canResizeColumns
.
The net effect is that (by default) PortalLayouts behave like layouts when Portlet sizes do not cause overflow, but behave more like stacks when overflow occurs.
getCanResizeColumns()
,
getCanStretchColumnWidths()
,
getCanShrinkColumnWidths()
,
getColumnOverflow()
,
Sizing overview and related methods
public void setCanResizeRows(java.lang.Boolean canResizeRows)
canResizePortlets
instead.canResizeRows
- Whether drag-resize of portlets within columns is allowed. Default value is falsepublic java.lang.Boolean getCanResizeRows()
canResizePortlets
instead.public void setCanShrinkColumnWidths(java.lang.Boolean canShrinkColumnWidths)
Portlets
. If so, the column may shrink to avoid
having to scroll the PortalLayout.
canShrinkColumnWidths
and reflows to reflect the new setting.
Note : This is an advanced setting
canShrinkColumnWidths
- Whether columns can shrink to avoid overflowing the PortalLayout's width. Default value is truesetCanStretchColumnWidths(java.lang.Boolean)
,
Sizing overview and related methods
public java.lang.Boolean getCanShrinkColumnWidths()
Portlets
. If so, the column may shrink to avoid
having to scroll the PortalLayout.getCanStretchColumnWidths()
,
Sizing overview and related methods
public void setCanStretchColumnWidths(java.lang.Boolean canStretchColumnWidths)
Portlets
. If set, columns will overflow their widths in order to accomodate
the widths of their Portlets. With the default setting of Overflow
: auto, the
PortalLayout as a whole will scroll horizontally if needed. Depending on the setting of canShrinkColumnWidths
, other columns may
shrink to avoid overflow on the PortalLayout as a whole.
If canStretchColumnWidths
is turned off, then
individual rows will scroll horizontally in order to accommodate Portlets that are wider than their column width allows.
If this method is called after the component has been drawn/initialized:
Sets canStretchColumnWidths
and reflows to reflect the new setting.
Note : This is an advanced setting
canStretchColumnWidths
- Whether columns can stretch to accommodate Portlet
widths. Default value is truesetCanShrinkColumnWidths(java.lang.Boolean)
,
setCanResizePortlets(java.lang.Boolean)
,
Overflow
,
Sizing overview and related methods
public java.lang.Boolean getCanStretchColumnWidths()
Portlets
. If set, columns will overflow their widths in order to accomodate
the widths of their Portlets. With the default setting of Overflow
: auto, the
PortalLayout as a whole will scroll horizontally if needed. Depending on the setting of canShrinkColumnWidths
, other columns may
shrink to avoid overflow on the PortalLayout as a whole.
If canStretchColumnWidths
is turned off, then
individual rows will scroll horizontally in order to accommodate Portlets that are wider than their column width allows.
getCanShrinkColumnWidths()
,
getCanResizePortlets()
,
Overflow
,
Sizing overview and related methods
public Layout getColumn()
Using AutoChildren
for details.
Automatically generated vertical Layout
used to create columns of Portlets
via createAutoChild(). Since this is an com.smartgwt.client.types.AutoChild
, you can use columnDefaults and columnProperties to customize the columns.
The
column includes a menu, if showColumnMenus
is
true, and a rowLayout
which actually contains the
rows
. Therefore, if you want to style the columns as a
whole, use columnDefaults or columnProperties, but if you want to style the layout that contains the rows, use
rowLayoutDefaults or rowLayoutProperties.
getRowLayout()
,
getRow()
public void setColumnBorder(java.lang.String columnBorder)
columnBorder
- New border to show around columns. Default value is "1px solid gray"public java.lang.String getColumnBorder()
public void setColumnOverflow(Overflow columnOverflow)
overflow
setting for each column. If set to "auto"
(the default) then each column will scroll individually (if its Portlets
overflow the column height). You can also use "hidden" to clip overflowing heights, or "visible" to show the
overflow. The effect of "visible" will depend on the setting for overflow
-- by default, the PortalLayout as a whole will
scroll when necessary.
columnOverflow
and updates existing columns to reflect the new setting.
Note : This is an advanced setting
columnOverflow
- Overflow setting for columns. Default value is "auto"Overflow
,
Canvas.setOverflow(com.smartgwt.client.types.Overflow)
,
Sizing overview and related methods
public Overflow getColumnOverflow()
overflow
setting for each column. If set to "auto"
(the default) then each column will scroll individually (if its Portlets
overflow the column height). You can also use "hidden" to clip overflowing heights, or "visible" to show the
overflow. The effect of "visible" will depend on the setting for overflow
-- by default, the PortalLayout as a whole will
scroll when necessary.Overflow
,
Canvas.getOverflow()
,
Sizing overview and related methods
public void setDropTypes(java.lang.String... dropTypes) throws java.lang.IllegalStateException
dropTypes
is set to ["PortalColumn"]
in order to allow the dragging of columns within the
PortalLayout
. To control dropTypes
when Portlets
or other components are dragged into the PortalLayout
, use portletDropTypes
instead.setDropTypes
in class Canvas
dropTypes
- New dropTypes value. Default value is ["PortalColumn"]java.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetPortletDropTypes(java.lang.String...)
,
Dragdrop overview and related methods
public java.lang.String[] getDropTypes()
dropTypes
is set to ["PortalColumn"]
in order to allow the dragging of columns within the
PortalLayout
. To control dropTypes
when Portlets
or other components are dragged into the PortalLayout
, use portletDropTypes
instead.getDropTypes
in class Canvas
getPortletDropTypes()
,
Dragdrop overview and related methods
public void setNumColumns(int numColumns) throws java.lang.IllegalStateException
addColumn()
and removeColumn()
. numColumns is ignored if you initialize
the portlets
attribute, since the portlets attribute
will imply how many columns to create.numColumns
- New numColumns value. Default value is 2java.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetPortlets(com.smartgwt.client.widgets.layout.Portlet...)
public int getNumColumns()
addColumn()
and removeColumn()
. numColumns is ignored if you initialize
the portlets
attribute, since the portlets attribute
will imply how many columns to create.getPortlets()
public void setOverflow(Overflow overflow)
Portlet
widths
overflow the width of the PortalLayout. By default, the PortalLayout scrolls when necessary. You can also use overflow:
visible or overflow: hidden, with the usual results -- see canResizePortlets
for a further explanation of
column widths. Note that overflowing height is also affected by columnOverflow
. By default, each column will scroll
individually -- you can change columnOverflow to "auto" to scroll the whole PortalLayout instead.
setOverflow
in class Layout
overflow
- New overflow value. Default value is "auto"setCanResizePortlets(java.lang.Boolean)
,
setColumnOverflow(com.smartgwt.client.types.Overflow)
,
Canvas.setOverflow(com.smartgwt.client.types.Overflow)
,
Sizing overview and related methods
public Overflow getOverflow()
Portlet
widths
overflow the width of the PortalLayout. By default, the PortalLayout scrolls when necessary. You can also use overflow:
visible or overflow: hidden, with the usual results -- see canResizePortlets
for a further explanation of
column widths. Note that overflowing height is also affected by columnOverflow
. By default, each column will scroll
individually -- you can change columnOverflow to "auto" to scroll the whole PortalLayout instead.
getOverflow
in class Layout
getCanResizePortlets()
,
getColumnOverflow()
,
Canvas.getOverflow()
,
Sizing overview and related methods
public void setPortletDropTypes(java.lang.String... portletDropTypes)
The dropTypes
to be applied when dropping Portlets
on this PortalLayout
, or when dropping other
components to be auto-wrapped in a Portlet
. If you set this, then you will
need to set an equivalent Canvas.dragType
on anything to be
dragged into this PortalLayout
(including Portlets
).
As a convenience, Portlet.dragType
defaults to
"Portlet"
. Thus, if you want to allow Portlets
to be
dropped on this PortalLayout
, but disable auto-wrapping of other components, you can set
portletDropTypes
to ["Portlet"]
.
If you want to allow some Portlets
to be dropped on this PortalLayout
but not others,
then set a custom dragType
for the Portlets
, and set portletDropTypes
to match.
If you
want to have different dropTypes
for rows
and rowLayouts
, you can specify
dropType
on the row
or rowLayout
autochildren instead.
For more control
over what can be dropped, you can also implement willAcceptPortletDrop()
.
If this method is called after the component has been drawn/initialized:
Sets the portletDropTypes
to be applied when dropping Portlets
on this PortalLayout
, or when dropping other components to be auto-wrapped in a Portlet
.
portletDropTypes
- dropTypes to apply when dropping Portlets
. Default value is nullCanvas.setDropTypes(java.lang.String...)
,
Dragdrop overview and related methods
public java.lang.String[] getPortletDropTypes()
The dropTypes
to be applied when dropping Portlets
on this PortalLayout
, or when dropping other
components to be auto-wrapped in a Portlet
. If you set this, then you will
need to set an equivalent Canvas.dragType
on anything to be
dragged into this PortalLayout
(including Portlets
).
As a convenience, Portlet.dragType
defaults to
"Portlet"
. Thus, if you want to allow Portlets
to be
dropped on this PortalLayout
, but disable auto-wrapping of other components, you can set
portletDropTypes
to ["Portlet"]
.
If you want to allow some Portlets
to be dropped on this PortalLayout
but not others,
then set a custom dragType
for the Portlets
, and set portletDropTypes
to match.
If you
want to have different dropTypes
for rows
and rowLayouts
, you can specify
dropType
on the row
or rowLayout
autochildren instead.
For more control
over what can be dropped, you can also implement willAcceptPortletDrop()
.
Canvas.getDropTypes()
,
Dragdrop overview and related methods
public void setPortlets(Portlet... portlets) throws java.lang.IllegalStateException
Portlets
on initialization. After initialization, use addPortlet()
or drag-and-drop to add Portlets, and getPortlets()
or getPortletArray()
to get Portlets. To create one column, you can provide an array of Portlets.
To create multiple columns, provide an array of arrays (where the first level represents columns, and the second represents Portlets).
To put multiple portlets in the same row, provide a third level to the array.
Note that numColumns
is ignored if you provide the portlets attribute, since the array will indicate how many columns to create.
You can provide an empty second-level array to create a blank column, if needed.
portlets
- New portlets value. Default value is nulljava.lang.IllegalStateException
- this property cannot be changed after the component has been createdgetPortlets()
,
getPortletArray()
,
addPortlet(com.smartgwt.client.widgets.layout.Portlet)
,
setNumColumns(int)
,
Repositioning Examplepublic void setPreventColumnUnderflow(java.lang.Boolean preventColumnUnderflow)
Portlet
in a column will be stretched to fill the
column's height, or left at its specified height.preventColumnUnderflow
- New preventColumnUnderflow value. Default value is trueSizing overview and related methods
public java.lang.Boolean getPreventColumnUnderflow()
Portlet
in a column will be stretched to fill the
column's height, or left at its specified height.Sizing overview and related methods
public void setPreventRowUnderflow(java.lang.Boolean preventRowUnderflow)
Portlet
in a row will be stretched to fill the
row's width, or left at its specified width.
preventRowUnderflow
and reflows the layout to implement it.preventRowUnderflow
- Whether to stretch the last Portlet
in a row to to fill the row's width. Default value is trueSizing overview and related methods
public java.lang.Boolean getPreventRowUnderflow()
Portlet
in a row will be stretched to fill the
row's width, or left at its specified width.Sizing overview and related methods
public void setPreventUnderflow(java.lang.Boolean preventUnderflow)
preventUnderflow
and reflows the layout to implement it.preventUnderflow
- Whether to stretch the last column to fill the PortalLayout's width. Default value is trueSizing overview and related methods
public java.lang.Boolean getPreventUnderflow()
Sizing overview and related methods
public Layout getRow()
Using AutoChildren
for details.
Automatically generated horizontal Layout
used to create rows of Portlets
via createAutoChild(). Since this is an com.smartgwt.client.types.AutoChild
, you can use rowDefaults and rowProperties to customize the rows.
Rows are
created inside rowLayouts
, which in turn are inside
columns
.
getColumn()
,
getRowLayout()
public Layout getRowLayout()
Using AutoChildren
for details.
Automatically generated vertical Layout
used to create columns of Portlets
via createAutoChild(). Since this is an com.smartgwt.client.types.AutoChild
, you can use rowLayoutDefaults and rowLayoutProperties to customize the layout
used to contain the rows.
The rowLayout is the actual container for rows
of Portlets
. See column
for the column as a whole, which
may include a menu as well (depending on showColumnMenus
). If you want to style the columns as a whole, use columnDefaults or columnProperties, but if you want
to style the layout that actually contains the rows, use rowLayoutDefaults or rowLayoutProperties.
getRowLayout()
,
getRow()
public void setShowColumnMenus(java.lang.Boolean showColumnMenus)
showColumnMenus
and updates existing columns to reflect the new setting.showColumnMenus
- Whether to show column menus. Default value is truepublic java.lang.Boolean getShowColumnMenus()
public void setStretchColumnWidthsProportionally(java.lang.Boolean stretchColumnWidthsProportionally)
stretching column widths
, should
we stretch all column widths proportionally, or just stretch the columns that need extra width? Note that this
implies turning off canShrinkColumnWidths
.
If this method is called after the component has been drawn/initialized:
Sets stretchColumnWidthsProportionally
and reflows to reflect the new setting.
Note : This is an advanced setting
stretchColumnWidthsProportionally
- Whether to stretch column widths proportionally. Default value is falsesetCanStretchColumnWidths(java.lang.Boolean)
,
setCanShrinkColumnWidths(java.lang.Boolean)
,
Sizing overview and related methods
public java.lang.Boolean getStretchColumnWidthsProportionally()
stretching column widths
, should
we stretch all column widths proportionally, or just stretch the columns that need extra width? Note that this
implies turning off canShrinkColumnWidths
.
getCanStretchColumnWidths()
,
getCanShrinkColumnWidths()
,
Sizing overview and related methods
public void addColumn(int index)
index
- target position for the new columnpublic int getColumnWidth(int colNumber)
colNumber
- Which column's width to getCanvas.getWidth()
public PortalPosition getPortalPosition(Portlet portlet)
Portlet
within this PortalLayout. Returns null if
the Portlet is not in this PortalLayout.portlet
- the Portlet for which to get the positionpublic void removeColumn(int index)
index
- column number to removepublic void removePortlet(Portlet portlet)
Portlet
which is currently rendered in this PortalLayout. Portlet
will not be destroyed by default - if this is desired the calling code should do this explicitly.portlet
- portlet to removepublic void setColumnPreventUnderflow(boolean preventColumnUnderflow)
preventColumnUnderflow
and
reflows the layout to implement it.preventColumnUnderflow
- Whether to stretch the last Portlet
in a column to fill the column's height.Sizing overview and related methods
public static void setDefaultProperties(PortalLayout portalLayoutProperties)
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.
portalLayoutProperties
- properties that should be used as new defaults when instances of this class are createdSGWTProperties
protected void onInit_PortalLayout()
public java.lang.Boolean willAcceptPortletDrop(Canvas dragTarget, java.lang.Integer colNum, java.lang.Integer rowNum, java.lang.Integer dropPosition)
Returns true if the dragged Portlet
, or other component, can be dropped onto
this PortalLayout
(other components would be auto-wrapped in a Portlet
).
The default implementation acts like Canvas.willAcceptDrop()
, except applying
portletDropTypes
rather than
dropTypes
.
You can subclass to apply other (or additional) criteria
Note: This is an override point
dragTarget
- The Portlet
, or other component, being draggedcolNum
- indicates which column the portlet would be dropped on.rowNum
- indicates the row number being dropped on.dropPosition
- Drop position within an existing row. If the dropPosition is null, then that means that a new row will be created.Portlet
or other component being dragged can be dropped on this PortalLayout, false otherwisepublic Canvas getDropPortlet(Canvas dragTarget, java.lang.Integer colNum, java.lang.Integer rowNum, java.lang.Integer dropPosition)
Overriding this method allows you to modify drop behaviour when creating or reordering portlets via drag & drop. You can return the dragTarget for the standard behavior, or null to cancel the drop.
Otherwise, return the component you want to be
dropped (as for Layout.getDropComponent
).
Note: this is an override point.
dragTarget
- the component being draggedcolNum
- indicates which column the portlet is being dropped on.rowNum
- indicates the row number being dropped on.dropPosition
- Drop position within an existing row. If the dropPosition is null, then that means that a new row will be created.public Portlet[] getPortlets()
Portlets
in this PortalLayout.public Portlet[][][] getPortletArray()
Portlets
in this PortalLayout,
where the first level corresponds to columns, the second to rows, and the third to Portlets within rows.public void addPortlet(Portlet portlet)
Portlet
instance to this portalLayout in the specified position.portlet
- Portlet to add to this layout.public void addPortlet(Portlet portlet, int colNum, int rowNum)
Portlet
instance to this portalLayout in the specified position.portlet
- Portlet to add to this layout.colNum
- Column in which the Portlet should be added. If unspecified, defaults to zero.rowNum
- Position within the column for the Portlet.public void addPortlet(Portlet portlet, int colNum, int rowNum, int rowOffset)
Portlet
instance to this portalLayout in the specified position.portlet
- Portlet to add to this layout.colNum
- Column in which the Portlet should be added. If unspecified, defaults to zero.rowNum
- Position within the column for the PortletrowOffset
- Position for the portlet within an existing row. If the row specified by rowNum already exists,
the portlet will be added to that row at this position. If rowNum does not already exist, this parameter is ignoredpublic void setColumnWidth(int colNumber, int width)
colNumber
- Which column's width to set.width
- How wide to make the columnpublic void setColumnWidth(int colNumber, java.lang.String width)
colNumber
- Which column's width to set.width
- How wide to make the columnpublic boolean willMaximizePortlet(Portlet portlet)
Portlet
in this PortalLayout is about to be maximized. Note that this method is
only called when the user explicitly clicks on the portlet's
maximize button
-- it is not called when programmatically maximizing a portlet via
Window.maximize()
.
Return false to cancel the action.
Note: This is an override point
portlet
- the Portlet which will be maximizedpublic boolean willMinimizePortlet(Portlet portlet)
Portlet
in this PortalLayout is about to be minimized. Note that this method is
only called when the user explicitly clicks on the portlet's
minimize button
-- it is not called when programmatically minimizing a portlet via
Window.minimize()
.
Return false to cancel the action.
Note: This is an override point
portlet
- the Portlet which will be minimizedpublic boolean willRestorePortlet(Portlet portlet)
Portlet
in this PortalLayout is about to be restored to its normal place (after having been
maximized
.
Note that this method is
only called when the user explicitly clicks on the portlet's "restore" button
-- it is not called when programmatically restoring a portlet via
restore()
.
Return false to cancel the action.
Note: This is an override point
portlet
- the Portlet which will be restoredpublic boolean willClosePortlet(Portlet portlet)
Portlet
in this PortalLayout is about to be closed.
Note that this method is
only called when the user explicitly clicks on the portlet's "close" button
-- it is not called when programmatically removing a portlet via
removePortlet()
.
Return false to cancel the action.
Note: This is an override point
portlet
- the Portlet which will be closedpublic void portletMaximized(Portlet portlet)
Portlet
has been maximized (whether by
user action or programmatically).
Note: This is an override point
portlet
- The portlet which was maximizedwillMaximizePortlet(com.smartgwt.client.widgets.layout.Portlet)
public void portletMinimized(Portlet portlet)
Portlet
has been minimized (whether by
user action or programmatically).
Note: This is an override point
portlet
- The portlet which was minimizedwillMinimizePortlet(com.smartgwt.client.widgets.layout.Portlet)
public void portletRestored(Portlet portlet)
Portlet
has been restored to its normal place
(after having been maximized). The method is called whether the restore is
via user action or done programmatically.
Note: This is an override point
portlet
- The portlet which was restored.willRestorePortlet(com.smartgwt.client.widgets.layout.Portlet)
public void portletsChanged()
portlets
, and then fires whenever portlets are added,
removed or reordered.
Note: This is an override point
com.smartgwt.client.widgets.layout.Layout#membersChanged
public void portletsResized()
portlets
or columns in this PortalLayout are
resized. Note that this fires on a short delay -- otherwise, it would
fire multiple times for each change, since most portlet size changes
will affect multiple portlets. Does not fire when a portlet is
maximized
or restored
.
Note: This is an override point
public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.layout.PortalLayoutLogicalStructure 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 Layout