Packagetwaver.network.ui
Classpublic class AlarmAttachment
InheritanceAlarmAttachment Inheritance BasicAttachment Inheritance Attachment Inheritance mx.core.UIComponent

This attachment defines the new alarm representation on network, typically an alarm bubble with a text inside to indicate the alarm severity, alarm count etc.

In TWaver Flex, element label, alarm, small icons are all different attachments of an element. All element ui has an alarm attachment instance to paint alarm bubble when new alarms occured on this element.

You can create subclasses to change the default alarm bubble appearance and behaviour.

See also

twaver.Alarm


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.
AlarmAttachment
  contentYScale : Number
[override] [read-only] Get attachment y scale.
AlarmAttachment
  cornerRadius : Number
[override] [read-only] Get corner radius of the round rectangle shape.
AlarmAttachment
  direction : String
[override] [read-only] Get attachment growing direction.
AlarmAttachment
 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.
AlarmAttachment
  fillAlpha : Number
[override] [read-only] Get attachment fill color transparency.
AlarmAttachment
  fillColor : Number
[override] [read-only] Get attachment fill color.
AlarmAttachment
  gradient : String
[override] [read-only] Get attachment fill gradient pattern.
AlarmAttachment
  gradientAlpha : Number
[override] [read-only] Get attachment fill gradient color transparency.
AlarmAttachment
  gradientColor : Number
[override] [read-only] Get attachment fill gradient color.
AlarmAttachment
 Inheritednetwork : Network
[read-only] Get network component this attachment display on.
Attachment
  outlineAlpha : Number
[override] [read-only] Get attachment outline color transparency.
AlarmAttachment
  outlineColor : Number
[override] [read-only] Get attachment outline color.
AlarmAttachment
  outlineWidth : Number
[override] [read-only] Get attachment outline stroke width.
AlarmAttachment
  padding : Number
[override] [read-only] Get padding blank space of this attachment.
AlarmAttachment
  paddingBottom : Number
[override] [read-only] Get bottom padding blank space of this attachment.
AlarmAttachment
  paddingLeft : Number
[override] [read-only] Get left padding blank space of this attachment.
AlarmAttachment
  paddingRight : Number
[override] [read-only] Get right padding blank space of this attachment.
AlarmAttachment
  paddingTop : Number
[override] [read-only] Get top padding blank space of this attachment.
AlarmAttachment
  pointerLength : Number
[override] [read-only] Get pointer length of this attachment shape, typically this is for alarm bubble attachment.
AlarmAttachment
  pointerWidth : Number
[override] [read-only] Get pointer length of this attachment shape, typically this is for alarm bubble attachment.
AlarmAttachment
  position : String
[override] [read-only] Get attachment based position of element body.
AlarmAttachment
 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.
AlarmAttachment
  yOffset : Number
[override] [read-only] Get the extra y position offset of this attachment base on the attachment position.
AlarmAttachment
Public Methods
 MethodDefined By
  
AlarmAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false)
Create an alarm attachment instance for specified element ui.
AlarmAttachment
 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.
AlarmAttachment
  
[override] Update element attachment properties.
AlarmAttachment
Protected Methods
 MethodDefined By
  
[override] Create filters.
AlarmAttachment
 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
AlarmAttachment()Constructor
public function AlarmAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false)

Create an alarm attachment instance for specified element ui.

Parameters
elementUI:ElementUI — the element ui this alarm attachment contained.
 
showInAttachmentCanvas:Boolean (default = false) — whether display this attachment in network attachment canvas. See class Network to know more about the network internal canvas hierarchy. Because attachment canvas is in front of other canvas, so alarm bubble will not covered by other element body if set this value to true. Default value here is false.

See also

Method Detail
createFilters()method
override protected function createFilters():Array

Create filters.

Returns
Array — create filters in an array.
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.