Package | twaver |
Class | public class Group |
Inheritance | Group ![]() ![]() ![]() ![]() ![]() |
Group is a very useful container element. You can use this to reorganize the data on the network to make it more clear and easy to understand.
Please note that group is different with SubNetwork
.
SubNetwork displays all children elements in a inside, lower
layer map but group not. Group and its children elements are
still in the same map and topology, just can expanded or closed
by group.
See also
Property | Defined By | ||
---|---|---|---|
![]() | agentLinks : ICollection [read-only]
Get all agential links of this node. | Node | |
![]() | alarmState : AlarmState [read-only]
Get alarm state object of this element. | Element | |
![]() | centerLocation : Point
Get the location of this node's center point. | Node | |
![]() | 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 | |
elementUIClass : Class [override] [read-only]
Get element ui class name. | Group | ||
expanded : Boolean
Check whether this group is in expanded status. | Group | ||
![]() | followers : ICollection [read-only]
Get all followers of this node with a collection. | Node | |
![]() | fromAgentLinks : ICollection [read-only]
Get all agential from/start links of this node with a collection. | Node | |
![]() | fromLinks : ICollection [read-only]
Get all links start from this node. | Node | |
![]() | hasChildren : Boolean [read-only]
Check whether this data has children objects. | Data | |
![]() | height : Number
Get node height value. | Node | |
![]() | host : Node
Get the host node of this follower. | Follower | |
![]() | icon : String
Get icon value for this data. | Data | |
![]() | id : Object [read-only]
Get the ID value of this data. | Data | |
![]() | image : String
Get image url of this node. | Node | |
![]() | layerID : Object
Get layer ID of this element. | Element | |
![]() | links : ICollection [read-only]
Get all connected links of this node with a collection. | Node | |
location : Point [override]
Set the location for this node. | Group | ||
![]() | loopedLinks : ICollection [read-only]
Get all looped links on this node with a collection. | Node | |
![]() | name : String
Get name of this data. | Data | |
![]() | parent : IData
Get parent data object. | Data | |
![]() | rect : Rectangle [read-only]
Get node bounds. | Node | |
![]() | size : Size [read-only]
Get node size. | Node | |
![]() | styleProperties : ICollection [read-only]
Get a ICollection that contians all style proerty name. | Element | |
![]() | toAgentLinks : ICollection [read-only]
Get all agential to/end links of this node with a collection. | Node | |
![]() | toLinks : ICollection [read-only]
Get all to/end links end to this node. | Node | |
![]() | toolTip : String
Get the tooltip text of this data. | Data | |
![]() | width : Number
Get node width. | Node | |
![]() | x : Number [read-only]
Get x location of this node. | Node | |
![]() | y : Number [read-only]
Get y location of this node. | Node |
Method | Defined By | ||
---|---|---|---|
Group(id:Object = null)
Constructor. | Group | ||
![]() |
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 [override]
inheritDoc
| Element | |
![]() | 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 [override]
Get an user defined property on this data. | Element | |
![]() | getStyle(styleProp:String, returnDefaultIfNull:Boolean = true):*
Get the specified style property value. | Element | |
![]() | hasAgentLinks():Boolean
Check whether this node has agential links. | Node | |
![]() | hasOwnProperty(name:String):Boolean
Whether this data has specified property. | Data | |
isAdjustedToBottom():Boolean [override]
Check whether this element has been adjusted to bottom. | Group | ||
![]() | isDescendantOf(data:IData):Boolean
Check whether this data is a descendant of the specified data object. | Data | |
![]() |
Check whether the specified node is my host or on
my host chain. | Follower | |
![]() | isLoopedHostOn(follower:Follower):Boolean
Check whether specified follower is on a looped host chain. | Follower | |
![]() | 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 | |
reverseExpanded():void
Reverse the expand status. | Group | ||
[override]
inheritDoc
| Group | ||
![]() | setCenterLocation(x:Number, y:Number):void
Set a new location for this node's center point. | Node | |
![]() |
Set client property for this data. | Data | |
![]() | setLocation(x:Number, y:Number):void
Set a new location for this node. | Node | |
![]() | setPropertyValue(property:String, value:Object):void [override]
Set an user defined property on this data. | Element | |
![]() | setSize(width:Number, height:Number):void
Set node size. | Node | |
![]() |
Set a style for this element. | Element | |
![]() | toChildren(matchFunction:Function = null):ICollection
Iterate children collection by given callback function. | Data | |
![]() | toString():String [override]
| Data | |
![]() | translate(dx:Number, dy:Number):void
Translate node location to specified offset. | Node | |
updateLocationFromChildren():void
Call this to update group location by all children. | Group |
Method | Defined By | ||
---|---|---|---|
![]() | deserializeClient(serializer:XMLSerializer, clientXML:XML, clientProp:String):void
Deserialize client property from given XML data. | Data | |
![]() | deserializeProperty(serializer:XMLSerializer, propertyXML:XML, property:String):void [override]
inheritDoc
| Element | |
![]() | deserializeStyle(serializer:XMLSerializer, styleXML:XML, styleProp:String):void
Deserialize style from given XML data. | Element | |
![]() | handleHostPropertyChange(e:PropertyChangeEvent):void
Called when host property is changed. | Follower | |
onChildAdded(child:IData, index:int):void [override]
Called back when a child is added. | Group | ||
onChildRemoved(child:IData, index:int):void [override]
Called back when a child is removed. | Group | ||
![]() | onChildrenCleared(children:Array):void
Called back when all children are cleared from this data. | Data | |
![]() | onClientChanged(styleProp:String, oldValue:*, newValue:*):void
Called when client property is changed. | Data | |
![]() |
Called when host node is changed. | Follower | |
![]() | [override]
Called back when data parent changed. | Node | |
![]() | onPropertyChanged(property:String, oldValue:Object, newValue:Object):void [override]
Called back when a property of this data is changed. | Node | |
![]() | onStyleChanged(styleProp:String, oldValue:*, newValue:*):void [override]
Called when style property is changed. | Follower | |
![]() |
Serialize given client property into the specified XML serializer. | Data | |
![]() |
Serialize given property into the specified
XML serializer. | Data | |
![]() |
Serialize specified property into XML. | Element | |
![]() | updateFollower(e:PropertyChangeEvent):void
Update follower after host property is changed
| Follower | |
![]() | updateFollowerImpl(e:PropertyChangeEvent):void
Core implementation of methd updateFollower
| Follower |
elementUIClass | property |
elementUIClass:Class
[read-only] [override] Get element ui class name. UI class is used to paint/draw element on network canvas. TWaver Flex will create UI object for the element instance by this returned class name.
public function get elementUIClass():Class
expanded | property |
expanded:Boolean
Check whether this group is in expanded status.
public function get expanded():Boolean
public function set expanded(value:Boolean):void
location | property |
location:Point
[override]
Set the location for this node. Node on network canvas
will be moved to the new location once this has been changed.
Please note that node location is the left-top point of this node.
Use setCenterLocation
if you want use the node center as
the location.
public function get location():Point
public function set location(value:Point):void
Group | () | Constructor |
public function Group(id:Object = null)
Constructor.
Parametersid:Object (default = null ) — the group id.
|
isAdjustedToBottom | () | method |
override public function isAdjustedToBottom():Boolean
Check whether this element has been adjusted to bottom.
ReturnsBoolean — true if has been adjusted to bottom, false otherwise.
|
onChildAdded | () | method |
override protected function onChildAdded(child:IData, index:int):void
Called back when a child is added. Subclasses can overwrite this method to do something.
Parameters
child:IData — the new added child data object
| |
index:int — the index of the new added child data object
|
onChildRemoved | () | method |
override protected function onChildRemoved(child:IData, index:int):void
Called back when a child is removed. Subclasses could overwrite this method to do something when a child is removed from this data.
Parameters
child:IData — the removed child data.
| |
index:int — the index of the removed child data.
|
reverseExpanded | () | method |
public function reverseExpanded():void
Reverse the expand status. If expanded, then close it; if closed, then expand it.
serializeXML | () | method |
override public function serializeXML(serializer:XMLSerializer, newInstance:IData):void
inheritDoc
Parameters
serializer:XMLSerializer | |
newInstance:IData |
updateLocationFromChildren | () | method |
public function updateLocationFromChildren():void
Call this to update group location by all children.