CESE 1.4.7

com.simulogic.cese
Class ModelInfo

java.lang.Object
  extended by com.simulogic.cese.ModelInfo

public class ModelInfo
extends java.lang.Object

Encapsulates a model item that can be instantiated A model also knows how to instantiate itself.


Field Summary
static DataExport export
          Exporter for this environment
 
Constructor Summary
ModelInfo()
          Default constructor
ModelInfo(java.lang.Class cls)
          Constructs a model item from a class.
ModelInfo(java.lang.Object obj, java.lang.String beanName)
          Constructs a model item from a serialized bean.
ModelInfo(java.lang.String beanName)
          Constructs a model item from the fully qualified bean name
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 java.lang.Class getBeanClass()
          Returns the class of this bean
 java.beans.BeanDescriptor getBeanDescriptor()
          Returns the beandescriptor of this bean
 java.beans.BeanInfo getBeanInfo()
          Returns the beaninfo of this bean
 java.lang.String getBeanName()
          Returns the name of this bean
 java.awt.Component getCustomizer()
          Gets the customizer for the current object
 java.lang.String getDisplayName()
          Returns the bean display name from the descriptor
 SimulationHistory getHistory()
          Returns simulation history
 java.awt.Image getIcon(int type)
          Retrieves the icon for the beaninfo
 com.javable.cese.templates.AbstractAPModel getModel()
          Returns current model
 ModelPropertyDescriptor[] getModelPropertyDescriptors()
          Gets the beans PropertyDescriptors.
 java.lang.String getName()
          Returns the bean name from descriptor
 java.lang.String getShortDescription()
          Returns the bean short description from the descriptor
 boolean hasCustomizer()
          Returns a flag indicating if the encapsulated object has a customizer
 boolean isModified()
          Returns modified status
 void newModel()
          Creates a new bean from the encapsulated class.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void setHistory(SimulationHistory history)
          Sets new simulation history
 void setModel(java.lang.Object b)
          Sets new model
 void setModified(boolean modified)
          Sets modified status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

export

public static DataExport export
Exporter for this environment

Constructor Detail

ModelInfo

public ModelInfo()
Default constructor


ModelInfo

public ModelInfo(java.lang.String beanName)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Constructs a model item from the fully qualified bean name

Parameters:
beanName - the name of the bean that this item represents.
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ModelInfo

public ModelInfo(java.lang.Object obj,
                 java.lang.String beanName)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Constructs a model item from a serialized bean.

Parameters:
obj - an instance of the deserialized bean.
beanName - the name of the resouce without the extension
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ModelInfo

public ModelInfo(java.lang.Class cls)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Constructs a model item from a class.

Parameters:
cls - a valid java bean class.
Throws:
java.io.IOException
java.lang.ClassNotFoundException
Method Detail

newModel

public void newModel()
              throws java.io.IOException,
                     java.lang.ClassNotFoundException
Creates a new bean from the encapsulated class. Sets some initial values

Throws:
java.lang.ClassNotFoundException
java.io.IOException
See Also:
Beans

getModel

public com.javable.cese.templates.AbstractAPModel getModel()
Returns current model

Returns:
model

setModel

public void setModel(java.lang.Object b)
Sets new model

Parameters:
b - new model

getBeanName

public java.lang.String getBeanName()
Returns the name of this bean

Returns:
bean name

getBeanClass

public java.lang.Class getBeanClass()
Returns the class of this bean

Returns:
bean class

getBeanInfo

public java.beans.BeanInfo getBeanInfo()
Returns the beaninfo of this bean

Returns:
bean beaninfo

getBeanDescriptor

public java.beans.BeanDescriptor getBeanDescriptor()
Returns the beandescriptor of this bean

Returns:
bean beandescriptor

getIcon

public java.awt.Image getIcon(int type)
Retrieves the icon for the beaninfo

Parameters:
type - - One of BeanInfo.ICON_
Returns:
bean icon

getName

public java.lang.String getName()
Returns the bean name from descriptor

Returns:
bean name

getDisplayName

public java.lang.String getDisplayName()
Returns the bean display name from the descriptor

Returns:
bean display name

getShortDescription

public java.lang.String getShortDescription()
Returns the bean short description from the descriptor

Returns:
bean short description

hasCustomizer

public boolean hasCustomizer()
Returns a flag indicating if the encapsulated object has a customizer

Returns:
true if has customizer

getCustomizer

public java.awt.Component getCustomizer()
Gets the customizer for the current object

Returns:
New instance of the customizer or null if there isn't a customizer

getModelPropertyDescriptors

public ModelPropertyDescriptor[] getModelPropertyDescriptors()
Gets the beans PropertyDescriptors.

Returns:
An array of PropertyDescriptors describing the editable properties supported by this bean. May return null if the information should be obtained by automatic analysis.

getHistory

public SimulationHistory getHistory()
Returns simulation history

Returns:
simulation history

setHistory

public void setHistory(SimulationHistory history)
Sets new simulation history

Parameters:
history - simulation history

isModified

public boolean isModified()
Returns modified status

Returns:
modified status

setModified

public void setModified(boolean modified)
Sets modified status

Parameters:
modified - modified status

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

CESE 1.4.7

Copyright (c) 1999 - 2007 Cell Electrophysiology Simulation Environment (CESE). All rights reserved.