Packagecom.kapit.diagram.ui
Classpublic class DrawLinkUI
InheritanceDrawLinkUI Inheritance flash.display.Shape
SubclassesDrawOrthogonalLinkUI



Public Properties
 PropertyDefined by
  curpoint : Point
[read-only] Curpoint property that defines the current selected point.
DrawLinkUI
  points : Array
[read-only] Points property that defines the control points array.
DrawLinkUI
Protected Properties
 PropertyDefined by
  _action : Action = null
Link action used in the link drawing process.
DrawLinkUI
  _arrowheight : Number = 6
[static] Link arrow height.
DrawLinkUI
  _arrowwidth : Number = 12
[static] Link arrow width.
DrawLinkUI
  _cssinitialized : Boolean
[static]
DrawLinkUI
  _curx : Number
Current cursor X coordinate.
DrawLinkUI
  _cury : Number
Current cursor Y coordinate.
DrawLinkUI
  _height : Number = 0
Link height.
DrawLinkUI
  _lastx : Number
Last control point X coordinate.
DrawLinkUI
  _lasty : Number
Last control point Y coordinate.
DrawLinkUI
  _linecolor : Number
[static] Line Color.
DrawLinkUI
  _lineopacity : Number
[static] Line Opacity.
DrawLinkUI
  _linewidth : Number
[static] Line Width.
DrawLinkUI
  _points : Array
Control points array that will be updated at drawing runtime to define the Diagram Link parameters.
DrawLinkUI
  _source : DiagramObject
DiagramObject from which the Link drawing process starts.
DrawLinkUI
  _stopped : Boolean = false
Link Drawig process status (True if link drawing process is stopped).
DrawLinkUI
  _styleselector : String = "null"
[static] Used Style Selector
DrawLinkUI
  styleselector : String
[static] Style Selector property that defines the used style selector (style properties) as a String representation.
DrawLinkUI
  _view : DiagramView
DiagramView to which this DawLinkUI depends.
DrawLinkUI
  _width : Number = 0
Link width.
DrawLinkUI
Public Methods
 MethodDefined by
  
Creates a DrawLinkUI instance given a DiagramView in which drawing process is performed and an link action(defining CSS styling, cursor, used style selectors...).
DrawLinkUI
  
clear():void
Clears the graphics that were drawn from this Graphics object.
DrawLinkUI
  
run(event:MouseEvent, dob:DiagramObject):void
Starts link drawing pocess from a Diagram Object by applying mouse listeners and defining link drawing status (first step, current point...).
DrawLinkUI
  
stop(event:MouseEvent):void
Aborts the link drawing process by removing mouse listeners and draw-link graphics and updates control points array.
DrawLinkUI
Protected Methods
 MethodDefined by
  
cssInitialize():Boolean
[static] Initialises SVG libraries (icons and graphics) and sets new style properties (CSS).
DrawLinkUI
  
draw():void
Draws this DrawLinkUI polylines while respecting control points position and style properties.
DrawLinkUI
  
drawPolyline(polyline:Array):void
DrawLinkUI
  
drawQuadrics(polyline:Array):void
DrawLinkUI
  
handleSeg(event:MouseEvent):void
Handles a link segment drawing given a mouse event (mouse release).
DrawLinkUI
  
mouseDownHandler(event:MouseEvent):void
Saves previous link segment drawing process (adding new control point) and starts a new link Segment drawing process after updating the control points array.
DrawLinkUI
  
mouseMoveHandler(event:MouseEvent):void
Starts a runtime link Segment drawing (drawing a link segment between two points by moving the mouse).
DrawLinkUI
  
[static] Changes the current used CSS style once an SVGAssetLibraryEvent is flagged.
DrawLinkUI
Property detail
_actionproperty
protected var _action:Action = null

Link action used in the link drawing process.

_arrowheightproperty 
protected static var _arrowheight:Number = 6

Link arrow height.

_arrowwidthproperty 
protected static var _arrowwidth:Number = 12

Link arrow width.

_cssinitializedproperty 
protected static var _cssinitialized:Boolean
curpointproperty 
curpoint:Point  [read-only]

