Package | twaver |
Class | public class PropertyPropagator |
Inheritance | PropertyPropagator ![]() |
Subclasses | AlarmStatePropagator |
Property propagator works with data box. You can specify a property name and property type so this propagator knows which property and what type property should be propagated when the property value is changed. By default the propagation will go parent or upper index direction. However you can overwrite method defined in this class and customize the default implementation.
A typical usage of property propagator is AlarmStatePropagator
.
It will propagate alarm state to parent element when an element
alarm occured.
See also
Property | Defined By | ||
---|---|---|---|
dataBox : DataBox [read-only]
Get the connected data box. | PropertyPropagator | ||
enable : Boolean
Get current enable status of this propagator. | PropertyPropagator | ||
propertyName : String [read-only]
Get the property name that only this property changes
the propagator will be triggered. | PropertyPropagator | ||
propertyType : String [read-only]
Get the property type that only properties with
this type changes the propagator will be triggered. | PropertyPropagator |
Property | Defined By | ||
---|---|---|---|
_isPropagating : Boolean = false | PropertyPropagator |
Method | Defined By | ||
---|---|---|---|
PropertyPropagator(dataBox:DataBox, propertyName:String, propertyType:String = accessor)
Constructor. | PropertyPropagator |
Method | Defined By | ||
---|---|---|---|
Called when a data box has been changed. | PropertyPropagator | ||
handleDataPropertyChange(e:PropertyChangeEvent):void
Called when a property of a data has been changed. | PropertyPropagator | ||
Propagate property change to the specified data. | PropertyPropagator | ||
Called when need to propagate property change to specified
data's parent. | PropertyPropagator | ||
propagateToTop(data:IData):void
Propagate property change to the specified data's next level data. | PropertyPropagator |
_isPropagating | property |
protected var _isPropagating:Boolean = false
dataBox | property |
dataBox:DataBox
[read-only] Get the connected data box.
public function get dataBox():DataBox
enable | property |
enable:Boolean
Get current enable status of this propagator.
public function get enable():Boolean
public function set enable(value:Boolean):void
propertyName | property |
propertyName:String
[read-only] Get the property name that only this property changes the propagator will be triggered.
public function get propertyName():String
propertyType | property |
propertyType:String
[read-only] Get the property type that only properties with this type changes the propagator will be triggered.
public function get propertyType():String
PropertyPropagator | () | Constructor |
public function PropertyPropagator(dataBox:DataBox, propertyName:String, propertyType:String = accessor)
Constructor.
ParametersdataBox:DataBox — this is the data box this propagator work for.
Data contains in this data box has property value changes, this propagator
will be triggered.
| |
propertyName:String — the property name that should be propagated.
| |
propertyType:String (default = accessor ) — the property type that should be propagated.
|
handleDataBoxChange | () | method |
protected function handleDataBoxChange(e:DataBoxChangeEvent):void
Called when a data box has been changed. This default implementation will propagate the change. Overwrite this method to do customized propagate action.
Parameters
e:DataBoxChangeEvent — the data box change event contains information
of that change.
|
handleDataPropertyChange | () | method |
protected function handleDataPropertyChange(e:PropertyChangeEvent):void
Called when a property of a data has been changed. This default implementation will propagate this change to parent data. Overwrite this method to do customized propagate action.
Parameters
e:PropertyChangeEvent — the property change event contains information
of that change.
|
propagate | () | method |
protected function propagate(data:IData):void
Propagate property change to the specified data.
Parameters
data:IData — the target propagate data.
|
propagateToParent | () | method |
protected function propagateToParent(child:IData, parent:IData):void
Called when need to propagate property change to specified data's parent.
Parameters
child:IData — child data, the change source.
| |
parent:IData — parent data, the propagation target.
|
propagateToTop | () | method |
protected function propagateToTop(data:IData):void
Propagate property change to the specified data's next level data. In this default implementation, the "next level data" means the parent data. You can overwrite this method to do your customized property propagation.
Parameters
data:IData — the data need to propagate.
|