Packagetwaver.network.ui
Classpublic class LabelAttachment
InheritanceLabelAttachment Inheritance BasicAttachment Inheritance Attachment Inheritance mx.core.UIComponent

Label attachment is defined to display element name as a label on network canvas. Every element ui contains a label attachment instance to use it display element name.

See also

BasicAttachment


Public Properties
 PropertyDefined By
 InheritedattachmentSprite : Sprite
Attachment
 InheritedattachmentSpriteTransform : Transform
Attachment
 Inheritedbounds : Rectangle
[override] [read-only] Get attachment bounds.
BasicAttachment
 Inheritedcontent : DisplayObject
Get the display object content of this attachment.
BasicAttachment
 InheritedcontentHeight : Number
[read-only] Get attachment content height.
BasicAttachment
 InheritedcontentWidth : Number
[read-only] Get attachment content width.
BasicAttachment
  contentXScale : Number
[override] [read-only] Get attachment x scale.
LabelAttachment
  contentYScale : Number
[override] [read-only] Get attachment y scale.
LabelAttachment
  cornerRadius : Number
[override] [read-only] Get corner radius of the round rectangle shape.
LabelAttachment
  direction : String
[override] [read-only] Get attachment growing direction.
LabelAttachment
 Inheritedelement : IElement
[read-only] Get element ui related element object.
Attachment
 InheritedelementUI : ElementUI
[read-only] Get connected element ui.
Attachment
  fill : Boolean
[override] [read-only] Whether this attachment need to fill.
LabelAttachment
  fillAlpha : Number
[override] [read-only] Get attachment fill color transparency.
LabelAttachment
  fillColor : Number
[override] [read-only] Get attachment fill color.
LabelAttachment
  gradient : String
[override] [read-only] Get attachment fill gradient pattern.
LabelAttachment
  gradientAlpha : Number
[override] [read-only] Get attachment fill gradient color transparency.
LabelAttachment
  gradientColor : Number
[override] [read-only] Get attachment fill gradient color.
LabelAttachment
 Inheritednetwork : Network
[read-only] Get network component this attachment display on.
Attachment
  outlineAlpha : Number
[override] [read-only] Get attachment outline color transparency.
LabelAttachment
  outlineColor : Number
[override] [read-only] Get attachment outline color.
LabelAttachment
  outlineWidth : Number
[override] [read-only] Get attachment outline stroke width.
LabelAttachment
  padding : Number
[override] [read-only] Get padding blank space of this attachment.
LabelAttachment
  paddingBottom : Number
[override] [read-only] Get bottom padding blank space of this attachment.
LabelAttachment
  paddingLeft : Number
[override] [read-only] Get left padding blank space of this attachment.
LabelAttachment
  paddingRight : Number
[override] [read-only] Get right padding blank space of this attachment.
LabelAttachment
  paddingTop : Number
[override] [read-only] Get top padding blank space of this attachment.
LabelAttachment
  pointerLength : Number
[override] [read-only] Get pointer length of this attachment shape, typically this is for alarm bubble attachment.
LabelAttachment
  pointerWidth : Number
[override] [read-only] Get pointer length of this attachment shape, typically this is for alarm bubble attachment.
LabelAttachment
  position : String
[override] [read-only] Get attachment based position of element body.
LabelAttachment
 InheritedroundRect : Rectangle
[read-only] Get the round rectangle of this attachment.
BasicAttachment
 InheritedshowInAttachmentCanvas : Boolean
[read-only] Get value whether show this attachment a the separate attachment canvas in network.
Attachment
  xOffset : Number
[override] [read-only] Get the extra x position offset of this attachment base on the attachment position.
LabelAttachment
  yOffset : Number
[override] [read-only] Get the extra y position offset of this attachment base on the attachment position.
LabelAttachment
Public Methods
 MethodDefined By
  
LabelAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false, rotatable:Boolean = false)
Constructor, create label attachment for this element ui.
LabelAttachment
 Inherited
dispose():void
Call this to dispose all resources used by this attachment.
Attachment
 Inherited
draw(graphics:Graphics):void
[override] Draw attachment content.
BasicAttachment
 Inherited
setMatrix(matrix:Matrix):void
[override] Set attachment transform matrix.
BasicAttachment
  
[override] Update attachment transparency.
LabelAttachment
  
[override] Update element attachment properties.
LabelAttachment
Protected Methods
 MethodDefined By
 Inherited
Create filters.
Attachment
 Inherited
measure():void
[override]
Attachment
Property Detail
contentXScaleproperty
contentXScale:Number  [read-only] [override]

