ides.api.plugin.model
Interface DESModelType


public interface DESModelType

Descriptor for a DES model type. A plugin wishing to implement a new DES model type should implement this interface and the register it with the ModelManager.

Author:
Lenko Grigorov
See Also:
ModelManager.registerModel(DESModelType)

Method Summary
 DESModel createModel(java.lang.String name)
          Creates and returns a new model of this type.
 java.lang.String getDescription()
          Returns a human-readable description of this type of model.
 java.awt.Image getIcon()
          Returns an small image (icon) which can be displayed to the user to identify the model type.
 java.lang.Class<?> getMainPerspective()
          Returns the "main" perspective of models of this type.
 java.lang.Class<?>[] getModelPerspectives()
          Returns all the DES model perspectives which models of this type implement.
 

Method Detail

getModelPerspectives

java.lang.Class<?>[] getModelPerspectives()
Returns all the DES model perspectives which models of this type implement. For example, if the type implements an FSA, it should return FSAModel. Custom perspectives can be returned as well.

Returns:
all DES model perspectives which models of this type implement

getMainPerspective

java.lang.Class<?> getMainPerspective()
Returns the "main" perspective of models of this type. For example, if the model of an FSA also provides an EventSet perspective for access to its event set, this method should return the FSAModel perspective since this is the main perspective of the model.

Returns:
the perspective for the main purpose of models of this type

getDescription

java.lang.String getDescription()
Returns a human-readable description of this type of model. For example, "Petri net".

Returns:
human-readable description of the model type

getIcon

java.awt.Image getIcon()
Returns an small image (icon) which can be displayed to the user to identify the model type.

Returns:
an icon to serve as identification of the model type in the UI

createModel

DESModel createModel(java.lang.String name)
Creates and returns a new model of this type.

Parameters:
name - the name which will be used to identify the model instance. Preferably a unique string.
Returns:
the new model