| Package | com.kapit.diagram.ui |
| Class | public class DiagramLinkUI |
| Inheritance | DiagramLinkUI DiagramObjectUI mx.core.UIComponent |
| Implements | IDiagramObjectUI |
| Subclasses | DiagramLinkOrthogonalUI |
| Property | Defined by | ||
|---|---|---|---|
![]() | _activated : Boolean = false
Activation status of the DiagramObjectUI.
| DiagramObjectUI | |
| _annotatebutton : AnnotateButton = null | DiagramLinkUI | ||
| _cssinitialized : Boolean [static]
| DiagramLinkUI | ||
| _curpointidx : int = -1
Current point index.
| DiagramLinkUI | ||
| _curuihandler : Function = null
Used UI Handler (dependant to cursor selection).
| DiagramLinkUI | ||
| _dlink : DiagramLink = null
Diagram Link to which this DiagramLinkUI is linked.
| DiagramLinkUI | ||
| _knobfill : Number [static]
Knob fill style property (color number).
| DiagramLinkUI | ||
| _knobfillopacity : Number [static]
Knob fill opacity style property (color number).
| DiagramLinkUI | ||
| _knoblinecolor : Number [static]
Knob line color style property (color number).
| DiagramLinkUI | ||
| _knoblineopacity : Number [static]
Knob line opacity style property (percentage number).
| DiagramLinkUI | ||
| _knoblinewidth : Number [static]
Knob line width style property.
| DiagramLinkUI | ||
| _selectedstyleselector : String = "null" [static]
Selected style selector String representation.
| DiagramLinkUI | ||
| selectedstyleselector : String [static]
The selected style selector.
| DiagramLinkUI | ||
| _selidx : int = -1
Selected point index.
| DiagramLinkUI | ||
| _selknobfill : Number [static]
Selected Knob fill style property (color number).
| DiagramLinkUI | ||
| _selknobfillopacity : Number [static]
Selected Knob fill opacity style property (color number).
| DiagramLinkUI | ||
| _selknoblinecolor : Number [static]
Selected Knob line color style property (color number).
| DiagramLinkUI | ||
| _selknoblineopacity : Number [static]
Selected Knob line opacity style property (percentage number).
| DiagramLinkUI | ||
| _selknoblinewidth : Number [static]
Selected Knob line width style property.
| DiagramLinkUI | ||
![]() | _source : DiagramObject = null
The Diagram Object to which this DiagramObjectUI is linked.
| DiagramObjectUI | |
| _styleselector : String = "null" [static]
"Not Selected Knob" style selector String representation.
| DiagramLinkUI | ||
| styleselector : String [static]
The style sector used in this DiagramLinkUI.
| DiagramLinkUI | ||
| Method | Defined by | ||
|---|---|---|---|
|
DiagramLinkUI(dlink:DiagramLink)
Creates a DiagramLinkUI instance given a DiagramLink to which it is linked (defining CSS styling, cursor, used style selectors...).
| DiagramLinkUI | ||
![]() |
activate(a:Boolean):void
Activates or deactivates this DiagramObjectUI by adding or removing action and mouse listeners to the source Diagram Object View.
| DiagramObjectUI | |
|
clear():void
| DiagramLinkUI | ||
|
clearSelection():void
Clears selection by updating the selection index (no selection).
| DiagramLinkUI | ||
|
draw():void
Draws this DiagramLinkUI elements respecting the control points and line styling.
| DiagramLinkUI | ||
|
execute(k:int, event:MouseEvent = null):void
Executes a link modification/transformation (inserting and moving knobs (articulations) and anchors) operation given a mouse event and an index telling
selected point, link modification type and required UI handlers.
| DiagramLinkUI | ||
|
fitToObject(dlink:DiagramObject = null):void
Updates this DiagramLinkUI position in order to fit its container or its correspondant DiagramLink.
| DiagramLinkUI | ||
|
hitTest(m:Point):int
Determines the Diagram hit type given a point (cursor hit position) meaning determining what the cursor hits.
| DiagramLinkUI | ||
![]() |
libraryStylesChanged(event:SVGAssetLibraryEvent):void
Redraws this DiagramObjectUI and its children when library styles and assets change given a SVGAssetLibraryEvent.
| DiagramObjectUI | |
![]() |
unlink():void
Unlinks and removes the Diagram Object UI from its parent (usually used when deleting Diagram Objects).
| DiagramObjectUI | |
![]() |
update():void
| DiagramObjectUI | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
actionRunningHandler(event:ActionsManagerEvent):void
Defining Diagram Object UI behaviour and children status while a given action is running (after detecting an ActionManagerEvent).
| DiagramObjectUI | |
![]() |
actionStoppedHandler(event:ActionsManagerEvent):void
Defining Diagram Object UI behaviour and children status when a given action stops running (after detecting an ActionManagerEvent).
| DiagramObjectUI | |
|
annotateHandler(event:MouseEvent):void
| DiagramLinkUI | ||
| DiagramLinkUI | |||
|
createChildren():void
| DiagramLinkUI | ||
|
cssInitialize():Boolean
[static]
Initialises SVG libraries (icons and graphics) and sets new style properties (CSS).
| DiagramLinkUI | ||
|
insertKnobs(event:MouseEvent):void
Inserts new knobs in this Diagram link UI for more user customization abilities and easier manipulation.
| DiagramLinkUI | ||
|
keyUpHandler(event:KeyboardEvent):void
| DiagramLinkUI | ||
|
knobHandler(event:MouseEvent):void
Handles any knob (except knob linked to source or target Diagram UIs) manipulation
and updates user modifications in the correspondant DiagramLink (knob position update in the diagram drawing).
| DiagramLinkUI | ||
![]() |
mouseDownHandler(event:MouseEvent):void
Detects a mouse down event and executes a defined action set in the execute method according to
hitTest
result. | DiagramObjectUI | |
|
mouseMoveHandler(event:MouseEvent):void
Applies link modification/transformation operations while moving the cursor according to selected UI handler (defined by the
execute method). | DiagramLinkUI | ||
|
mouseUpHandler(event:MouseEvent):void
Finalizes the link modification or transformation operation after a mouse up event and removes all listeners.
| DiagramLinkUI | ||
|
showAnnotateButton():void
| DiagramLinkUI | ||
|
sourceAnchorHandler(event:MouseEvent):void
Handles source anchor manipulation
and updates user modifications in the correspondant DiagramLink (master anchor point update).
| DiagramLinkUI | ||
|
styleChanged(event:SVGAssetLibraryEvent):void
[static]
Changes the currently used CSS style when an SVGAssetLibraryEvent is triggered.
| DiagramLinkUI | ||
|
targetAnchorHandler(event:MouseEvent):void
Handles target anchor (linked to a target Diagram UI) manipulation
and updates user modifications in the correspondant DiagramLink (target anchors updates).
| DiagramLinkUI | ||
| Constant | Defined by | ||
|---|---|---|---|
| KNOBSIZE : Number = 8 [static]
Square side of the Knob.
| DiagramLinkUI | ||
| _annotatebutton | property |
protected var _annotatebutton:AnnotateButton = null
| _cssinitialized | property |
protected static var _cssinitialized:Boolean
| _curpointidx | property |
protected var _curpointidx:int = -1Current point index.
| _curuihandler | property |
protected var _curuihandler:Function = nullUsed UI Handler (dependant to cursor selection).
| _dlink | property |
protected var _dlink:DiagramLink = nullDiagram Link to which this DiagramLinkUI is linked.
| _knobfill | property |
protected static var _knobfill:NumberKnob fill style property (color number).
| _knobfillopacity | property |
protected static var _knobfillopacity:NumberKnob fill opacity style property (color number).
| _knoblinecolor | property |
protected static var _knoblinecolor:NumberKnob line color style property (color number).
| _knoblineopacity | property |
protected static var _knoblineopacity:NumberKnob line opacity style property (percentage number).
| _knoblinewidth | property |
protected static var _knoblinewidth:NumberKnob line width style property.
| _selectedstyleselector | property |
protected static var _selectedstyleselector:String = "null"Selected style selector String representation.
| selectedstyleselector | property |
selectedstyleselector:String [read-write]The selected style selector.
Implementation protected static function get selectedstyleselector():String
protected function set selectedstyleselector(value:String):void
| _selidx | property |
protected var _selidx:int = -1Selected point index.
| _selknobfill | property |
protected static var _selknobfill:NumberSelected Knob fill style property (color number).
| _selknobfillopacity | property |
protected static var _selknobfillopacity:NumberSelected Knob fill opacity style property (color number).
| _selknoblinecolor | property |
protected static var _selknoblinecolor:NumberSelected Knob line color style property (color number).
| _selknoblineopacity | property |
protected static var _selknoblineopacity:NumberSelected Knob line opacity style property (percentage number).
| _selknoblinewidth | property |
protected static var _selknoblinewidth:NumberSelected Knob line width style property.
| _styleselector | property |
protected static var _styleselector:String = "null""Not Selected Knob" style selector String representation.
| styleselector | property |
styleselector:String [read-write]The style sector used in this DiagramLinkUI.
Implementation protected static function get styleselector():String
protected function set styleselector(value:String):void
| DiagramLinkUI | () | constructor |
public function DiagramLinkUI(dlink:DiagramLink)Creates a DiagramLinkUI instance given a DiagramLink to which it is linked (defining CSS styling, cursor, used style selectors...).
Parametersdlink:DiagramLink — DiagramLink to which this DiagramLinkUI is linked.
|
| annotateHandler | () | method |
protected function annotateHandler(event:MouseEvent):voidParameters
event:MouseEvent |
| clear | () | method |
public override function clear():void
| clearSelection | () | method |
public override function clearSelection():voidClears selection by updating the selection index (no selection).
| createAnnotateButton | () | method |
| createChildren | () | method |
protected override function createChildren():void
| cssInitialize | () | method |
protected static function cssInitialize():BooleanInitialises SVG libraries (icons and graphics) and sets new style properties (CSS).
ReturnsBoolean — CSS Properties loading status (success/failure).
|
| draw | () | method |
public override function draw():voidDraws this DiagramLinkUI elements respecting the control points and line styling.
| execute | () | method |
public override function execute(k:int, event:MouseEvent = null):voidExecutes a link modification/transformation (inserting and moving knobs (articulations) and anchors) operation given a mouse event and an index telling selected point, link modification type and required UI handlers. Handlers are listed as follows (index in _uihandlers array):
k:int — Index (Handler and Control point).
|
|
event:MouseEvent (default = null) — Detected Mouse Event.
|
| fitToObject | () | method |
public override function fitToObject(dlink:DiagramObject = null):voidUpdates this DiagramLinkUI position in order to fit its container or its correspondant DiagramLink. It takes into consideration the DiagramLink position.
Parametersdlink:DiagramObject (default = null) — DiagramObject to fit with (not used in this class).
|
| hitTest | () | method |
public override function hitTest(m:Point):int
Determines the Diagram hit type given a point (cursor hit position) meaning determining what the cursor hits. If the cursor hits a control point, the hitTest
function returns an index extracted from the points array (even if horizontal position, odd else). This index if divided (integer division) returns the selected control point.
m:Point — Hit point (cursor hit position).
|
int — Diagram Hit Type index (Index).
|
| insertKnobs | () | method |
protected function insertKnobs(event:MouseEvent):voidInserts new knobs in this Diagram link UI for more user customization abilities and easier manipulation. It updates also control points array.
Parametersevent:MouseEvent — Detected Mouse Event.
|
| keyUpHandler | () | method |
protected override function keyUpHandler(event:KeyboardEvent):voidParameters
event:KeyboardEvent |
| knobHandler | () | method |
protected function knobHandler(event:MouseEvent):voidHandles any knob (except knob linked to source or target Diagram UIs) manipulation and updates user modifications in the correspondant DiagramLink (knob position update in the diagram drawing).
Parametersevent:MouseEvent — Detected Mouse Event.
|
| mouseMoveHandler | () | method |
protected function mouseMoveHandler(event:MouseEvent):void
Applies link modification/transformation operations while moving the cursor according to selected UI handler (defined by the execute method).
event:MouseEvent — Detected Mouse Event.
|
| mouseUpHandler | () | method |
protected function mouseUpHandler(event:MouseEvent):voidFinalizes the link modification or transformation operation after a mouse up event and removes all listeners.
Parametersevent:MouseEvent — Detected Mouse Event.
|
| showAnnotateButton | () | method |
protected function showAnnotateButton():void
| sourceAnchorHandler | () | method |
protected function sourceAnchorHandler(event:MouseEvent):voidHandles source anchor manipulation and updates user modifications in the correspondant DiagramLink (master anchor point update).
Parametersevent:MouseEvent — Detected Mouse Event.
|
| styleChanged | () | method |
protected static function styleChanged(event:SVGAssetLibraryEvent):voidChanges the currently used CSS style when an SVGAssetLibraryEvent is triggered.
Parametersevent:SVGAssetLibraryEvent — An SVGAssetLibraryEvent indicating that the new style poroperties were loaded.
|
| targetAnchorHandler | () | method |
protected function targetAnchorHandler(event:MouseEvent):voidHandles target anchor (linked to a target Diagram UI) manipulation and updates user modifications in the correspondant DiagramLink (target anchors updates).
Parametersevent:MouseEvent — Detected Mouse Event.
|
| KNOBSIZE | constant |
public static const KNOBSIZE:Number = 8Square side of the Knob.