org.scopemvc.core
Class EditorManager

java.lang.Object
  |
  +--org.scopemvc.core.ModelManager
        |
        +--org.scopemvc.core.EditorManager
Direct Known Subclasses:
BeansEditorManager

public abstract class EditorManager
extends ModelManager

EditorManager is a ModelManager that handles the creation of appropriate Viewer and Editor Views for the properties of model objects for a specific view type. An implementation for JavaBean model objects is provided in BeansEditorManager.

The viewtype passed into this manager is arbitrary and identifies the particular type of View an application is interested in. For example, "swing" or "xml" or "awt". See PropertyEditorFactory.

Version:
$Revision: 1.9 $ $Date: 2002/09/12 10:51:03 $
Author:
Steve Meyfroidt

Constructor Summary
EditorManager()
           
 
Method Summary
abstract  View getEditor(java.lang.String inViewType, java.lang.Object inModel, Selector inSelector)
          Get the editor for the view type and the property in the model.
static EditorManager getInstance(java.lang.Class inModelClass)
          Create an EditorManager for the model class
static EditorManager getInstance(java.lang.Object inModel)
          Create an EditorManager for the model
abstract  View getViewer(java.lang.String inViewType, java.lang.Object inModel, Selector inSelector)
          Get the viewer for the view type and the property in the model.
 
Methods inherited from class org.scopemvc.core.ModelManager
getModelClass, make
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorManager

public EditorManager()
Method Detail

getInstance

public static EditorManager getInstance(java.lang.Class inModelClass)
Create an EditorManager for the model class

Parameters:
inModelClass - The model class
Returns:
The EditorManager instance

getInstance

public static EditorManager getInstance(java.lang.Object inModel)
Create an EditorManager for the model

Parameters:
inModel - The model
Returns:
The EditorManager instance

getEditor

public abstract View getEditor(java.lang.String inViewType,
                               java.lang.Object inModel,
                               Selector inSelector)
Get the editor for the view type and the property in the model.

Parameters:
inViewType - type of view this editor is needed for. Defaults are provided for "swing" in DefaultScopeConfig that the BeansEditorManager uses.
inModel - model for whose property the editor is required.
inSelector - identify the property that the editor is needed for.
Returns:
a View used to edit the passed model's property for the passed view type.

getViewer

public abstract View getViewer(java.lang.String inViewType,
                               java.lang.Object inModel,
                               Selector inSelector)
Get the viewer for the view type and the property in the model.

Parameters:
inViewType - type of view this viewer is needed for. Defaults are provided for "swing" in DefaultScopeConfig that the BeansEditorManager uses.
inModel - model for whose property the viewer is required.
inSelector - identify the property that the viewer is needed for.
Returns:
a View used to view the passed model's property for the passed view type.


Copyright © 2000-2002 The Scope Team. All Rights Reserved.