Packagecom.kapit.diagram.ui
Classpublic class DiagramObjectUI
InheritanceDiagramObjectUI Inheritance mx.core.UIComponent
ImplementsIDiagramObjectUI
SubclassesDiagramLinkUI, DiagramSpriteUI, TransformUI



Public Properties
 PropertyDefined by
  innerheight : Number
[read-only] The inner height of this component.
DiagramObjectUI
  innerleft : Number
[read-only] The inner left position (X coordinate).
DiagramObjectUI
  innertop : Number
[read-only] The inner top position (Y coordinate).
DiagramObjectUI
  innerwidth : Number
[read-only] The inner width of this component.
DiagramObjectUI
  locked : Boolean
[read-only] Locked property that defines if the UI is locked, meaning it can't be inactivated.
DiagramObjectUI
  outerheight : Number
[read-only] The outer height of this component.
DiagramObjectUI
  outerwidth : Number
[read-only] The outer width of this component.
DiagramObjectUI
  source : DiagramObject
[read-only] Source property that defines the Diagram Object to which this DiagramObjectUI is linked.
DiagramObjectUI
Protected Properties
 PropertyDefined by
  _activated : Boolean = false
Activation status of the DiagramObjectUI.
DiagramObjectUI
  _source : DiagramObject = null
The Diagram Object to which this DiagramObjectUI is linked.
DiagramObjectUI
Public Methods
 MethodDefined by
  
Creates a DiagramObjectUI instance given its correspondant DiagramObject.
DiagramObjectUI
  
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
Clears the graphics that were drawn to this Graphics object.
DiagramObjectUI
  
Clears selection by updating the selection index.
DiagramObjectUI
  
draw():void
Draws this DiagramObjectUI elements while respecting position, style and size properties.
DiagramObjectUI
  
execute(k:int, event:MouseEvent = null):void
Executes a scaling, modification, dragging, transformation...
DiagramObjectUI
  
fitToObject(p:DiagramObject = null):void
Updates this DiagramObjectUI position or/and size in order to fit its container or its correspondant DiagramObject.
DiagramObjectUI
  
hitTest(p:Point):int
Determines the Diagram hit type given a point (cursor hit position) meaning determining what the cursor hits.
DiagramObjectUI
  
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
Protected Methods
 MethodDefined by
  
Defining Diagram Object UI behaviour and children status while a given action is running (after detecting an ActionManagerEvent).
DiagramObjectUI
  
Defining Diagram Object UI behaviour and children status when a given action stops running (after detecting an ActionManagerEvent).
DiagramObjectUI
  
mouseDownHandler(event:MouseEvent):void
Detects a mouse down event and executes a defined action set in the execute method according to hitTest result.
DiagramObjectUI
Property detail
_activatedproperty
protected var _activated:Boolean = false

Activation status of the DiagramObjectUI.

innerheightproperty 
innerheight:Number  [read-only]

The inner height of this component.

Implementation
    public function get innerheight():Number
innerleftproperty 
innerleft:Number  [read-only]

The inner left position (X coordinate).

Implementation
    public function get innerleft():Number
innertopproperty 
innertop:Number  [read-only]

The inner top position (Y coordinate).

Implementation
    public function get innertop():Number
innerwidthproperty 
innerwidth:Number  [read-only]

The inner width of this component.

Implementation
    public function get innerwidth():Number
lockedproperty 
locked:Boolean  [read-only]

Locked property that defines if the UI is locked, meaning it can't be inactivated.

Implementation
    public function get locked():Boolean
outerheightproperty 
outerheight:Number  [read-only]

The outer height of this component.

Implementation
    public function get outerheight():Number
outerwidthproperty 
outerwidth:Number  [read-only]

The outer width of this component.

Implementation
    public function get outerwidth():Number
_sourceproperty 
protected var _source:DiagramObject = null

The Diagram Object to which this DiagramObjectUI is linked.

sourceproperty 
source:DiagramObject  [read-only]

Source property that defines the Diagram Object to which this DiagramObjectUI is linked.

Implementation
    public function get source():DiagramObject
Constructor detail
DiagramObjectUI()constructor
public function DiagramObjectUI(dob:DiagramObject)

Creates a DiagramObjectUI instance given its correspondant DiagramObject.

Parameters
dob:DiagramObject — Source DiagramObject to which this DiagramObjectUI is linked.
Method detail
actionRunningHandler()method
protected function actionRunningHandler(event:ActionsManagerEvent):void

Defining Diagram Object UI behaviour and children status while a given action is running (after detecting an ActionManagerEvent).

Parameters
event:ActionsManagerEvent — Detected ActionManagerEvent.
actionStoppedHandler()method 
protected function actionStoppedHandler(event:ActionsManagerEvent):void

Defining Diagram Object UI behaviour and children status when a given action stops running (after detecting an ActionManagerEvent).

Parameters
event:ActionsManagerEvent — Detected ActionManagerEvent.
activate()method 
public function activate(a:Boolean):void

Activates or deactivates this DiagramObjectUI by adding or removing action and mouse listeners to the source Diagram Object View.

Parameters
a:Boolean — New Activation status (True if this DiagramObjectUI must be activated).
clear()method 
public function clear():void

Clears the graphics that were drawn to this Graphics object.

clearSelection()method 
public function clearSelection():void

Clears selection by updating the selection index.

draw()method 
public function draw():void

Draws this DiagramObjectUI elements while respecting position, style and size properties.

execute()method 
public function execute(k:int, event:MouseEvent = null):void

Executes a scaling, modification, dragging, transformation... operations given a mouse event on a Diagram Object UI and a Diagram Hit Type defined internally by the DiagramObjectUI subclasses UI or the DiagramHitType class.

Parameters
k:int — Diagram Hit Type.
 
event:MouseEvent (default = null) — Detected Mouse Event.
fitToObject()method 
public function fitToObject(p:DiagramObject = null):void

Updates this DiagramObjectUI position or/and size in order to fit its container or its correspondant DiagramObject.

Parameters
p:DiagramObject (default = null) — DiagramObject to fit with (not used in this class).
hitTest()method 
public function hitTest(p:Point):int

Determines the Diagram hit type given a point (cursor hit position) meaning determining what the cursor hits. The hitTest function returns a Diagram Hit type index defined in the DiagramHitType class or in the the DiagramObjectUI subclasses.

Parameters
p:Point — Hit point (cursor hit position).

Returns
int — Diagram Hit Type index (DiagramHitType.NONE)
libraryStylesChanged()method 
public function libraryStylesChanged(event:SVGAssetLibraryEvent):void

Redraws this DiagramObjectUI and its children when library styles and assets change given a SVGAssetLibraryEvent.

Parameters
event:SVGAssetLibraryEvent — SVGAssetLibraryEvent telling a change in asset library properties.
mouseDownHandler()method 
protected function mouseDownHandler(event:MouseEvent):void

Detects a mouse down event and executes a defined action set in the execute method according to hitTest result.

Parameters
event:MouseEvent — Detected mouse event.
unlink()method 
public function unlink():void

Unlinks and removes the Diagram Object UI from its parent (usually used when deleting Diagram Objects).

update()method 
public function update():void