| Package | com.jwopitz.containers |
| Class | public class TileCanvas |
| Inheritance | TileCanvas mx.containers.Canvas |
| Property | Defined by | ||
|---|---|---|---|
| columnGap : int
The amount of spacing between columns.
| TileCanvas | ||
| columns : int
The maximum number of columns allowed.
| TileCanvas | ||
| columnWidth : int
The width of the columns.
| TileCanvas | ||
| dataProvider : Object
The set of data to be viewed.
| TileCanvas | ||
| direction : String
Determines how children are placed in the container.
| TileCanvas | ||
| dragEnabled : Boolean
A flag that indicates whether you can drag items out of this control and drop them on other controls.
| TileCanvas | ||
| dragMoveEnabled : Boolean
A flag that indicates whether items can be moved instead of just copied from the control as part of a drag-and-drop operation.
| TileCanvas | ||
| dropEnabled : Boolean
A flag that indicates whether dragged items can be dropped onto the control.
| TileCanvas | ||
| enableAutoUpdate : Boolean = true
Flag indicating if the dataProvider will autoUpdate.
| TileCanvas | ||
| enableMoveOnRefresh : Boolean = true
Flag that determines if the animation effect takes place after the dataProvider refresh event is triggered.
| TileCanvas | ||
| enableRefreshOnMove : Boolean = true
Flag indicating if the dataProvider gets refreshed after a drag and drop operation.
| TileCanvas | ||
| itemAddOn : Function
Serves as a place to add extra functionality to the items generated from the itemRenderer.
| TileCanvas | ||
| itemRenderer : IFactory
The custom item renderer for the control.
| TileCanvas | ||
| itemSpawnPoint : Point
Registers the x and y coordinates where new instances created by the itemRenderer will originate from.
| TileCanvas | ||
| rowGap : int
The amount of spacing between rows.
| TileCanvas | ||
| rowHeight : int
The height of the rows.
| TileCanvas | ||
| rows : int
The maximum number of rows allowed.
| TileCanvas | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
| TileCanvas | ||
| Method | Defined by | ||
|---|---|---|---|
|
calculateItemPosition(columnIndex:int, rowIndex:int):Point
Called for every item in the dataProvider to retrieve the appropriate x and y coordinates to move to.
| TileCanvas | ||
|
defaultItemAddOn(value:Container):void
An empty placeholder method called on each new instance generated from the itemRenderer.
| TileCanvas | ||
|
getItemInstance():Container
A convenience method for creating new instances from the itemRenderer and initializing certain properties.
| TileCanvas | ||
|
getItemUnderMouse():Container
Retreives the item under the mouse.
| TileCanvas | ||
|
updateDataProviderItems():void
If
enableRefreshOnMove == true then a drag and drop operation will trigger a
reordering of the data in the dataProvider to reflect the data order in the list. | TileCanvas | ||
|
updateItemLocations():void
Iterates through each item in the dataProvider to determine its column and row index based on the its position within
the context of the maximum allowed columns or maximum allowed rows.
| TileCanvas | ||
|
updateRowsAndColumns():void
Updates the number of actual rows and columns based on the number of items in the dataProvider.
| TileCanvas | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| TileCanvas | ||||
| TileCanvas | ||||
| columnGap | property |
columnGap:int [read-write]The amount of spacing between columns.
Implementation public function get columnGap():int
public function set columnGap(value:int):void
| columns | property |
columns:int [read-write]
The maximum number of columns allowed. Once the number of items in the dataProvider exceeds the maxColumns per row,
it positions the items in excess in the next row. This is dependant of the value of direction.
This property can be used as the source for data binding.
Implementation public function get columns():int
public function set columns(value:int):void
| columnWidth | property |
columnWidth:int [read-write]The width of the columns. Each item in the dataProvider will be rendered to this width.
Implementation public function get columnWidth():int
public function set columnWidth(value:int):void
| dataProvider | property |
dataProvider:Object [read-write]The set of data to be viewed.
This property can be used as the source for data binding.
Implementation public function get dataProvider():Object
public function set dataProvider(value:Object):void
| direction | property |
direction:String [read-write]Determines how children are placed in the container.
This property can be used as the source for data binding.
Implementation public function get direction():String
public function set direction(value:String):void
| dragEnabled | property |
dragEnabled:Boolean [read-write]A flag that indicates whether you can drag items out of this control and drop them on other controls.
Implementation public function get dragEnabled():Boolean
public function set dragEnabled(value:Boolean):void
| dragMoveEnabled | property |
dragMoveEnabled:Boolean [read-write]A flag that indicates whether items can be moved instead of just copied from the control as part of a drag-and-drop operation.
Implementation public function get dragMoveEnabled():Boolean
public function set dragMoveEnabled(value:Boolean):void
| dropEnabled | property |
dropEnabled:Boolean [read-write]A flag that indicates whether dragged items can be dropped onto the control.
Implementation public function get dropEnabled():Boolean
public function set dropEnabled(value:Boolean):void
| enableAutoUpdate | property |
public var enableAutoUpdate:Boolean = trueFlag indicating if the dataProvider will autoUpdate.
| enableMoveOnRefresh | property |
public var enableMoveOnRefresh:Boolean = trueFlag that determines if the animation effect takes place after the dataProvider refresh event is triggered.
| enableRefreshOnMove | property |
public var enableRefreshOnMove:Boolean = trueFlag indicating if the dataProvider gets refreshed after a drag and drop operation.
| itemAddOn | property |
itemAddOn:Function [read-write]
Serves as a place to add extra functionality to the items generated from the itemRenderer.
For instance, it may be desired to have each item have a context menu on mouseEvents.
A custom addOn function would be used to achieve this.
The addOn function's signature is expected as function (value:Container):void
public function get itemAddOn():Function
public function set itemAddOn(value:Function):void
| itemRenderer | property |
itemRenderer:IFactory [read-write]The custom item renderer for the control.
Implementation public function get itemRenderer():IFactory
public function set itemRenderer(value:IFactory):void
| itemSpawnPoint | property |
public var itemSpawnPoint:PointRegisters the x and y coordinates where new instances created by the itemRenderer will originate from.
| rowGap | property |
rowGap:int [read-write]The amount of spacing between rows.
Implementation public function get rowGap():int
public function set rowGap(value:int):void
| rowHeight | property |
rowHeight:int [read-write]The height of the rows. Each item in the dataProvider will be rendered to this height.
Implementation public function get rowHeight():int
public function set rowHeight(value:int):void
| rows | property |
rows:int [read-write]
The maximum number of rows allowed. Once the number of items in the dataProvider exceeds the maxRows per column,
it positions the items in excess in the next column. This is dependant of the value of direction.
This property can be used as the source for data binding.
Implementation public function get rows():int
public function set rows(value:int):void
| TileCanvas | () | constructor |
public function TileCanvas()Constructor
| calculateItemPosition | () | method |
protected function calculateItemPosition(columnIndex:int, rowIndex:int):PointCalled for every item in the dataProvider to retrieve the appropriate x and y coordinates to move to.
ParameterscolumnIndex:int — The column position of the item.
|
|
rowIndex:int — The row position of the item.
|
Point — The actual x and y coordinates based on the columnIndex and rowIndex for the item.
|
| defaultItemAddOn | () | method |
protected function defaultItemAddOn(value:Container):voidAn empty placeholder method called on each new instance generated from the itemRenderer.
Parametersvalue:Container — The instance genereated from the itemRendere in which to add functionality.
|
| getItemInstance | () | method |
protected function getItemInstance():ContainerA convenience method for creating new instances from the itemRenderer and initializing certain properties.
ReturnsContainer — A new instance from the itemRenderer.
|
| getItemUnderMouse | () | method |
protected function getItemUnderMouse():ContainerRetreives the item under the mouse.
ReturnsContainer — The item under the mouse.
|
| updateDataProviderItems | () | method |
protected function updateDataProviderItems():void
If enableRefreshOnMove == true then a drag and drop operation will trigger a
reordering of the data in the dataProvider to reflect the data order in the list.
| updateItemLocations | () | method |
protected function updateItemLocations():voidIterates through each item in the dataProvider to determine its column and row index based on the its position within the context of the maximum allowed columns or maximum allowed rows.
See also
| updateRowsAndColumns | () | method |
protected function updateRowsAndColumns():voidUpdates the number of actual rows and columns based on the number of items in the dataProvider.
| columnsChange | event |
| rowsChange | event |