com.smartgwt.client.widgets.tile
Class TileLayout

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.tile.TileLayout
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, 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, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers
Direct Known Subclasses:
FlowLayout, TileGrid

public class TileLayout
extends Canvas

Lays out a series of components, calls "tiles", in a grid with multiple tiles per row.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet, nativeObject, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TileLayout()
           
TileLayout(JavaScriptObject jsObj)
           
 
Method Summary
 void addTile(Canvas tile)
          Add a tile to the layout, dynamically.
 void addTile(Canvas tile, Integer index)
          Add a tile to the layout, dynamically.
protected  JavaScriptObject create()
           
 Boolean getAnimateTileChange()
          If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.
 Boolean getAutoWrapLines()
          When LayoutPolicy is "flow", should we automatically start a new line when there's not enough room to fit the next tile on the same line?
 DragDataAction getDragDataAction()
          Indicates what to do with data dragged into another DataBoundComponent.
 Boolean getExpandMargins()
          With LayoutPolicy:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affect tileWidth or tileHeight.
 int getLayoutMargin()
          A margin left around the outside of all tiles.
 com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
           
static TileLayout getOrCreateRef(JavaScriptObject jsObj)
           
 Orientation getOrientation()
          Direction of tiling.
 Overflow getOverflow()
          Normal Overflow 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.
 Boolean getPaddingAsLayoutMargin()
          If this widget has padding specified (as this.padding or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?
 Canvas getTile(int index)
          Retrieve a tile by index.
 Integer getTileHeight()
          Height of each tile in pixels.
 Integer getTileHMargin()
          Horizontal margin in between tiles.
 int getTileMargin()
          Margin in between tiles.
 int getTileSize()
          Size of each tile in pixels.
 Integer getTilesPerLine()
          Number of tiles to show in each line.
 Integer getTileVMargin()
          Vertical margin in between tiles.
 Integer getTileWidth()
          Width of each tile in pixels.
 void layoutTiles()
          Forces layout out the tiles
 boolean removeTile(Canvas tile)
          Remove a tile from the layout.
 boolean removeTile(int tileIndex)
          Remove a tile from the layout.
 boolean removeTile(String tileID)
          Remove a tile from the layout.
 void setAnimateTileChange(Boolean animateTileChange)
          If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.
 void setAutoWrapLines(Boolean autoWrapLines)
          When LayoutPolicy 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.
 void setDragDataAction(DragDataAction dragDataAction)
          Indicates what to do with data dragged into another DataBoundComponent.
 void setExpandMargins(Boolean expandMargins)
          With LayoutPolicy:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affect tileWidth or tileHeight.
 void setJavaScriptObject(JavaScriptObject jsObj)
           
 void setLayoutMargin(int layoutMargin)
          A margin left around the outside of all tiles.
 void setLayoutPolicy(TileLayoutPolicy layoutPolicy)
          Policy for laying out tiles.
 com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.tile.TileLayoutLogicalStructure s)
           
 void setOrientation(Orientation orientation)
          Direction of tiling.
 void setOverflow(Overflow overflow)
          Normal Overflow 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.
 void setPaddingAsLayoutMargin(Boolean paddingAsLayoutMargin)
          If this widget has padding specified (as this.padding or in the CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin?
 void setTileHeight(Integer tileHeight)
          Height of each tile in pixels.
 void setTileHMargin(Integer tileHMargin)
          Horizontal margin in between tiles.
 void setTileMargin(int tileMargin)
          Margin in between tiles.
 void setTiles(Canvas... tiles)
          List of tiles to lay out.
 void setTileSize(int tileSize)
          Size of each tile in pixels.
 void setTilesPerLine(Integer tilesPerLine)
          Number of tiles to show in each line.
 void setTileVMargin(Integer tileVMargin)
          Vertical margin in between tiles.
 void setTileWidth(Integer tileWidth)
          Width of each tile in pixels.
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, convertToCanvasArray, deparent, depeer, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAttribute, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getParentElements, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, onInit, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setPadding, setPageLeft, setPageTop, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, initNativeObject, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, 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, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

TileLayout

public TileLayout()

TileLayout

public TileLayout(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static TileLayout getOrCreateRef(JavaScriptObject jsObj)

setJavaScriptObject

public void setJavaScriptObject(JavaScriptObject jsObj)
Overrides:
setJavaScriptObject in class Canvas

create

protected JavaScriptObject create()
Overrides:
create in class Canvas

setAnimateTileChange

public void setAnimateTileChange(Boolean animateTileChange)
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 - animateTileChange Default value is true
See Also:
Appearance overview and related methods

getAnimateTileChange

public Boolean getAnimateTileChange()
If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop.

Returns:
Boolean
See Also:
Appearance overview and related methods

setAutoWrapLines

public void setAutoWrapLines(Boolean autoWrapLines)
                      throws IllegalStateException
When LayoutPolicy 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 or tile.endLine.

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

getAutoWrapLines

public Boolean getAutoWrapLines()
When LayoutPolicy 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 or tile.endLine.

Returns:
Boolean

setDragDataAction

public void setDragDataAction(DragDataAction dragDataAction)
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.

Parameters:
dragDataAction - dragDataAction Default value is Canvas.MOVE
See Also:
Drag move Example, Drag copy Example

getDragDataAction

public DragDataAction getDragDataAction()
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.

Returns:
DragDataAction
See Also:
Drag move Example, Drag copy Example

setExpandMargins

public void setExpandMargins(Boolean expandMargins)
                      throws IllegalStateException
With LayoutPolicy:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affect tileWidth or tileHeight. See those properties for details.

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

getExpandMargins

public Boolean getExpandMargins()
With LayoutPolicy:"fit", should margins be expanded so that tiles fill the available space in the TileLayout on the breadth axis? This can also affect tileWidth or tileHeight. See those properties for details.

Returns:
Boolean

setLayoutMargin

public void setLayoutMargin(int layoutMargin)
                     throws IllegalStateException
A margin left around the outside of all tiles.

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

getLayoutMargin

public int getLayoutMargin()
A margin left around the outside of all tiles.

Returns:
int

setOrientation

public void setOrientation(Orientation orientation)
                    throws IllegalStateException
Direction of tiling. See also TileLayoutPolicy.

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

getOrientation

public Orientation getOrientation()
Direction of tiling. See also TileLayoutPolicy.

Returns:
Orientation

setOverflow

public void setOverflow(Overflow overflow)
                 throws IllegalStateException
Normal Overflow 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 class Canvas
Parameters:
overflow - overflow Default value is "auto"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Sizing overview and related methods

getOverflow

public Overflow getOverflow()
Normal Overflow 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 class Canvas
Returns:
Overflow
See Also:
Sizing overview and related methods

setPaddingAsLayoutMargin

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

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

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

Note : This is an advanced setting

Parameters:
paddingAsLayoutMargin - paddingAsLayoutMargin Default value is true

getPaddingAsLayoutMargin

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

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

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

Returns:
Boolean

setTileHeight

public void setTileHeight(Integer tileHeight)
                   throws IllegalStateException
Height of each tile in pixels. See tileSize. If LayoutPolicy is "fit", expandMargins is false, tilesPerLine is set, Orientation is "vertical", and tileHeight is not set, tileHeight will be computed automatically based on tilesPerLine.

If this method is called after the component has been drawn/initialized: sets the height of tiles

Parameters:
tileHeight - height. Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Sizing overview and related methods

getTileHeight

public Integer getTileHeight()
Height of each tile in pixels. See tileSize. If LayoutPolicy is "fit", expandMargins is false, tilesPerLine is set, Orientation is "vertical", and tileHeight is not set, tileHeight will be computed automatically based on tilesPerLine.

Returns:
Integer
See Also:
Sizing overview and related methods

setTileHMargin

public void setTileHMargin(Integer tileHMargin)
                    throws IllegalStateException
Horizontal margin in between tiles. See tileMargin.

If this method is called after the component has been drawn/initialized: sets the horizontal margin of tiles

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

getTileHMargin

public Integer getTileHMargin()
Horizontal margin in between tiles. See tileMargin.

Returns:
Integer

setTileMargin

public void setTileMargin(int tileMargin)
                   throws IllegalStateException
Margin in between tiles. Can be set on a per-axis basis with tileHMargin and tileVMargin.

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
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 with tileHMargin and tileVMargin.

Returns:
int

setTileSize

public void setTileSize(int tileSize)
                 throws IllegalStateException
Size of each tile in pixels. Depending on the LayoutPolicy, 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 and tileWidth.

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 50
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Sizing overview and related methods

getTileSize

public int getTileSize()
Size of each tile in pixels. Depending on the LayoutPolicy, 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 and tileWidth.

Returns:
int
See Also:
Sizing overview and related methods

setTilesPerLine

public void setTilesPerLine(Integer tilesPerLine)
Number of tiles to show in each line. Auto-derived from tileSize for some layout modes. See TileLayoutPolicy. This can also affect tileWidth or tileHeight. 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 - New tilesPerLine value. Default value is null

getTilesPerLine

public Integer getTilesPerLine()
Number of tiles to show in each line. Auto-derived from tileSize for some layout modes. See TileLayoutPolicy. This can also affect tileWidth or tileHeight. See those properties for details.

Returns:
Integer

setTileVMargin

public void setTileVMargin(Integer tileVMargin)
                    throws IllegalStateException
Vertical margin in between tiles. See tileMargin.

If this method is called after the component has been drawn/initialized: sets the vertical margin of tiles

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

getTileVMargin

public Integer getTileVMargin()
Vertical margin in between tiles. See tileMargin.

Returns:
Integer

setTileWidth

public void setTileWidth(Integer tileWidth)
                  throws IllegalStateException
Width of each tile in pixels. See tileSize. If LayoutPolicy is "fit", expandMargins is false, tilesPerLine is set, Orientation is "horizontal", and tileWidth is not set, tileWidth will be computed automatically based on tilesPerLine.

If this method is called after the component has been drawn/initialized: sets the width of tiles

Parameters:
tileWidth - width. Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Sizing overview and related methods

getTileWidth

public Integer getTileWidth()
Width of each tile in pixels. See tileSize. If LayoutPolicy is "fit", expandMargins is false, tilesPerLine is set, Orientation is "horizontal", and tileWidth is not set, tileWidth will be computed automatically based on tilesPerLine.

Returns:
Integer
See Also:
Sizing overview and related methods

addTile

public void addTile(Canvas tile)
Add a tile to the layout, dynamically.

Parameters:
tile - new tile to add

addTile

public void addTile(Canvas tile,
                    Integer index)
Add a tile to the layout, dynamically.

Parameters:
tile - new tile to add
index - position where the tile should be added. Defaults to adding the tile at the end.

getTile

public Canvas getTile(int index)
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

public static void setDefaultProperties(TileLayout tileLayoutProperties)
Class level method to set the default properties of this class. If set, then all subsequent instances of this class will automatically have the default properties that were set when this method was called. 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 effect 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.

Parameters:
tileLayoutProperties - properties that should be used as new defaults when instances of this class are created

setTiles

public void setTiles(Canvas... tiles)
              throws IllegalStateException
List of tiles to lay out.

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

setLayoutPolicy

public void setLayoutPolicy(TileLayoutPolicy layoutPolicy)
                     throws IllegalStateException
Policy for laying out tiles. See TileLayoutPolicy 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

public boolean removeTile(String tileID)
Remove a tile from the layout.

Parameters:
tileID - index or String ID of the tile
Returns:
whether a tile was found and removed

removeTile

public boolean removeTile(Canvas tile)
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


setLogicalStructure

public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.tile.TileLayoutLogicalStructure s)

getLogicalStructure

public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
Specified by:
getLogicalStructure in interface LogicalStructure
Overrides:
getLogicalStructure in class Canvas