Package | twaver.network.ui |
Class | public class AlarmAttachment |
Inheritance | AlarmAttachment ![]() ![]() ![]() |
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
Property | Defined By | ||
---|---|---|---|
![]() | attachmentSprite : Sprite | Attachment | |
![]() | attachmentSpriteTransform : Transform | Attachment | |
![]() | bounds : Rectangle [override] [read-only]
Get attachment bounds. | BasicAttachment | |
![]() | content : DisplayObject
Get the display object content of this attachment. | BasicAttachment | |
![]() | contentHeight : Number [read-only]
Get attachment content height. | BasicAttachment | |
![]() | contentWidth : 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 | ||
![]() | element : IElement [read-only]
Get element ui related element object. | Attachment | |
![]() | elementUI : 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 | ||
![]() | network : 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 | ||
![]() | roundRect : Rectangle [read-only]
Get the round rectangle of this attachment. | BasicAttachment | |
![]() | showInAttachmentCanvas : 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 |
Method | Defined By | ||
---|---|---|---|
AlarmAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false)
Create an alarm attachment instance for specified element ui. | AlarmAttachment | ||
![]() | dispose():void
Call this to dispose all resources used by this attachment. | Attachment | |
![]() | draw(graphics:Graphics):void [override]
Draw attachment content. | BasicAttachment | |
![]() | setMatrix(matrix:Matrix):void [override]
Set attachment transform matrix. | BasicAttachment | |
updateAlpha():void [override]
Update attachment transparency. | AlarmAttachment | ||
updateProperties():void [override]
Update element attachment properties. | AlarmAttachment |
Method | Defined By | ||
---|---|---|---|
createFilters():Array [override]
Create filters. | AlarmAttachment | ||
![]() | measure():void [override]
| Attachment |
contentXScale | property |
contentXScale:Number
[read-only] [override] Get attachment x scale. Default value is 1.
public function get contentXScale():Number
contentYScale | property |
contentYScale:Number
[read-only] [override] Get attachment y scale. Default value is 1.
public function get contentYScale():Number
cornerRadius | property |
cornerRadius:Number
[read-only] [override] Get corner radius of the round rectangle shape. Default value is 8.
public function get cornerRadius():Number
direction | property |
direction:String
[read-only] [override] Get attachment growing direction. This value can be:
Consts.ATTACHMENT_DIRECTION_RIGHT
.
public function get direction():String
fill | property |
fill:Boolean
[read-only] [override] Whether this attachment need to fill. Default value is false.
public function get fill():Boolean
fillAlpha | property |
fillAlpha:Number
[read-only] [override] Get attachment fill color transparency. Default value is 1, no transparency.
public function get fillAlpha():Number
fillColor | property |
fillColor:Number
[read-only] [override] Get attachment fill color. Default color is black.
public function get fillColor():Number
gradient | property |
gradient:String
[read-only] [override] Get attachment fill gradient pattern. Default value is null, no gradient.
This value can be:
public function get gradient():String
gradientAlpha | property |
gradientAlpha:Number
[read-only] [override] Get attachment fill gradient color transparency. Default value is 1, no transparency.
public function get gradientAlpha():Number
gradientColor | property |
gradientColor:Number
[read-only] [override] Get attachment fill gradient color. Default is white color.
public function get gradientColor():Number
outlineAlpha | property |
outlineAlpha:Number
[read-only] [override] Get attachment outline color transparency. Default value is 1, no transparency.
public function get outlineAlpha():Number
outlineColor | property |
outlineColor:Number
[read-only] [override] Get attachment outline color. Default color is black.
public function get outlineColor():Number
outlineWidth | property |
outlineWidth:Number
[read-only] [override] Get attachment outline stroke width. Default value is -1, no outline.
public function get outlineWidth():Number
padding | property |
padding:Number
[read-only] [override] Get padding blank space of this attachment. Default value is 0.
public function get padding():Number
paddingBottom | property |
paddingBottom:Number
[read-only] [override] Get bottom padding blank space of this attachment. Default value is 0.
public function get paddingBottom():Number
paddingLeft | property |
paddingLeft:Number
[read-only] [override] Get left padding blank space of this attachment. Default value is 0.
public function get paddingLeft():Number
paddingRight | property |
paddingRight:Number
[read-only] [override] Get right padding blank space of this attachment. Default value is 0.
public function get paddingRight():Number
paddingTop | property |
paddingTop:Number
[read-only] [override] Get top padding blank space of this attachment. Default value is 0.
public function get paddingTop():Number
pointerLength | property |
pointerLength:Number
[read-only] [override] Get pointer length of this attachment shape, typically this is for alarm bubble attachment. Default value is 10.
public function get pointerLength():Number
pointerWidth | property |
pointerWidth:Number
[read-only] [override] Get pointer length of this attachment shape, typically this is for alarm bubble attachment. Default value is 8.
public function get pointerWidth():Number
position | property |
position:String
[read-only] [override] Get attachment based position of element body.
The value can be:
This default value is Consts.POSITION_TOPRIGHT_TOPRIGHT
.
public function get position():String
xOffset | property |
xOffset:Number
[read-only] [override] Get the extra x position offset of this attachment base on the attachment position. Default value is 0.
public function get xOffset():Number
yOffset | property |
yOffset:Number
[read-only] [override] Get the extra y position offset of this attachment base on the attachment position. Default value is 0.
public function get yOffset():Number
AlarmAttachment | () | Constructor |
public function AlarmAttachment(elementUI:ElementUI, showInAttachmentCanvas:Boolean = false)
Create an alarm attachment instance for specified element ui.
ParameterselementUI: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
createFilters | () | method |
override protected function createFilters():Array
Create filters.
ReturnsArray — 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.