Class TileLayout
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,HasVisibility
,IsWidget
,LogicalStructure
,HasClearHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasDragMoveHandlers
,HasDragRepositionMoveHandlers
,HasDragRepositionStartHandlers
,HasDragRepositionStopHandlers
,HasDragResizeMoveHandlers
,HasDragResizeStartHandlers
,HasDragResizeStopHandlers
,HasDragStartHandlers
,HasDragStopHandlers
,HasDropHandlers
,HasDropMoveHandlers
,HasDropOutHandlers
,HasDropOverHandlers
,HasFocusChangedHandlers
,HasHoverHandlers
,HasHoverHiddenHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasMouseDownHandlers
,HasMouseMoveHandlers
,HasMouseOutHandlers
,HasMouseOverHandlers
,HasMouseStillDownHandlers
,HasMouseUpHandlers
,HasMouseWheelHandlers
,HasMovedHandlers
,HasParentMovedHandlers
,HasResizedHandlers
,HasRightMouseDownHandlers
,HasRuleContextChangedHandlers
,HasScrolledHandlers
,HasShowContextMenuHandlers
,HasVisibilityChangedHandlers
- Direct Known Subclasses:
FlowLayout
,TileGrid
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a tile to the layout, dynamically.void
Add a tile to the layout, dynamically.static void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.protected JavaScriptObject
create()
If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.WhenLayoutPolicy
is "flow", should we automatically start a new line when there's not enough room to fit the next tile on the same line?Indicates what to do with data dragged into another DataBoundComponent.Canvas used to display a drop indicator when a another canvas is dragged over this widget.The CSS class applied to thedragLine
autochild.int
Thickness of thedragLine
autochild.int
Returns the tile index of the tile that would currently be dropped on by the drag in process.WithLayoutPolicy
:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affecttileWidth
ortileHeight
.A margin left around the outside of all tiles.Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.static TileLayout
getOrCreateRef
(JavaScriptObject jsObj) Direction of tiling.NormalOverflow
settings can be used on TileLayouts, for example, an overflow:auto TileLayout will scroll if members exceed its specified size, whereas an overflow:visible TileLayout will grow to accommodate members.If this widget has padding specified (asthis.padding
or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?Set false to prevent thedragLine
autochild from showing during dragging.getTile
(int index) Retrieve a tile by index.Height of each tile in pixels.Horizontal margin in between tiles.int
Margin in between tiles.int
Size of each tile in pixels.Number of tiles to show in each line.Vertical margin in between tiles.Width of each tile in pixels.void
Forces layout out the tilesboolean
removeTile
(int tileIndex) Remove a tile from the layout.boolean
removeTile
(Canvas tile) Remove a tile from the layout.boolean
removeTile
(String tileID) Remove a tile from the layout.setAnimateTileChange
(Boolean animateTileChange) If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.setAutoWrapLines
(Boolean autoWrapLines) WhenLayoutPolicy
is "flow", should we automatically start a new line when there's not enough room to fit the next tile on the same line?static void
setDefaultProperties
(TileLayout tileLayoutProperties) Class level method to set the default properties of this class.setDragDataAction
(DragDataAction dragDataAction) Indicates what to do with data dragged into another DataBoundComponent.setDragLineStyle
(String dragLineStyle) The CSS class applied to thedragLine
autochild.setDragLineThickness
(int dragLineThickness) Thickness of thedragLine
autochild.setExpandMargins
(Boolean expandMargins) WithLayoutPolicy
:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affecttileWidth
ortileHeight
.setLayoutMargin
(Integer layoutMargin) A margin left around the outside of all tiles.void
setLayoutPolicy
(TileLayoutPolicy layoutPolicy) Policy for laying out tiles.Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.setOrientation
(Orientation orientation) Direction of tiling.setOverflow
(Overflow overflow) NormalOverflow
settings can be used on TileLayouts, for example, an overflow:auto TileLayout will scroll if members exceed its specified size, whereas an overflow:visible TileLayout will grow to accommodate members.setPaddingAsLayoutMargin
(Boolean paddingAsLayoutMargin) If this widget has padding specified (asthis.padding
or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?setShowDragLine
(Boolean showDragLine) Set false to prevent thedragLine
autochild from showing during dragging.setTileHeight
(Integer tileHeight) Height of each tile in pixels.setTileHMargin
(Integer tileHMargin) Horizontal margin in between tiles.setTileMargin
(int tileMargin) Margin in between tiles.List of tiles to lay out.setTileSize
(int tileSize) Size of each tile in pixels.setTilesPerLine
(Integer tilesPerLine) Number of tiles to show in each line.setTileVMargin
(Integer tileVMargin) Vertical margin in between tiles.setTileWidth
(Integer tileWidth) Width of each tile in pixels.transformTileRect
(int left, int top, int width, int height) Transforms the input tilerelative rect
to an absolute page rect that you can apply to your own drop indicator canvas.Methods inherited from class com.smartgwt.client.widgets.Canvas
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, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, 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, getChildTabPosition, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getEditProxyConstructor, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, 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, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getStyleName, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, revealChild, revealChild, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAlign, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, 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, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setEditProxyConstructor, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, 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, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setStyleName, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, 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
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
TileLayout
public TileLayout() -
TileLayout
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
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, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
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, seeSGWTProperties
.- See Also:
-
create
-
setAnimateTileChange
If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.Note : This is an advanced setting
- Parameters:
animateTileChange
- New animateTileChange value. Default value is true- Returns:
TileLayout
instance, for chaining setter calls- See Also:
-
getAnimateTileChange
If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.- Returns:
- Current animateTileChange value. Default value is true
- See Also:
-
setAutoWrapLines
WhenLayoutPolicy
is "flow", should we automatically start a new line when there's not enough room to fit the next tile on the same line?If set to false, a new line will only be started if a tile specifies
tile.startLine
ortile.endLine
.- Parameters:
autoWrapLines
- New autoWrapLines value. Default value is true- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAutoWrapLines
WhenLayoutPolicy
is "flow", should we automatically start a new line when there's not enough room to fit the next tile on the same line?If set to false, a new line will only be started if a tile specifies
tile.startLine
ortile.endLine
.- Returns:
- Current autoWrapLines value. Default value is true
-
setDragDataAction
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.- Parameters:
dragDataAction
- New dragDataAction value. Default value is Canvas.MOVE- Returns:
TileLayout
instance, for chaining setter calls- See Also:
-
getDragDataAction
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.- Returns:
- Current dragDataAction value. Default value is Canvas.MOVE
- See Also:
-
getDragLine
Canvas used to display a drop indicator when a another canvas is dragged over this widget.This component is an AutoChild named "dragLine". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current dragLine value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setDragLineStyle
The CSS class applied to thedragLine
autochild.- Parameters:
dragLineStyle
- New dragLineStyle value. Default value is "layoutDropLine"- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getDragLineStyle
The CSS class applied to thedragLine
autochild.- Returns:
- Current dragLineStyle value. Default value is "layoutDropLine"
- See Also:
-
setDragLineThickness
Thickness of thedragLine
autochild.- Parameters:
dragLineThickness
- New dragLineThickness value. Default value is 2- Returns:
TileLayout
instance, for chaining setter calls
-
getDragLineThickness
public int getDragLineThickness()Thickness of thedragLine
autochild.- Returns:
- Current dragLineThickness value. Default value is 2
-
setExpandMargins
WithLayoutPolicy
:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affecttileWidth
ortileHeight
. See those properties for details.- Parameters:
expandMargins
- New expandMargins value. Default value is true- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getExpandMargins
WithLayoutPolicy
:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affecttileWidth
ortileHeight
. See those properties for details.- Returns:
- Current expandMargins value. Default value is true
-
setLayoutMargin
A margin left around the outside of all tiles.- Parameters:
layoutMargin
- New layoutMargin value. Default value is 5- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getLayoutMargin
A margin left around the outside of all tiles.- Returns:
- Current layoutMargin value. Default value is 5
-
setOrientation
Direction of tiling. See alsoTileLayoutPolicy
.- Parameters:
orientation
- New orientation value. Default value is "horizontal"- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getOrientation
Direction of tiling. See alsoTileLayoutPolicy
.- Returns:
- Current orientation value. Default value is "horizontal"
-
setOverflow
NormalOverflow
settings can be used on TileLayouts, for example, an overflow:auto TileLayout will scroll if members exceed its specified size, whereas an overflow:visible TileLayout will grow to accommodate members.- Overrides:
setOverflow
in classCanvas
- Parameters:
overflow
- New overflow value. Default value is "auto"- Returns:
TileLayout
instance, for chaining setter calls- See Also:
-
getOverflow
NormalOverflow
settings can be used on TileLayouts, for example, an overflow:auto TileLayout will scroll if members exceed its specified size, whereas an overflow:visible TileLayout will grow to accommodate members.- Overrides:
getOverflow
in classCanvas
- Returns:
- Current overflow value. Default value is "auto"
- See Also:
-
setPaddingAsLayoutMargin
If this widget has padding specified (asthis.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
Layout.layoutMargin
if specified, takes precedence over this value.Note : This is an advanced setting
- Parameters:
paddingAsLayoutMargin
- New paddingAsLayoutMargin value. Default value is true- Returns:
TileLayout
instance, for chaining setter calls
-
getPaddingAsLayoutMargin
If this widget has padding specified (asthis.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
Layout.layoutMargin
if specified, takes precedence over this value.- Returns:
- Current paddingAsLayoutMargin value. Default value is true
-
setShowDragLine
Set false to prevent thedragLine
autochild from showing during dragging.- Parameters:
showDragLine
- New showDragLine value. Default value is null- Returns:
TileLayout
instance, for chaining setter calls
-
getShowDragLine
Set false to prevent thedragLine
autochild from showing during dragging.- Returns:
- Current showDragLine value. Default value is null
-
setTileHeight
Height of each tile in pixels. SeetileSize
. IfTileLayoutPolicy
is "fit",expandMargins
is false,tilesPerLine
is set,Orientation
is "vertical", and tileHeight is not set, tileHeight will be computed automatically based ontilesPerLine
.
If this method is called after the component has been drawn/initialized: Sets the height of tiles.- Parameters:
tileHeight
- height. Default value is null- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getTileHeight
Height of each tile in pixels. SeetileSize
. IfTileLayoutPolicy
is "fit",expandMargins
is false,tilesPerLine
is set,Orientation
is "vertical", and tileHeight is not set, tileHeight will be computed automatically based ontilesPerLine
.- Returns:
- Current tileHeight value. Default value is null
- See Also:
-
setTileHMargin
Horizontal margin in between tiles. SeetileMargin
.
If this method is called after the component has been drawn/initialized: Sets the horizontal margin of tiles.- Parameters:
tileHMargin
- margin. Default value is null- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTileHMargin
Horizontal margin in between tiles. SeetileMargin
.- Returns:
- Current tileHMargin value. Default value is null
-
setTileMargin
Margin in between tiles. Can be set on a per-axis basis withtileHMargin
andtileVMargin
.
If this method is called after the component has been drawn/initialized: Sets the vertical and horizontal margin of tiles.- Parameters:
tileMargin
- margin. Default value is 10- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTileMargin
public int getTileMargin()Margin in between tiles. Can be set on a per-axis basis withtileHMargin
andtileVMargin
.- Returns:
- Current tileMargin value. Default value is 10
-
setTiles
List of tiles to lay out.- Parameters:
tiles
- New tiles value. Default value is null- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
setTileSize
Size of each tile in pixels. Depending on theTileLayoutPolicy
,tileSize
may be taken as a maximum, minimum or exact size of tiles, or may be irrelevant.Width and height may be separately set via
tileHeight
andtileWidth
.
If this method is called after the component has been drawn/initialized: Sets the height and width of tiles.- Parameters:
tileSize
- size. Default value is 100- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getTileSize
public int getTileSize()Size of each tile in pixels. Depending on theTileLayoutPolicy
,tileSize
may be taken as a maximum, minimum or exact size of tiles, or may be irrelevant.Width and height may be separately set via
tileHeight
andtileWidth
.- Returns:
- Current tileSize value. Default value is 100
- See Also:
-
setTilesPerLine
Number of tiles to show in each line. Auto-derived fromtileSize
for some layout modes. SeeTileLayoutPolicy
. This can also affecttileWidth
ortileHeight
. See those properties for details.
If this method is called after the component has been drawn/initialized: Sets the number of tiles per line.- Parameters:
tilesPerLine
- NewtilesPerLine
value. Default value is null- Returns:
TileLayout
instance, for chaining setter calls
-
getTilesPerLine
Number of tiles to show in each line. Auto-derived fromtileSize
for some layout modes. SeeTileLayoutPolicy
. This can also affecttileWidth
ortileHeight
. See those properties for details.- Returns:
- Current tilesPerLine value. Default value is null
-
setTileVMargin
Vertical margin in between tiles. SeetileMargin
.
If this method is called after the component has been drawn/initialized: Sets the vertical margin of tiles.- Parameters:
tileVMargin
- margin. Default value is null- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTileVMargin
Vertical margin in between tiles. SeetileMargin
.- Returns:
- Current tileVMargin value. Default value is null
-
setTileWidth
Width of each tile in pixels. SeetileSize
. IfTileLayoutPolicy
is "fit",expandMargins
is false,tilesPerLine
is set,Orientation
is "horizontal", and tileWidth is not set, tileWidth will be computed automatically based ontilesPerLine
.
If this method is called after the component has been drawn/initialized: Sets the width of tiles.- Parameters:
tileWidth
- width. Default value is null- Returns:
TileLayout
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getTileWidth
Width of each tile in pixels. SeetileSize
. IfTileLayoutPolicy
is "fit",expandMargins
is false,tilesPerLine
is set,Orientation
is "horizontal", and tileWidth is not set, tileWidth will be computed automatically based ontilesPerLine
.- Returns:
- Current tileWidth value. Default value is null
- See Also:
-
addTile
Add a tile to the layout, dynamically.- Parameters:
tile
- new tile to add
-
addTile
Add a tile to the layout, dynamically.- Parameters:
tile
- new tile to addindex
- position where the tile should be added. Defaults to adding the tile at the end.
-
getDropIndex
public int getDropIndex()Returns the tile index of the tile that would currently be dropped on by the drag in process. Returns one beyond the last valid index to indicate a drop after all tiles. Except for that special case, a non-null index returned by this method may be passed togetTile()
to get the corresponding visible tile.- Returns:
- tile index of tile that would currently be dropped on, or the tile count for a drop after all tiles
- See Also:
-
getTile
Retrieve a tile by index.The TileLayout consistently uses this method to access tiles, in order to allow subclasses to create tiles on demand.
- Parameters:
index
- index of the tile- Returns:
- the tile
-
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.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.
- Parameters:
tileLayoutProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
setLayoutPolicy
Policy for laying out tiles. SeeTileLayoutPolicy
for options.- Parameters:
layoutPolicy
- layoutPolicy Default value is ""- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
removeTile
public boolean removeTile(int tileIndex) Remove a tile from the layout.- Parameters:
tileIndex
- index or String ID of the tile- Returns:
- whether a tile was found and removed
-
removeTile
Remove a tile from the layout.- Parameters:
tileID
- index or String ID of the tile- Returns:
- whether a tile was found and removed
-
removeTile
Remove a tile from the layout.- Parameters:
tile
- index or String ID of the tile- Returns:
- whether a tile was found and removed
-
layoutTiles
public void layoutTiles()Forces layout out the tiles -
transformTileRect
Transforms the input tilerelative rect
to an absolute page rect that you can apply to your own drop indicator canvas. The supplied rect is automatically clipped along the direction perpendicular to the layout'sorientation
if it extends beyond the visible edges of the layout, just like thedragLine
autochild.Note: This is an advanced setting. Only code your own drop indicator if you can't get what you need by customizing and
styling
the built-indragLine
autochild!To build your own:
- Create a separate indicator
Canvas
, positioned off screen with the appropriate color, opacity, andstyle
that you want. Set the indicator'sdropTarget
to be the layout to so the indicator is ignored. - Override
dropMove()
to callgetDropIndex()
, retrieve the tile, get thetile's relative rect
, and modify the rect as you need to size your indicator properly. - You'll have to manually handle the case of the drop index pointing beyond the last record, perhaps by grabbing the last tile rect, but narrowing it to the opposite side.
- Pass the modified rect to this method to clip and transform it to an absolute rect,
and then
set that new rect
into your drop indicator andshow()
it. - You will need to
hide()
the drop indicator indropOut()
.
Sample code to insert into the SGWT LGPL "Basic Tiling" sample, replacing getViewPanel():
public static class MyTileGrid extends TileGrid { Canvas dropIndicator; void showDropIndicator(int left, int top, int width, int height) { // create the indicator if it doesn't exist if (dropIndicator == null) { dropIndicator = new Canvas(); dropIndicator.setTop(-1000); dropIndicator.setOpacity(40); dropIndicator.setDropTarget(this); dropIndicator.setBackgroundColor("yellow"); dropIndicator.draw(); } // transform the rect to a page rect and clip to grid borders Rectangle rect = transformTileRect(left, top, width, height); dropIndicator.setRect(rect); dropIndicator.show(); } } public Canvas getViewPanel() { TileGrid tileGrid = new MyTileGrid(); tileGrid.setTileWidth(194); tileGrid.setTileHeight(180); tileGrid.setHeight(400); tileGrid.setWidth100(); tileGrid.setCanReorderTiles(true); tileGrid.setShowAllRecords(true); tileGrid.setData(CarData.getRecords()); tileGrid.setShowDragLine(false); tileGrid.setCanReorderTiles(true); tileGrid.addDropMoveHandler(new DropMoveHandler() { \@Override public void onDropMove(DropMoveEvent event) { MyTileGrid tg = (MyTileGrid)event.getFiringCanvas(); int index = tg.getDropIndex(); int length = tg.getData().length; // you can drop after last tile (special case) boolean after = index >= length; if (after) index = length - 1; // transform tile rect to indicator rect Canvas tile = tg.getTile(index); if (tile != null) { int left = tile.getLeft(), width = tile.getVisibleWidth(), top = tile.getTop(), height = tile.getVisibleHeight() ; // to show drop after last tile, shift indicator over if (after) left += width - 20; // now show the indicator tg.showDropIndicator(left, top, 20, height); } } }); tileGrid.addDropOutHandler(new DropOutHandler() { \@Override public void onDropOut(DropOutEvent event) { MyTileGrid tg = (MyTileGrid)event.getFiringCanvas(); if (tg.dropIndicator != null) tg.dropIndicator.hide(); } }); tileGrid.addClearHandler(new ClearHandler() { \@Override public void onClear(ClearEvent event) { MyTileGrid tg = (MyTileGrid)event.getFiringCanvas(); if (tg.dropIndicator != null) { tg.dropIndicator.markForDestroy(); tg.dropIndicator = null; } } }); // unchanged from here and below... :
- Parameters:
left
- new left coordinatetop
- new top coordinatewidth
- new widthheight
- new height- Returns:
- the Rectangle
- Create a separate indicator
-
setLogicalStructure
Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility. -
getLogicalStructure
Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.- Specified by:
getLogicalStructure
in interfaceLogicalStructure
- Overrides:
getLogicalStructure
in classCanvas
-