Get attachment x scale. Default value is 1.


Implementation
    public function get contentXScale():Number
contentYScaleproperty 
contentYScale:Number  [read-only] [override]

Get attachment y scale. Default value is 1.


Implementation
    public function get contentYScale():Number
cornerRadiusproperty 
cornerRadius:Number  [read-only] [override]

Get corner radius of the round rectangle shape. Default value is 8.


Implementation
    public function get cornerRadius():Number
directionproperty 
direction:String  [read-only] [override]

Get attachment growing direction. This value can be:

Default value is Consts.ATTACHMENT_DIRECTION_RIGHT.


Implementation
    public function get direction():String
fillproperty 
fill:Boolean  [read-only] [override]

Whether this attachment need to fill. Default value is false.


Implementation
    public function get fill():Boolean
fillAlphaproperty 
fillAlpha:Number  [read-only] [override]

Get attachment fill color transparency. Default value is 1, no transparency.


Implementation
    public function get fillAlpha():Number
fillColorproperty 
fillColor:Number  [read-only] [override]

Get attachment fill color. Default color is black.


Implementation
    public function get fillColor():Number
gradientproperty 
gradient:String  [read-only] [override]

Get attachment fill gradient pattern. Default value is null, no gradient.

This value can be:


Implementation
    public function get gradient():String
gradientAlphaproperty 
gradientAlpha:Number  [read-only] [override]

Get attachment fill gradient color transparency. Default value is 1, no transparency.


Implementation
    public function get gradientAlpha():Number
gradientColorproperty 
gradientColor:Number  [read-only] [override]

Get attachment fill gradient color. Default is white color.


Implementation
    public function get gradientColor():Number
outlineAlphaproperty 
outlineAlpha:Number  [read-only] [override]

Get attachment outline color transparency. Default value is 1, no transparency.


Implementation
    public function get outlineAlpha():Number
outlineColorproperty 
outlineColor:Number  [read-only] [override]

Get attachment outline color. Default color is black.


Implementation
    public function get outlineColor():Number
outlineWidthproperty 
outlineWidth:Number  [read-only] [override]

Get attachment outline stroke width. Default value is -1, no outline.


Implementation
    public function get outlineWidth():Number
paddingproperty 
padding:Number  [read-only] [override]

Get padding blank space of this attachment. Default value is 0.


Implementation
    public function get padding():Number
paddingBottomproperty 
paddingBottom:Number  [read-only] [override]

Get bottom padding blank space of this attachment. Default value is 0.


Implementation
    public function get paddingBottom():Number
paddingLeftproperty 
paddingLeft:Number  [read-only] [override]

Get left padding blank space of this attachment. Default value is 0.


Implementation
    public function get paddingLeft():Number
paddingRightproperty 
paddingRight:Number  [read-only] [override]

Get right padding blank space of this attachment. Default value is 0.


Implementation
    public function get paddingRight():Number
paddingTopproperty 
paddingTop:Number  [read-only] [override]

Get top padding blank space of this attachment. Default value is 0.


Implementation
    public function get paddingTop():Number
pointerLengthproperty 
pointerLength:Number  [read-only] [override]

Get pointer length of this attachment shape, typically this is for alarm bubble attachment. Default value is 10.


Implementation
    public function get pointerLength():Number
pointerWidthproperty 
pointerWidth:Number  [read-only] [override]

Get pointer length of this attachment shape, typically this is for alarm bubble attachment. Default value is 8.


Implementation
    public function get pointerWidth():Number
positionproperty 
position:String  [read-only] [override]

Get attachment based position of element body.

The value can be:

This default value is Consts.POSITION_TOPRIGHT_TOPRIGHT.


Implementation
    public function get position():String
xOffsetproperty 
xOffset:Number  [read-only] [override]

Get the extra x position offset of this attachment base on the attachment position. Default value is 0.


Implementation
    public function get xOffset():Number
yOffsetproperty 
yOffset:Number  [read-only] [override]

Get the extra y position offset of this attachment base on the attachment position. Default value is 0.


Implementation
    public function get yOffset():Number
Constructor Detail
LabelAttachment()Constructor
public function LabelAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false, rotatable:Boolean = false)

Constructor, create label attachment for this element ui.

Parameters
elementUI:ElementUI — the element ui this label attachment works with.
 
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.
 
rotatable:Boolean (default = false)
Method Detail
updateAlpha()method
override public function updateAlpha():void

Update attachment transparency.

updateProperties()method 
override public function updateProperties():void

Update element attachment properties. This will redraw attachment.