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

Variable Index

 o listModel
This is the list model we are observing and reacting to.

Constructor Index

 o SelectionHolder(SelectionInList)
This is how you create one of these.

Method Index

 o addObserver(Observer)
Adds an observer to the observer list.
 o deleteObserver(Observer)
Deletes an observer from the observer list.
 o deleteObservers()
Deletes observers from the observer list.
 o getValue()
Called to get the current value this object represents.
 o setValue(Object)
Called to set the current value, which must be cast to an Object.
 o update(Observable, Object)
The reference model changed, so propagate the update.

Variables

 o listModel
  protected SelectionInList listModel
This is the list model we are observing and reacting to.

Constructors

 o 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

Methods

 o 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
 o 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
 o 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
 o 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
 o 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
 o 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