|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.tile.TileLayout
public class TileLayout
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 |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.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(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
void |
addTile(Canvas tile)
Add a tile to the layout, dynamically. |
void |
addTile(Canvas tile,
java.lang.Integer index)
Add a tile to the layout, dynamically. |
protected com.google.gwt.core.client.JavaScriptObject |
create()
|
java.lang.Boolean |
getAnimateTileChange()
If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop. |
java.lang.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. |
java.lang.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(com.google.gwt.core.client.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. |
java.lang.Boolean |
getPaddingAsLayoutMargin()
If this widget has padding specified (as this.padding or in the
CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin? |
Canvas |
getTile(int index)
Retrieve a tile by index. |
java.lang.Integer |
getTileHeight()
Height of each tile in pixels. |
java.lang.Integer |
getTileHMargin()
Horizontal margin in between tiles. |
int |
getTileMargin()
Margin in between tiles. |
int |
getTileSize()
Size of each tile in pixels. |
java.lang.Integer |
getTilesPerLine()
Number of tiles to show in each line. |
java.lang.Integer |
getTileVMargin()
Vertical margin in between tiles. |
java.lang.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(java.lang.String tileID)
Remove a tile from the layout. |
void |
setAnimateTileChange(java.lang.Boolean animateTileChange)
If set, tiles animate to their new positions when a tile is added, removed, or reordered via drag and drop. |
void |
setAutoWrapLines(java.lang.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(java.lang.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(com.google.gwt.core.client.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(java.lang.Boolean paddingAsLayoutMargin)
If this widget has padding specified (as this.padding or in the
CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin? |
void |
setTileHeight(java.lang.Integer tileHeight)
Height of each tile in pixels. |
void |
setTileHMargin(java.lang.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(java.lang.Integer tilesPerLine)
Number of tiles to show in each line. |
void |
setTileVMargin(java.lang.Integer tileVMargin)
Vertical margin in between tiles. |
void |
setTileWidth(java.lang.Integer tileWidth)
Width of each tile in pixels. |
| 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 |
|---|
public TileLayout()
public TileLayout(com.google.gwt.core.client.JavaScriptObject jsObj)
| Method Detail |
|---|
public static TileLayout getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)
setJavaScriptObject in class Canvasprotected com.google.gwt.core.client.JavaScriptObject create()
create in class Canvaspublic void setAnimateTileChange(java.lang.Boolean animateTileChange)
Note : This is an advanced setting
animateTileChange - animateTileChange Default value is trueAppearance overview and related methodspublic java.lang.Boolean getAnimateTileChange()
Appearance overview and related methods
public void setAutoWrapLines(java.lang.Boolean autoWrapLines)
throws java.lang.IllegalStateException
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.
autoWrapLines - autoWrapLines Default value is true
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getAutoWrapLines()
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.
public void setDragDataAction(DragDataAction dragDataAction)
dragDataAction - dragDataAction Default value is Canvas.MOVEpublic DragDataAction getDragDataAction()
public void setExpandMargins(java.lang.Boolean expandMargins)
throws java.lang.IllegalStateException
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.
expandMargins - expandMargins Default value is true
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getExpandMargins()
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.
public void setLayoutMargin(int layoutMargin)
throws java.lang.IllegalStateException
layoutMargin - layoutMargin Default value is 5
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic int getLayoutMargin()
public void setOrientation(Orientation orientation)
throws java.lang.IllegalStateException
TileLayoutPolicy.
orientation - orientation Default value is "horizontal"
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic Orientation getOrientation()
TileLayoutPolicy.
public void setOverflow(Overflow overflow)
throws java.lang.IllegalStateException
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.
setOverflow in class Canvasoverflow - overflow Default value is "auto"
java.lang.IllegalStateException - this property cannot be changed after the component has been createdSizing overview and related methodspublic Overflow getOverflow()
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.
getOverflow in class CanvasSizing overview and related methodspublic void setPaddingAsLayoutMargin(java.lang.Boolean paddingAsLayoutMargin)
this.padding or in the
CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin? If this setting is false, padding will not affect member positioning (as CSS padding normally does not affect absolutely positioned children). Leaving this setting true allows a designer to more effectively control layout purely from CSS.
Note that layoutMargin if specified, takes
precedence over this value.
Note : This is an advanced setting
paddingAsLayoutMargin - paddingAsLayoutMargin Default value is truepublic java.lang.Boolean getPaddingAsLayoutMargin()
this.padding or in the
CSS style applied to this layout), should it show up as space outside the members, similar to layoutMargin? If this setting is false, padding will not affect member positioning (as CSS padding normally does not affect absolutely positioned children). Leaving this setting true allows a designer to more effectively control layout purely from CSS.
Note that layoutMargin if specified, takes
precedence over this value.
public void setTileHeight(java.lang.Integer tileHeight)
throws java.lang.IllegalStateException
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.
tileHeight - height. Default value is null
java.lang.IllegalStateException - this property cannot be changed after the component has been createdSizing overview and related methodspublic java.lang.Integer getTileHeight()
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.
Sizing overview and related methods
public void setTileHMargin(java.lang.Integer tileHMargin)
throws java.lang.IllegalStateException
tileMargin.
tileHMargin - width. Default value is null
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Integer getTileHMargin()
tileMargin.
public void setTileMargin(int tileMargin)
throws java.lang.IllegalStateException
tileHMargin and tileVMargin.
tileMargin - margin. Default value is 10
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic int getTileMargin()
tileHMargin and tileVMargin.
public void setTileSize(int tileSize)
throws java.lang.IllegalStateException
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
tileSize - size. Default value is 50
java.lang.IllegalStateException - this property cannot be changed after the component has been createdSizing overview and related methodspublic int getTileSize()
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.
Sizing overview and related methodspublic void setTilesPerLine(java.lang.Integer tilesPerLine)
tileSize for some layout modes. See TileLayoutPolicy. This can also affect tileWidth or tileHeight. See those properties for details.
tilesPerLine - New tilesPerLine value. Default value is nullpublic java.lang.Integer getTilesPerLine()
tileSize for some layout modes. See TileLayoutPolicy. This can also affect tileWidth or tileHeight. See those properties for details.
public void setTileVMargin(java.lang.Integer tileVMargin)
throws java.lang.IllegalStateException
tileMargin.
tileVMargin - width. Default value is null
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Integer getTileVMargin()
tileMargin.
public void setTileWidth(java.lang.Integer tileWidth)
throws java.lang.IllegalStateException
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.
tileWidth - width. Default value is null
java.lang.IllegalStateException - this property cannot be changed after the component has been createdSizing overview and related methodspublic java.lang.Integer getTileWidth()
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.
Sizing overview and related methodspublic void addTile(Canvas tile)
tile - new tile to add
public void addTile(Canvas tile,
java.lang.Integer index)
tile - new tile to addindex - position where the tile should be added. Defaults to adding the tile at the end.public Canvas getTile(int index)
The TileLayout consistently uses this method to access tiles, in order to allow subclasses to create tiles on demand.
index - index of the tile
public static void setDefaultProperties(TileLayout tileLayoutProperties)
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.
tileLayoutProperties - properties that should be used as new defaults when instances of this class are created
public void setTiles(Canvas... tiles)
throws java.lang.IllegalStateException
tiles - tiles Default value is null
java.lang.IllegalStateException - this property cannot be changed after the component has been created
public void setLayoutPolicy(TileLayoutPolicy layoutPolicy)
throws java.lang.IllegalStateException
TileLayoutPolicy for options.
layoutPolicy - layoutPolicy Default value is ""
java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic boolean removeTile(int tileIndex)
tileIndex - index or String ID of the tile
public boolean removeTile(java.lang.String tileID)
tileID - index or String ID of the tile
public boolean removeTile(Canvas tile)
tile - index or String ID of the tile
public void layoutTiles()
public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.tile.TileLayoutLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure in interface LogicalStructuregetLogicalStructure in class Canvas
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||