|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nz.ac.waikato.mcennis.rat.graph.model.ModelShell
public class ModelShell
Shell class providing basic MVC support to models. Models must define what the enums for each type of change and manually fire the change method, but this class handles all other bookkeeping.
Field Summary | |
---|---|
protected java.util.LinkedList<Listener> |
listener
|
Constructor Summary | |
---|---|
ModelShell()
Creates a new instance of ModelShell |
Method Summary | |
---|---|
void |
addListener(Listener l)
Add a listener to this model |
protected void |
fireChange(int type,
int argument)
notifies all listeners of changes of the given type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.LinkedList<Listener> listener
Constructor Detail |
---|
public ModelShell()
Method Detail |
---|
protected void fireChange(int type, int argument)
type
- kind of change that has occured, defined by each subclass.public void addListener(Listener l)
addListener
in interface Model
l
- object that wants to listens to changes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |