|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sourceforge.espro.model.AbstractModel
public abstract class AbstractModel
The AbstractModel containts a PropertyChangeSupport and a handling for setting and getting the saved state of the model.
Field Summary | |
---|---|
java.beans.PropertyChangeSupport |
pcs
The property change support. |
Constructor Summary | |
---|---|
AbstractModel()
The initial function. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a generic property change listener. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a specific property change listener for the given property name. |
boolean |
isSaved()
Returns wether the questionnaire is saved. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener. |
void |
setSaved(boolean saved)
Sets the saved state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.beans.PropertyChangeSupport pcs
Constructor Detail |
---|
public AbstractModel()
Method Detail |
---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface ModelInterface
listener
- The listener.public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface ModelInterface
propertyName
- The name of the property.listener
- The listener.public boolean isSaved()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface ModelInterface
listener
- The listener to remove.public void setSaved(boolean saved)
Fires a 'saved' property change if the state changes.
saved
- the saved to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |