|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.model.Model
public abstract class Model
base class for data models. A Model provides access to a data store to the outside world. Clients of the model can register as Listeners to be provided with feedback any time the model changes.
Nested Class Summary | |
---|---|
static interface |
Model.Listener
Listener for a Model. |
Constructor Summary | |
---|---|
Model()
Instantiates a new model. |
Method Summary | |
---|---|
void |
addListener(Model.Listener listener)
Adds a listener. |
protected void |
refreshListeners()
send a Refresh message to all listeners. |
void |
remove()
Removes the listeners. |
void |
removeListener(Model.Listener listener)
Removes a listener. |
protected void |
removeListeners()
notify all listeners that the model is being destroyed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Model()
Method Detail |
---|
public void addListener(Model.Listener listener)
listener
- the listenerpublic void removeListener(Model.Listener listener)
listener
- the listenerprotected void refreshListeners()
protected void removeListeners()
public void remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |