|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.alarm.PropertyPropagator<T>
T
- public class PropertyPropagator<T extends Data>
属性传播器,twaver内部使用
Field Summary | |
---|---|
protected boolean |
isPropagating
|
Constructor Summary | |
---|---|
PropertyPropagator(DataBox<T> dataBox,
java.lang.String propertyName)
|
|
PropertyPropagator(DataBox<T> dataBox,
java.lang.String propertyName,
java.lang.String propertyType)
Constructor. |
Method Summary | |
---|---|
DataBox<T> |
getDataBox()
Get the connected data box. |
java.lang.String |
getPropertyName()
Get the property name that only this property changes the propagator will be triggered. |
java.lang.String |
getPropertyType()
Get the property type that only properties with this type changes the propagator will be triggered. |
boolean |
isEnable()
Get current enable status of this propagator. |
protected void |
onDataPropertyChangeEvent(PropertyChangeEvent e)
元素属性变化事件,回调此函数 |
protected void |
propagate(Data data)
Propagate property change to the specified data. |
protected void |
propagateToParent(Data child,
Data parent)
Called when need to propagate property change to specified data's parent. |
protected void |
propagateToTop(Data data)
Propagate property change to the specified data's next level data. |
void |
setEnable(boolean enable)
Enable or disable this propagator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isPropagating
Constructor Detail |
---|
public PropertyPropagator(DataBox<T> dataBox, java.lang.String propertyName)
public PropertyPropagator(DataBox<T> dataBox, java.lang.String propertyName, java.lang.String propertyType)
dataBox
- this instanceof the data box this propagator work for. Data
contains in this data box has property value changes, this
propagator will be triggered.propertyName
- the property name that should be propagated.propertyType
- the property type that should be propagated.Method Detail |
---|
public DataBox<T> getDataBox()
public java.lang.String getPropertyType()
public java.lang.String getPropertyName()
public void setEnable(boolean enable)
enable
- the new enable status value. True to enable this propagator to
work, false stop it.public boolean isEnable()
protected void onDataPropertyChangeEvent(PropertyChangeEvent e)
e
- protected void propagate(Data data)
data
- the target propagate data.protected void propagateToTop(Data data)
data
- the data need to propagate.protected void propagateToParent(Data child, Data parent)
child
- child data, the change source.parent
- parent data, the propagation target.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |