Package | twaver |
Class | public class AlarmBox |
Inheritance | AlarmBox ![]() ![]() |
All ElementBox has an AlarmBox instance which is created when creating an ElementBox. To use AlarmBox, just create alarm objects and add into AlarmBox then the alarm will be displayed on the views connected to ElementBox. Here is an example:
var alarm:Alarm = new Alarm(); ...//set more alarm properties here. box.alarmBox.add(alarm);
See also
Property | Defined By | ||
---|---|---|---|
alarmElementMapping : IAlarmElementMapping
Get the alarm-elemen mapping object. | AlarmBox | ||
![]() | clientProperties : ICollection [read-only]
Get a ICollection that contians all client proerty name. | DataBox | |
![]() | count : int [read-only]
Get total data counts contains in this data box. | DataBox | |
![]() | datas : ICollection [read-only]
Get collection of all data inside the data box. | DataBox | |
elementBox : ElementBox [read-only]
Get the element box this alarm box connect to. | AlarmBox | ||
![]() | icon : String
Get icon value for this data. | DataBox | |
![]() | limit : int
Get the limit for this data box. | DataBox | |
![]() | name : String
Get name of this data. | DataBox | |
removeAlarmWhenAlarmIsCleared : Boolean
Indicates whether the alarm object will be removed from alarm box
when this alarm severity/status is changed to "cleared". | AlarmBox | ||
removeAlarmWhenElementIsRemoved : Boolean
The flag value indicates that whether all alarms occured on an element
need to be removed as well when the element is removed from the element box. | AlarmBox | ||
![]() | roots : ICollection [read-only]
Get all root data objects in this data box. | DataBox | |
![]() | selectionModel : SelectionModel [read-only]
Get selection model of this data box. | DataBox | |
![]() | toolTip : String
Get the tooltip text of this data. | DataBox |
Method | Defined By | ||
---|---|---|---|
AlarmBox(elementBox:ElementBox)
Constructor of AlarmBox. | AlarmBox | ||
[override]
Add a data into this data box at the specified index location. | AlarmBox | ||
![]() | addDataBoxChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a data box change listener into this data box to monitoring
the property change event. | DataBox | |
![]() | addDataPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add data property change listener to this data box. | DataBox | |
![]() | addHierarchyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a data hierarchical change listener on this data box. | DataBox | |
![]() | addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add property change listener into this data box. | DataBox | |
![]() | clear():void
Clear all data objects. | DataBox | |
![]() |
Check whether contains specified data object in this data box. | DataBox | |
![]() | containsByID(id:Object):Boolean
Check whether contains data object with specified ID value. | DataBox | |
![]() | deserializeXML(serializer:XMLSerializer, xml:XML):void
Deserialize given XML data to data objects. | DataBox | |
![]() | dispatchPropertyChangeEvent(property:String, oldValue:Object, newValue:Object):Boolean
Dispatch property change event to all installed property change listeners. | DataBox | |
![]() | forEach(callbackFunction:Function):void
Iterate all data inside this data box with the specified
call back function. | DataBox | |
![]() | forEachByBreadthFirst(callbackFunction:Function, data:IData = null):void
Iterate all inside data in "breadth-first" rule. | DataBox | |
![]() | forEachByDepthFirst(callbackFunction:Function, data:IData = null):void
Iterate all inside data in "depth-first" rule. | DataBox | |
getAlarmByID(alarmID:Object):IAlarm
Get an alarm object by the given alarm ID. | AlarmBox | ||
![]() | getClient(clientProp:String):*
Get specified client property value. | DataBox | |
getCorrespondingAlarms(element:IElement):Array
Get the corresponding alarms of the given element, that is, all alarms
occured on this element object. | AlarmBox | ||
getCorrespondingElements(alarm:IAlarm):Array
Get all corresponding elements by given the alarm object. | AlarmBox | ||
![]() | getDataByID(id:Object):IData
Get data object by specified data ID. | DataBox | |
![]() | getPropertyValue(property:String):Object
Get specified property value from this data. | DataBox | |
![]() | getSiblingIndex(data:IData):int
Get the index of the specified data in all siblings. | DataBox | |
![]() |
Get sibling data collection for specified data instance. | DataBox | |
![]() | hasOwnProperty(name:String):Boolean
Whether this data has specified property. | DataBox | |
![]() | isEmpty():Boolean
Whether this data box is empty (no data). | DataBox | |
![]() |
Move specified data on index lower. | DataBox | |
![]() | moveSelectionDown(sm:SelectionModel = null):void
Move all selected data to lower index location. | DataBox | |
![]() | moveSelectionToBottom(sm:SelectionModel = null):void
Move all selected data to the bottom index location. | DataBox | |
![]() | moveSelectionToTop(sm:SelectionModel = null):void
Move all selected data to the top index location. | DataBox | |
![]() | moveSelectionUp(sm:SelectionModel = null):void
Move all selected data to upper index location. | DataBox | |
![]() |
Move the specified data to the specified index location. | DataBox | |
![]() | moveToBottom(data:IData):void
Move specified data to the bottom index location. | DataBox | |
![]() |
Move specified data to the top index location. | DataBox | |
![]() |
Move specified data one index upper. | DataBox | |
![]() |
Remove specified data from this data box. | DataBox | |
removeAlarmsByElement(element:IElement):void
Remove all corresponding alarms of given element object. | AlarmBox | ||
![]() | removeByID(id:Object):void
Remove data by data ID. | DataBox | |
![]() | removeDataBoxChangeListener(listener:Function):void
Remove data box change listener from this data box. | DataBox | |
![]() | removeDataPropertyChangeListener(listener:Function):void
Remove specified data property change listener. | DataBox | |
![]() | removeFirst(count:int = 1):void
Remove the first specified count data objects from this data box. | DataBox | |
![]() | removeHierarchyChangeListener(listener:Function):void
Remove the specified hierarchical change listener from this data box. | DataBox | |
![]() | removePropertyChangeListener(listener:Function):void
Remove property change listener from this data box. | DataBox | |
![]() | removeSelection():void
Remove all selected data from this data box. | DataBox | |
![]() |
Serialize all data contains in this data box into XML. | DataBox | |
![]() |
Set client property for this data. | DataBox | |
![]() | setPropertyValue(property:String, value:Object):void
Set specified property name value on this data. | DataBox | |
![]() | toDatas(matchFunction:Function = null):ICollection
Create a new collection, put all data inside this collection,
and return this collection. | DataBox | |
![]() | toString():String [override]
| DataBox |
alarmElementMapping | property |
alarmElementMapping:IAlarmElementMapping
Get the alarm-elemen mapping object. Alarm-element mapping object is used to map the relationship between elements and alarms. It will determines which alarm is occured on which element.
public function get alarmElementMapping():IAlarmElementMapping
public function set alarmElementMapping(value:IAlarmElementMapping):void
See also
elementBox | property |
elementBox:ElementBox
[read-only] Get the element box this alarm box connect to. Every alarm box will work with an element box which is specified by the constructor.
public function get elementBox():ElementBox
removeAlarmWhenAlarmIsCleared | property |
removeAlarmWhenAlarmIsCleared:Boolean
Indicates whether the alarm object will be removed from alarm box when this alarm severity/status is changed to "cleared".
public function get removeAlarmWhenAlarmIsCleared():Boolean
public function set removeAlarmWhenAlarmIsCleared(value:Boolean):void
removeAlarmWhenElementIsRemoved | property |
removeAlarmWhenElementIsRemoved:Boolean
The flag value indicates that whether all alarms occured on an element need to be removed as well when the element is removed from the element box.
public function get removeAlarmWhenElementIsRemoved():Boolean
public function set removeAlarmWhenElementIsRemoved(value:Boolean):void
AlarmBox | () | Constructor |
public function AlarmBox(elementBox:ElementBox)
Constructor of AlarmBox. This alarm box will connect to the given ElementBox.
ParameterselementBox:ElementBox |
add | () | method |
override public function add(data:IData, index:int = -1):void
Add a data into this data box at the specified index location.
Parameters
data:IData — the data object to be added
| |
index:int (default = -1 ) — the index location need to add
|
getAlarmByID | () | method |
public function getAlarmByID(alarmID:Object):IAlarm
Get an alarm object by the given alarm ID.
Parameters
alarmID:Object — the Alarm ID you want to get.
|
IAlarm — the alarm object with given ID.
|
getCorrespondingAlarms | () | method |
public function getCorrespondingAlarms(element:IElement):Array
Get the corresponding alarms of the given element, that is, all alarms occured on this element object.
Parameters
element:IElement — The element object
|
Array |
getCorrespondingElements | () | method |
public function getCorrespondingElements(alarm:IAlarm):Array
Get all corresponding elements by given the alarm object.
This is a wrapped method of alarmElementMapping.getCorrespondingElements(alarm)
See more information about this method on classAlarmElementMapping.getCorrespondingElements
Parameters
alarm:IAlarm — alarm object
|
Array — all corresponding elements of this given alarm.
|
removeAlarmsByElement | () | method |
public function removeAlarmsByElement(element:IElement):void
Remove all corresponding alarms of given element object.
Parameters
element:IElement — an element object
|