Packagetwaver
Classpublic class ShapeLink
InheritanceShapeLink Inheritance Link Inheritance Element Inheritance Data Inheritance flash.events.EventDispatcher

This element defines a special link with any shape or path. Use element to create links with customized complex path. Shape link contains a set of points as the trace point of link path. Add, remove or move these points to change the link path.



Public Properties
 PropertyDefined By
 InheritedalarmState : AlarmState
[read-only] Get alarm state object of this element.
Element
 InheritedbundleCount : int
[read-only]
Link
 InheritedbundleIndex : int
[read-only]
Link
 InheritedbundleLinks : BundleLinks
[read-only] Get link bundle information.
Link
 Inheritedchildren : ICollection
[read-only] Get all children data objects of this data object.
Data
 InheritedchildrenCount : int
[read-only] Get all children total count for this data.
Data
 InheritedclientProperties : ICollection
[read-only] Get a ICollection that contians all client proerty name.
Data
  elementUIClass : Class
[override] [read-only] Get element ui class name.
ShapeLink
 InheritedfromAgent : Node
[read-only] Get from/start agent.
Link
 InheritedfromNode : Node
Get the start/from node of this link.
Link
 InheritedhasChildren : Boolean
[read-only] Check whether this data has children objects.
Data
 Inheritedicon : String
Get icon value for this data.
Data
 Inheritedid : Object
[read-only] Get the ID value of this data.
Data
 InheritedlayerID : Object
Get layer ID of this element.
Element
 Inheritedname : String
Get name of this data.
Data
 Inheritedparent : IData
Get parent data object.
Data
  points : ICollection
Get all trace points of this shape link with a collection.
ShapeLink
 InheritedstyleProperties : ICollection
[read-only] Get a ICollection that contians all style proerty name.
Element
 InheritedtoAgent : Node
[read-only] Get end/to agent.
Link
 InheritedtoNode : Node
Get end/to node of this link.
Link
 InheritedtoolTip : String
Get the tooltip text of this data.
Data
Public Methods
 MethodDefined By
  
ShapeLink(id:Object = null, fromNode:Node = null, toNode:Node = null)
Create a shape link by specified ID, from node and to node.
ShapeLink
 Inherited
addChild(child:IData, index:int = -1):Boolean
Add a child data object for this data.
Data
  
addPoint(point:Point):void
Add a new trace point for this shape link.
ShapeLink
  
addPointAt(point:Point, index:int):void
Add a new trace point at specified location for this shape link.
ShapeLink
 Inherited
addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a property change listener to this data to monitoring property change event.
Data
  
Call this method to adjust the whole link path/shape in orthogonal style.
ShapeLink
 Inherited
clearChildren():Boolean
Clear all children from this data.
Data
 Inherited
deserializeXML(serializer:XMLSerializer, xml:XML):void
[override] inheritDoc
Element
  
Dispatch trace point changed event to all installed listeners.
ShapeLink
 Inherited
dispatchPropertyChangeEvent(property:String, oldValue:Object, newValue:Object):Boolean
Dispatch property change event to all installed listeners.
Data
 Inherited
getChildAt(index:int):IData
Get child as specified index location.
Data
 Inherited
getClient(clientProp:String):*
Get specified client property value.
Data
 Inherited
getPropertyValue(property:String):Object
[override] Get an user defined property on this data.
Element
 Inherited
getStyle(styleProp:String, returnDefaultIfNull:Boolean = true):*
Get the specified style property value.
Element
 Inherited
hasOwnProperty(name:String):Boolean
Whether this data has specified property.
Data
 Inherited
Check whether this element has been adjusted to bottom.
Element
 Inherited
isBundleAgent():Boolean
Link
 Inherited
isDescendantOf(data:IData):Boolean
Check whether this data is a descendant of the specified data object.
Data
 Inherited
isLooped():Boolean
Chech whether this link is looped.
Link
 Inherited
isParentOf(data:IData):Boolean
Check whether this data is the parent of specified data.
Data
 Inherited
isRelatedTo(data:IData):Boolean
Check whether this data has descendant relationship with the specified data.
Data
 Inherited
removeChild(child:IData):Boolean
Remove the specified child object.
Data
  
removePoint(point:Point):void
Remove a trace point from this shape link.
ShapeLink
  
removePointAt(index:int):void
Remove trace point as specified location.
ShapeLink
 Inherited
