edu.usc.cse.desi.model.view
Class AbstractViewModel

java.lang.Object
  extended byedu.usc.cse.desi.model.AbstractDESIModel
      extended byedu.usc.cse.desi.model.view.AbstractViewModel
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
AbstractConnectionViewModel, AbstractNodeViewModel, DESIViewModel

public abstract class AbstractViewModel
extends AbstractDESIModel

This is the super class of all view model objects. It contains a AbstractDataModel object that it refers to and many methods that are delegated to that AbstractDataModel.

Author:
NeLs Started on Aug 11, 2004
See Also:
Serialized Form

Field Summary
protected  AbstractDataModel myDataModel
           
 
Fields inherited from class edu.usc.cse.desi.model.AbstractDESIModel
listeners
 
Constructor Summary
AbstractViewModel()
           
 
Method Summary
 AbstractDataModel getMyDataModel()
           
 PropertyInitializer getMyPropetyInitializer()
          Gets the property initializer from the data object.
 java.util.Collection getProperties()
          Returns the properties of the data model.
 java.lang.String getPropertyDisplayName(java.lang.String prop_name)
          Returns the display name for a property as returned by the data model.
 java.lang.Object getPropertyValue(java.lang.String prop_name)
          Returns the property value from the data model.
 boolean hasProperty(java.lang.String prop_name)
          Returns true if the data model has a given property.
 void reinitialize()
          I overrode this method:
 void setPropertyValue(java.lang.String prop_name, java.lang.Object value)
          Sets a given property value of the data model.
 
Methods inherited from class edu.usc.cse.desi.model.AbstractDESIModel
addPropertyChangeListener, firePropertyChange, propertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myDataModel

protected AbstractDataModel myDataModel
Constructor Detail

AbstractViewModel

public AbstractViewModel()
Method Detail

getMyDataModel

public AbstractDataModel getMyDataModel()

reinitialize

public void reinitialize()
I overrode this method:

Overrides:
reinitialize in class AbstractDESIModel
See Also:
AbstractDESIModel.reinitialize()

getMyPropetyInitializer

public PropertyInitializer getMyPropetyInitializer()
Gets the property initializer from the data object.

Returns:

getProperties

public java.util.Collection getProperties()
Returns the properties of the data model.

Returns:

getPropertyDisplayName

public java.lang.String getPropertyDisplayName(java.lang.String prop_name)
                                        throws PropertyNotFoundException
Returns the display name for a property as returned by the data model.

Parameters:
prop_name -
Returns:
Throws:
PropertyNotFoundException

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String prop_name)
                                  throws PropertyNotFoundException
Returns the property value from the data model.

Parameters:
prop_name -
Returns:
Throws:
PropertyNotFoundException

hasProperty

public boolean hasProperty(java.lang.String prop_name)
Returns true if the data model has a given property.

Parameters:
prop_name -
Returns:

setPropertyValue

public void setPropertyValue(java.lang.String prop_name,
                             java.lang.Object value)
                      throws PropertyNotFoundException,
                             java.lang.ClassCastException
Sets a given property value of the data model.

Parameters:
prop_name -
value -
Throws:
PropertyNotFoundException
java.lang.ClassCastException