Package | twaver |
Class | public class LayerBox |
Inheritance | LayerBox ![]() ![]() |
A special layer is pre-created in this layer box. Any element
without layer id specified are located in this this default layer.
use defaultLayer
to visit the default layer.
Remove a layer will not cause all contained element removed from element box.
Layer box must work with an element box. Specify the element
box in layer box constructor to connect them. However you don't
need to create layer box normally, because element box will create
a layer box internally and automatically. Visit layer box of an
element box by layerBox
.
See also
Property | Defined By | ||
---|---|---|---|
![]() | clientProperties : ICollection [read-only]
Get a ICollection that contians all client proerty name. | DataBox | |
![]() | count : int [read-only]
Get total data counts contains in this data box. | DataBox | |
![]() | datas : ICollection [read-only]
Get collection of all data inside the data box. | DataBox | |
defaultLayer : ILayer [read-only]
Get the default layer object. | LayerBox | ||
elementBox : ElementBox [read-only]
Get connected element box. | LayerBox | ||
![]() | icon : String
Get icon value for this data. | DataBox | |
![]() | limit : int
Get the limit for this data box. | DataBox | |
![]() | name : String
Get name of this data. | DataBox | |
![]() | roots : ICollection [read-only]
Get all root data objects in this data box. | DataBox | |
![]() | selectionModel : SelectionModel [read-only]
Get selection model of this data box. | DataBox | |
![]() | toolTip : String
Get the tooltip text of this data. | DataBox |
Method | Defined By | ||
---|---|---|---|
LayerBox(elementBox:ElementBox)
Create layer box and connect it to the specified element box. | LayerBox | ||
[override]
Add a data into this data box at the specified index location. | LayerBox | ||
![]() | addDataBoxChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a data box change listener into this data box to monitoring
the property change event. | DataBox | |
![]() | addDataPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add data property change listener to this data box. | DataBox | |
![]() | addHierarchyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a data hierarchical change listener on this data box. | DataBox | |
![]() | addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add property change listener into this data box. | DataBox | |
clear():void [override]
Clear all data objects. | LayerBox | ||
![]() |
Check whether contains specified data object in this data box. | DataBox | |
![]() | containsByID(id:Object):Boolean
Check whether contains data object with specified ID value. | DataBox | |
![]() | deserializeXML(serializer:XMLSerializer, xml:XML):void
Deserialize given XML data to data objects. | DataBox | |
![]() | dispatchPropertyChangeEvent(property:String, oldValue:Object, newValue:Object):Boolean
Dispatch property change event to all installed property change listeners. | DataBox | |
![]() | forEach(callbackFunction:Function):void
Iterate all data inside this data box with the specified
call back function. | DataBox | |
![]() | forEachByBreadthFirst(callbackFunction:Function, data:IData = null):void
Iterate all inside data in "breadth-first" rule. | DataBox | |
![]() | forEachByDepthFirst(callbackFunction:Function, data:IData = null):void
Iterate all inside data in "depth-first" rule. | DataBox | |
![]() | getClient(clientProp:String):*
Get specified client property value. | DataBox | |
![]() | getDataByID(id:Object):IData
Get data object by specified data ID. | DataBox | |
Get the layer contains specified element. | LayerBox | ||
getLayerByID(layerID:Object):ILayer
Get layer by layer ID. | LayerBox | ||
![]() | getPropertyValue(property:String):Object
Get specified property value from this data. | DataBox | |
![]() | getSiblingIndex(data:IData):int
Get the index of the specified data in all siblings. | DataBox | |
![]() |
Get sibling data collection for specified data instance. | DataBox | |
![]() | hasOwnProperty(name:String):Boolean
Whether this data has specified property. | DataBox | |
![]() | isEmpty():Boolean
Whether this data box is empty (no data). | DataBox | |
![]() |
Move specified data on index lower. | DataBox | |
![]() | moveSelectionDown(sm:SelectionModel = null):void
Move all selected data to lower index location. | DataBox | |
![]() | moveSelectionToBottom(sm:SelectionModel = null):void
Move all selected data to the bottom index location. | DataBox | |
![]() | moveSelectionToTop(sm:SelectionModel = null):void
Move all selected data to the top index location. | DataBox | |
![]() | moveSelectionUp(sm:SelectionModel = null):void
Move all selected data to upper index location. | DataBox | |
![]() |
Move the specified data to the specified index location. | DataBox | |
![]() | moveToBottom(data:IData):void
Move specified data to the bottom index location. | DataBox | |
![]() |
Move specified data to the top index location. | DataBox | |
![]() |
Move specified data one index upper. | DataBox | |
![]() |
Remove specified data from this data box. | DataBox | |
removeByID(id:Object):void [override]
Remove data by data ID. | LayerBox | ||
![]() | removeDataBoxChangeListener(listener:Function):void
Remove data box change listener from this data box. | DataBox | |
![]() | removeDataPropertyChangeListener(listener:Function):void
Remove specified data property change listener. | DataBox | |
![]() | removeFirst(count:int = 1):void
Remove the first specified count data objects from this data box. | DataBox | |
![]() | removeHierarchyChangeListener(listener:Function):void
Remove the specified hierarchical change listener from this data box. | DataBox | |
![]() | removePropertyChangeListener(listener:Function):void
Remove property change listener from this data box. | DataBox | |
![]() | removeSelection():void
Remove all selected data from this data box. | DataBox | |
![]() |
Serialize all data contains in this data box into XML. | DataBox | |
![]() |
Set client property for this data. | DataBox | |
![]() | setPropertyValue(property:String, value:Object):void
Set specified property name value on this data. | DataBox | |
![]() | toDatas(matchFunction:Function = null):ICollection
Create a new collection, put all data inside this collection,
and return this collection. | DataBox | |
![]() | toString():String [override]
| DataBox |
defaultLayer | property |
defaultLayer:ILayer
[read-only] Get the default layer object. Default layer contains all elements without layer id specified.
public function get defaultLayer():ILayer
elementBox | property |
elementBox:ElementBox
[read-only] Get connected element box.
public function get elementBox():ElementBox
LayerBox | () | Constructor |
public function LayerBox(elementBox:ElementBox)
Create layer box and connect it to the specified element box. This created layer box will work for this element box. It will manages all layers for this element box.
ParameterselementBox:ElementBox — the element box this layer box works for.
|
add | () | method |
override public function add(data:IData, index:int = -1):void
Add a data into this data box at the specified index location.
Parameters
data:IData — the data object to be added
| |
index:int (default = -1 ) — the index location need to add
|
clear | () | method |
override public function clear():void
Clear all data objects. This will remove all data from this data box.
getLayerByElement | () | method |
public function getLayerByElement(element:IElement):ILayer
Get the layer contains specified element.
Parameters
element:IElement — the element to check
|
ILayer — the layer contains specified element.
|
getLayerByID | () | method |
public function getLayerByID(layerID:Object):ILayer
Get layer by layer ID.
Parameters
layerID:Object — a layer id
|
ILayer — the layer with specified id value.
|
removeByID | () | method |
override public function removeByID(id:Object):void
Remove data by data ID.
Parameters
id:Object — the data ID that need to remove
|