Curpoint property that defines the current selected point.

Implementation
    public function get curpoint():Point
_curxproperty 
protected var _curx:Number

Current cursor X coordinate.

_curyproperty 
protected var _cury:Number

Current cursor Y coordinate.

_heightproperty 
protected var _height:Number = 0

Link height.

_lastxproperty 
protected var _lastx:Number

Last control point X coordinate.

_lastyproperty 
protected var _lasty:Number

Last control point Y coordinate.

_linecolorproperty 
protected static var _linecolor:Number

Line Color.

_lineopacityproperty 
protected static var _lineopacity:Number

Line Opacity.

_linewidthproperty 
protected static var _linewidth:Number

Line Width.

_pointsproperty 
protected var _points:Array

Control points array that will be updated at drawing runtime to define the Diagram Link parameters.

pointsproperty 
points:Array  [read-only]

Points property that defines the control points array.

Implementation
    public function get points():Array
_sourceproperty 
protected var _source:DiagramObject

DiagramObject from which the Link drawing process starts.

_stoppedproperty 
protected var _stopped:Boolean = false

Link Drawig process status (True if link drawing process is stopped).

_styleselectorproperty 
protected static var _styleselector:String = "null"

Used Style Selector

styleselectorproperty 
styleselector:String  [read-write]

Style Selector property that defines the used style selector (style properties) as a String representation.

Implementation
    protected static function get styleselector():String
    protected function set styleselector(value:String):void
_viewproperty 
protected var _view:DiagramView

DiagramView to which this DawLinkUI depends.

_widthproperty 
protected var _width:Number = 0

Link width.

Constructor detail
DrawLinkUI()constructor
public function DrawLinkUI(view:DiagramView, action:Action)

Creates a DrawLinkUI instance given a DiagramView in which drawing process is performed and an link action(defining CSS styling, cursor, used style selectors...).

Parameters
view:DiagramView — DiagramView in which drawing process is performed.
 
action:Action
Method detail
clear()method
public function clear():void

Clears the graphics that were drawn from this Graphics object.

cssInitialize()method 
protected static function cssInitialize():Boolean

Initialises SVG libraries (icons and graphics) and sets new style properties (CSS).

Returns
Boolean — CSS properties loading status (success/failure).
draw()method 
protected function draw():void

Draws this DrawLinkUI polylines while respecting control points position and style properties.

drawPolyline()method 
protected function drawPolyline(polyline:Array):voidParameters
polyline:Array
drawQuadrics()method 
protected function drawQuadrics(polyline:Array):voidParameters
polyline:Array
handleSeg()method 
protected function handleSeg(event:MouseEvent):void

Handles a link segment drawing given a mouse event (mouse release).

Parameters
event:MouseEvent
mouseDownHandler()method 
protected function mouseDownHandler(event:MouseEvent):void

Saves previous link segment drawing process (adding new control point) and starts a new link Segment drawing process after updating the control points array.

Parameters
event:MouseEvent — Detected Mouse Event (Mouse Down Event).
mouseMoveHandler()method 
protected function mouseMoveHandler(event:MouseEvent):void

Starts a runtime link Segment drawing (drawing a link segment between two points by moving the mouse).

Parameters
event:MouseEvent — Detected Mouse Event (Mouse Move Event).
run()method 
public function run(event:MouseEvent, dob:DiagramObject):void

Starts link drawing pocess from a Diagram Object by applying mouse listeners and defining link drawing status (first step, current point...).

Parameters
event:MouseEvent — Detected Mouse Event.
 
dob:DiagramObject
stop()method 
public function stop(event:MouseEvent):void

Aborts the link drawing process by removing mouse listeners and draw-link graphics and updates control points array.

Parameters
event:MouseEvent — Detected Mouse Event.
styleChanged()method 
protected static function styleChanged(event:SVGAssetLibraryEvent):void

Changes the current used CSS style once an SVGAssetLibraryEvent is flagged.

Parameters
event:SVGAssetLibraryEvent — SVGAssetLibraryEvent telling that new style poroperties were loaded.