|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--elge.monitor.AbstractMonitor
This class is a basic class for derivating new monitors.
It defines some common thing, that you don;t need to make again and again.
Field Summary | |
protected boolean |
per
the persistence of monitor is defaut set to true. |
static String |
PROP_PROJECT
The project property identifier. |
protected Project |
pt
The project the monitor is in. |
Constructor Summary | |
AbstractMonitor()
The class is abstract, but the constructor adds this object as listener to itself :). |
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
Add listner |
boolean |
getPersistence()
True, if the monitor is writing the data to the disk... |
Project |
getProject()
Gets the project |
void |
propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed. |
void |
removePropertyChangeListener(PropertyChangeListener l)
remove listener |
void |
restart()
Restarts the monitor. |
void |
setPersistence(boolean per)
See getPersistence() |
void |
setProject(Project pt)
Sets the Project the monitor is in. |
protected void |
updateMonitor()
Empty method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface elge.engine.Monitor |
getDescription, getFullName, getIdentifiers, getMonitorName, getValues |
Field Detail |
public static final String PROP_PROJECT
protected boolean per
protected Project pt
Constructor Detail |
public AbstractMonitor()
Method Detail |
public void addPropertyChangeListener(PropertyChangeListener l)
l
- the listenerpublic void removePropertyChangeListener(PropertyChangeListener l)
l
- the lsitenerpublic Project getProject()
getProject
in interface Monitor
public void setProject(Project pt)
setProject
in interface Monitor
pt
- The actual Projectpublic boolean getPersistence()
getPersistence
in interface Monitor
public void setPersistence(boolean per)
getPersistence()
setPersistence
in interface Monitor
per
- the valueMonitor.getPersistence()
public void restart()
restart
in interface Monitor
Project.restart()
protected void updateMonitor()
propertyChange(java.beans.PropertyChangeEvent)
public void propertyChange(PropertyChangeEvent evt)
The montor hooks up on self and on the project and world. If the
World Representation property changes, or Project Word property or MOnitor Project property,
this method calls updateMonitor()
method.
propertyChange
in interface PropertyChangeListener
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |