|
|||||||||
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 |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet, 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,
int 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. |
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
accomodate 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? |
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 |
setLayoutMargin(int layoutMargin)
A margin left around the outside of all tiles. |
void |
setLayoutPolicy(TileLayoutPolicy layoutPolicy)
Policy for laying out tiles. |
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
accomodate 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.google.gwt.user.client.ui.Widget |
---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, 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(JavaScriptObject jsObj)
Method Detail |
---|
public static TileLayout getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create
in class Canvas
public void setTileSize(int tileSize) throws 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
.
sets the height and width of tiles
tileSize
- size. Default value is 50
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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
.
public void setTileWidth(Integer tileWidth) throws 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
.
sets the width of tiles
tileWidth
- width. Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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
.
public void setTileHeight(Integer tileHeight) throws 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
.
sets the height of tiles
tileHeight
- height. Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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
.
public void setTileMargin(int tileMargin) throws IllegalStateException
tileHMargin
and tileVMargin
.
sets the vertical and horizontal margin of tiles
tileMargin
- margin. Default value is 10
IllegalStateException
- this property cannot be changed after the component has been createdpublic int getTileMargin()
tileHMargin
and tileVMargin
.
public void setTileHMargin(Integer tileHMargin) throws IllegalStateException
tileMargin
.
sets the horizontal margin of tiles
tileHMargin
- width. Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic Integer getTileHMargin()
tileMargin
.
public void setTileVMargin(Integer tileVMargin) throws IllegalStateException
tileMargin
.
sets the vertical margin of tiles
tileVMargin
- width. Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic Integer getTileVMargin()
tileMargin
.
public void setLayoutMargin(int layoutMargin) throws IllegalStateException
layoutMargin
- layoutMargin Default value is 5
IllegalStateException
- this property cannot be changed after the component has been createdpublic int getLayoutMargin()
public void setPaddingAsLayoutMargin(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
precidence over this value.
Note : This is an advanced setting
paddingAsLayoutMargin
- paddingAsLayoutMargin Default value is truepublic 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
precidence over this value.
public void setAnimateTileChange(Boolean animateTileChange)
Note : This is an advanced setting
animateTileChange
- animateTileChange Default value is truepublic Boolean getAnimateTileChange()
public void setOrientation(Orientation orientation) throws IllegalStateException
com.smartgwt.client..TileLayoutPolicy
.
orientation
- orientation Default value is "horizontal"
IllegalStateException
- this property cannot be changed after the component has been createdpublic Orientation getOrientation()
com.smartgwt.client..TileLayoutPolicy
.
public void setTilesPerLine(Integer tilesPerLine) throws IllegalStateException
tileSize
for some layout modes. See com.smartgwt.client..TileLayoutPolicy
. This can also affect tileWidth
or tileHeight
. See those properties for details.
tilesPerLine
- tilesPerLine Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic Integer getTilesPerLine()
tileSize
for some layout modes. See com.smartgwt.client..TileLayoutPolicy
. This can also affect tileWidth
or tileHeight
. See those properties for details.
public void setOverflow(Overflow overflow) throws 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
accomodate members.
setOverflow
in class Canvas
overflow
- overflow Default value is "visible"
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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
accomodate members.
getOverflow
in class Canvas
public void setExpandMargins(Boolean expandMargins) throws 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
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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 setAutoWrapLines(Boolean autoWrapLines) throws 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
IllegalStateException
- this property cannot be changed after the component has been createdpublic 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 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 void addTile(Canvas tile)
tile
- new tile to addpublic void addTile(Canvas tile, int index)
tile
- new tile to addindex
- position where the tile should be added. Defaults to adding the tile at the end.public void setTiles(Canvas... tiles) throws IllegalStateException
tiles
- tiles Default value is null
IllegalStateException
- this property cannot be changed after the component has been createdpublic void setLayoutPolicy(TileLayoutPolicy layoutPolicy) throws IllegalStateException
TileLayoutPolicy
for options.
layoutPolicy
- layoutPolicy Default value is ""
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(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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |