Packagetwaver.network.ui
Classpublic class EditAttachment
InheritanceEditAttachment Inheritance Attachment Inheritance mx.core.UIComponent

This attachment displays some indicators on element ui to indicate current element is editable. For example, a resizable node will shows small rectangles in the element corners to indicate user could resize the element by drag- and-drop mouse. Shape link or shape node will display small balls on each control points on the path of the link so you can drag the ball to move the path control points.



Public Properties
 PropertyDefined By
 InheritedattachmentSprite : Sprite
Attachment
 InheritedattachmentSpriteTransform : Transform
Attachment
 Inheritedbounds : Rectangle
[read-only] Get attachment bounds.
Attachment
 Inheritedelement : IElement
[read-only] Get element ui related element object.
Attachment
 InheritedelementUI : ElementUI
[read-only] Get connected element ui.
Attachment
 Inheritednetwork : Network
[read-only] Get network component this attachment display on.
Attachment
 InheritedshowInAttachmentCanvas : Boolean
[read-only] Get value whether show this attachment a the separate attachment canvas in network.
Attachment
Public Methods
 MethodDefined By
  
EditAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false)
Create edit attachment for specified element ui.
EditAttachment
 Inherited
dispose():void
Call this to dispose all resources used by this attachment.
Attachment
  
draw(graphics:Graphics):void
[override] Draw attachment content.
EditAttachment
 Inherited
setMatrix(matrix:Matrix):void
Set attachment transform matrix.
Attachment
 Inherited
Update attachment transparency.
Attachment
 Inherited
Update element attachment properties.
Attachment
Protected Methods
 MethodDefined By
 Inherited
Create filters.
Attachment
  
drawEditPoints(graphics:Graphics, points:ICollection):void
Draw edit indicator points.
EditAttachment
  
drawLinkControlPoint(graphics:Graphics, linkUI:LinkUI):void
Draw path control points for a link.
EditAttachment
  
drawResizingPoint(graphics:Graphics, node:Node):void
Draw resizing point indicators.
EditAttachment
  
drawShapeLinkPoints(graphics:Graphics, shapeLinkUI:ShapeLinkUI):void
Draw the path control points for shape link.
EditAttachment
  
drawShapeNodePoint(graphics:Graphics, shapeNode:ShapeNode):void
Draw the path control points for shape node.
EditAttachment
 Inherited
measure():void
[override]
Attachment
Constructor Detail
EditAttachment()Constructor
public function EditAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false)

Create edit attachment for specified element ui.

Parameters
elementUI:ElementUI — the element ui this attachment will displayed on.
 
showInAttachmentCanvas:Boolean (default = false) — whether show this attachment a the separate attachment canvas in network. See class Network to know more about the network internal canvas hierarchy. Because attachment canvas is in front of other canvas, so this attachment will not covered by other element body if set this value to true. Default value here is false.
Method Detail
draw()method
override public function draw(graphics:Graphics):void

Draw attachment content. Subclass should overwrite this function to draw own attachment content.

Parameters

graphics:Graphics — the graphics attachment will draw on.

drawEditPoints()method 
protected function drawEditPoints(graphics:Graphics, points:ICollection):void

Draw edit indicator points.

Parameters

graphics:Graphics — graphics to draw
 
points:ICollection — the edit indicator points need to draw

drawLinkControlPoint()method 
protected function drawLinkControlPoint(graphics:Graphics, linkUI:LinkUI):void

Draw path control points for a link.

Parameters

graphics:Graphics — graphics to draw
 
linkUI:LinkUI — the link ui

drawResizingPoint()method 
protected function drawResizingPoint(graphics:Graphics, node:Node):void

Draw resizing point indicators.

Parameters

graphics:Graphics — graphics draw on
 
node:Node — the node element to be resized.

drawShapeLinkPoints()method 
protected function drawShapeLinkPoints(graphics:Graphics, shapeLinkUI:ShapeLinkUI):void

Draw the path control points for shape link.

Parameters

graphics:Graphics — graphics to draw
 
shapeLinkUI:ShapeLinkUI — shape link ui

drawShapeNodePoint()method 
protected function drawShapeNodePoint(graphics:Graphics, shapeNode:ShapeNode):void

Draw the path control points for shape node.

Parameters

graphics:Graphics — graphics to draw
 
shapeNode:ShapeNode — shape node ui