removePropertyChangeListener(listener:Function):void
Remove the specified property change listener.
Data
 Inherited
Link
 Inherited
Link
  
serializeXML(serializer:XMLSerializer, newInstance:IData):void
[override]
ShapeLink
 Inherited
setClient(clientProp:String, newValue:*):IClient
Set client property for this data.
Data
  
setPointAt(point:Point, index:int):void
Update the trace point of specified location with specified new point.
ShapeLink
 Inherited
setPropertyValue(property:String, value:Object):void
[override] Set an user defined property on this data.
Element
 Inherited
setStyle(styleProp:String, newValue:*):IStyle
Set a style for this element.
Element
 Inherited
toChildren(matchFunction:Function = null):ICollection
Iterate children collection by given callback function.
Data
 Inherited
toString():String
[override]
Data
Protected Methods
 MethodDefined By
 Inherited
deserializeClient(serializer:XMLSerializer, clientXML:XML, clientProp:String):void
Deserialize client property from given XML data.
Data
 Inherited
deserializeProperty(serializer:XMLSerializer, propertyXML:XML, property:String):void
[override] inheritDoc
Element
 Inherited
deserializeStyle(serializer:XMLSerializer, styleXML:XML, styleProp:String):void
Deserialize style from given XML data.
Element
 Inherited
onChildAdded(child:IData, index:int):void
Called back when a child is added.
Data
 Inherited
onChildRemoved(child:IData, index:int):void
Called back when a child is removed.
Data
 Inherited
onChildrenCleared(children:Array):void
Called back when all children are cleared from this data.
Data
 Inherited
onClientChanged(styleProp:String, oldValue:*, newValue:*):void
Called when client property is changed.
Data
 Inherited
onParentChanged(oldParent:IData, newParent:IData):void
Called back when data parent changed.
Data
 Inherited
onPropertyChanged(property:String, oldValue:Object, newValue:Object):void
Called back when a property of this data is changed.
Data
 Inherited
onStyleChanged(styleProp:String, oldValue:*, newValue:*):void
[override]
Link
 Inherited
serializeClient(serializer:XMLSerializer, clientPrope:String, newInstance:IData):void
Serialize given client property into the specified XML serializer.
Data
 Inherited
serializeProperty(serializer:XMLSerializer, property:String, newInstance:IData):void
Serialize given property into the specified XML serializer.
Data
 Inherited
serializeStyle(serializer:XMLSerializer, stylePrope:String, newInstance:IData):void
Serialize specified property into XML.
Element
Property Detail
elementUIClassproperty
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.


Implementation
    public function get elementUIClass():Class
pointsproperty 
points:ICollection

Get all trace points of this shape link with a collection.


Implementation
    public function get points():ICollection
    public function set points(value:ICollection):void
Constructor Detail
ShapeLink()Constructor
public function ShapeLink(id:Object = null, fromNode:Node = null, toNode:Node = null)

Create a shape link by specified ID, from node and to node.

Parameters
id:Object (default = null) — the element ID.
 
fromNode:Node (default = null) — from node of this link.
 
toNode:Node (default = null) — to node of this link
Method Detail
addPoint()method
public function addPoint(point:Point):void

Add a new trace point for this shape link.

Parameters

point:Point — add a new trace point for this shape link.

addPointAt()method 
public function addPointAt(point:Point, index:int):void

Add a new trace point at specified location for this shape link. Use this method to insert a new trace point.

Parameters

point:Point — the point need to be added.
 
index:int — the index location this point will be added.

adjustToOrthogonal()method 
public function adjustToOrthogonal():void

Call this method to adjust the whole link path/shape in orthogonal style. This will add more trace points to make sure the path looks orthogonal.

dispatchPointsChangeEvent()method 
public function dispatchPointsChangeEvent():void

Dispatch trace point changed event to all installed listeners.

removePoint()method 
public function removePoint(point:Point):void

Remove a trace point from this shape link.

Parameters

point:Point — the point to be removed.

removePointAt()method 
public function removePointAt(index:int):void

Remove trace point as specified location.

Parameters

index:int — the trace point that need to be removed.

serializeXML()method 
override public function serializeXML(serializer:XMLSerializer, newInstance:IData):void

Parameters

serializer:XMLSerializer
 
newInstance:IData

setPointAt()method 
public function setPointAt(point:Point, index:int):void

Update the trace point of specified location with specified new point.

Parameters

point:Point — the new point updated with.
 
index:int — the trace point location.