Package | twaver |
Class | public class Layer |
Inheritance | Layer ![]() ![]() |
Implements | ILayer |
Layer is an invisible container of element box. It manages contains elements and can be moved up and down. It can be visible or invisible, editable or not editable.
All layers are managed by LayerBox
which is
work for ElementBox
.
To know more information about this layer object, check
interface twaver.ILayer
for more details.
Property | Defined By | ||
---|---|---|---|
![]() | children : ICollection [read-only]
Get all children data objects of this data object. | Data | |
![]() | childrenCount : int [read-only]
Get all children total count for this data. | Data | |
![]() | clientProperties : ICollection [read-only]
Get a ICollection that contians all client proerty name. | Data | |
editable : Boolean
Check whether this layer is editable. | Layer | ||
![]() | hasChildren : Boolean [read-only]
Check whether this data has children objects. | Data | |
![]() | icon : String
Get icon value for this data. | Data | |
![]() | id : Object [read-only]
Get the ID value of this data. | Data | |
movable : Boolean
Check whether this layer is movable. | Layer | ||
![]() | name : String
Get name of this data. | Data | |
![]() | parent : IData
Get parent data object. | Data | |
![]() | toolTip : String
Get the tooltip text of this data. | Data | |
visible : Boolean
Whether this layer is visible in views. | Layer |
Method | Defined By | ||
---|---|---|---|
Layer(id:Object, name:String = null)
Constructor
| Layer | ||
![]() |
Add a child data object for this data. | Data | |
![]() | addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a property change listener to this data to monitoring property
change event. | Data | |
![]() | clearChildren():Boolean
Clear all children from this data. | Data | |
![]() | deserializeXML(serializer:XMLSerializer, xml:XML):void
Deserialize given XML data to data objects. | Data | |
![]() | dispatchPropertyChangeEvent(property:String, oldValue:Object, newValue:Object):Boolean
Dispatch property change event to all installed listeners. | Data | |
![]() | getChildAt(index:int):IData
Get child as specified index location. | Data | |
![]() | getClient(clientProp:String):*
Get specified client property value. | Data | |
![]() | getPropertyValue(property:String):Object
Get specified property value from this data. | Data | |
![]() | hasOwnProperty(name:String):Boolean
Whether this data has specified property. | Data | |
![]() | isDescendantOf(data:IData):Boolean
Check whether this data is a descendant of the specified data object. | Data | |
![]() | isParentOf(data:IData):Boolean
Check whether this data is the parent of specified data. | Data | |
![]() | isRelatedTo(data:IData):Boolean
Check whether this data has descendant relationship with the specified data. | Data | |
![]() | removeChild(child:IData):Boolean
Remove the specified child object. | Data | |
![]() | removePropertyChangeListener(listener:Function):void
Remove the specified property change listener. | Data | |
![]() |
Serialize this data object into XML. | Data | |
![]() |
Set client property for this data. | Data | |
![]() | setPropertyValue(property:String, value:Object):void
Set specified property name value on this data. | Data | |
![]() | toChildren(matchFunction:Function = null):ICollection
Iterate children collection by given callback function. | Data | |
![]() | toString():String [override]
| Data |
editable | property |
editable:Boolean
Check whether this layer is editable. If true, all elements inside this layer will be editable.
public function get editable():Boolean
public function set editable(value:Boolean):void
movable | property |
movable:Boolean
Check whether this layer is movable. If true, layer is able to be moved up or down in layer box.
public function get movable():Boolean
public function set movable(value:Boolean):void
visible | property |
visible:Boolean
Whether this layer is visible in views. If visible, all elements contained are visible. Otherwise, all elements in this layer will invisible.
public function get visible():Boolean
public function set visible(value:Boolean):void
Layer | () | Constructor |
public function Layer(id:Object, name:String = null)
Constructor
Parametersid:Object — the layer id used to indicate this layer.
This should be unique value in one layer box.
| |
name:String (default = null ) — layer name. A simple string text that can be
any value.
|