Class com.bdnm.mvc.SelectionHolder
All Packages Class Hierarchy This Package Previous Next Index
Class com.bdnm.mvc.SelectionHolder
java.lang.Object
|
+----java.util.Observable
|
+----com.bdnm.mvc.ValueModel
|
+----com.bdnm.mvc.SelectionHolder
- public class SelectionHolder
- extends ValueModel
- implements Observer
-
listModel
- This is the list model we are observing and reacting to.
-
SelectionHolder(SelectionInList)
- This is how you create one of these.
-
addObserver(Observer)
- Adds an observer to the observer list.
-
deleteObserver(Observer)
- Deletes an observer from the observer list.
-
deleteObservers()
- Deletes observers from the observer list.
-
getValue()
- Called to get the current value this object represents.
-
setValue(Object)
- Called to set the current value, which must
be cast to an Object.
-
update(Observable, Object)
- The reference model changed, so propagate the update.
listModel
protected SelectionInList listModel
- This is the list model we are observing and reacting to.
SelectionHolder
public SelectionHolder(SelectionInList aListModel)
- This is how you create one of these. Usually done
through SelectionInList#selectionHolder, but a direct
call will work too.
- Parameters:
- aListModel - the model I am reflecting
getValue
public Object getValue()
- Called to get the current value this object represents.
Necessary to implement Valuable.
- Returns:
- the current value, which is cast to an Object.
this will be either a single object or null
- Overrides:
- getValue in class ValueModel
setValue
public void setValue(Object newValue)
- Called to set the current value, which must
be cast to an Object. Necessary to implement
Valuable.
- Parameters:
- newValue - the new value to set, which should
be either a single object or null.
- Overrides:
- setValue in class ValueModel
update
public void update(Observable o,
Object arg)
- The reference model changed, so propagate the update.
- Parameters:
- o - should be the observable that sent the update
- arg - the argument being notified
addObserver
public synchronized void addObserver(Observer o)
- Adds an observer to the observer list.
- Parameters:
- o - the observer to be added
- Overrides:
- addObserver in class Observable
deleteObserver
public synchronized void deleteObserver(Observer o)
- Deletes an observer from the observer list.
- Parameters:
- o - the observer to be deleted
- Overrides:
- deleteObserver in class Observable
deleteObservers
public synchronized void deleteObservers()
- Deletes observers from the observer list.
- Overrides:
- deleteObservers in class Observable
All Packages Class Hierarchy This Package Previous Next Index