com.swfm.mica.view
Class MiGraphicsBaseViewManager

java.lang.Object
  extended bycom.swfm.mica.model.MiModelEntity
      extended bycom.swfm.mica.view.MiViewManager
          extended bycom.swfm.mica.view.MiGraphicsBaseViewManager
All Implemented Interfaces:
MiiActionHandler, MiiActionTypes, MiiCommandNames, MiiModelEntity, MiiModelTypes, MiiNames, MiiPropertyTypes, MiiTypes, MiiViewManager
Direct Known Subclasses:
MiGraphicsTreeViewManager, MiGraphicsViewManager, MiPaletteViewManager

public abstract class MiGraphicsBaseViewManager
extends MiViewManager
implements MiiViewManager, MiiTypes, MiiCommandNames, MiiModelTypes, MiiActionHandler, MiiActionTypes

This class implements the MiiViewManager interface. It supports a wide range of graphics typically used in graphics editors and palettes. It assumes that the precise type of the target will be taken into account target by a subclass of this abstract class.

Version:
%I% %G%
Author:
Michael L. Davis

Field Summary
               
Constructor Summary
MiGraphicsBaseViewManager()
          Constructs a new MiGraphicsBaseViewManager.
 
Method Summary
 MiiModelEntity getModel()
          Converts the graphics found in the target container to a MiiModelEntity.
 MiViewManagerPostGraphicsCreationHandler getPostGraphicsCreationHandler()
           
 MiPart getView()
          Gets the target container.
 boolean processAction(MiiAction action)
          Processes the given action.
 void setPostGraphicsCreationHandler(MiViewManagerPostGraphicsCreationHandler handler)
           
 void setView(MiPart target)
          Sets the target container.
 
Methods inherited from class com.swfm.mica.view.MiViewManager
getHasChanged, getWarningMessagesEnabled, isViewOnly, setHasChanged, setViewOnly, setWarningMessagesEnabled
 
Methods inherited from class com.swfm.mica.model.MiModelEntity
appendModelChangeHandler, appendModelEntity, appendModelRelation, appendPropertyChangeHandler, copy, copy, createModelEntity, createModelRelation, deepCopy, deepCopy, deleteSelf, dispatchModelChangeEvent, dispatchPropertyChange, dispatchPropertyChangeEvent, dump, dump, equals, equalsProperties, getChild, getChildren, getDefaultPropertyValue, getEditingPermissions, getIgnoreCase, getIndexOfModelEntity, getLocation, getModelChangeHandler, getModelEntities, getModelEntity, getModelEntity, getModelRelations, getName, getNumberOfModelChangeHandlers, getNumberOfModelEntities, getNumberOfPropertyChangeHandlers, getParent, getPropertiesAreOrdered, getPropertyChangeHandler, getPropertyDescriptions, getPropertyNames, getPropertyValue, getTitle, getType, getUserData, hasUserData, insertModelEntity, insertModelRelation, isObservedProperty, isToCopyEntitysRelationsWhenDeepCopyEntity, removeAllModelEntities, removeAllModelRelations, removeAllProperties, removeModelChangeHandler, removeModelEntity, removeModelRelation, removeProperty, removePropertyChangeHandler, removeSelf, replaceSelf, setIgnoreCase, setLocation, setModelChangeEventDispatchingEnabled, setName, setParent, setPropertiesAreOrdered, setPropertiesToDefaultValues, setPropertyChangeEventDispatchingEnabled, setPropertyDescriptions, setPropertyValue, setTitle, setToCopyEntitysRelationsWhenDeepCopyEntity, setType, toString, toString, validateModelEntity, validateModelRelation, validatePropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.swfm.mica.view.MiiViewManager
setModel
 
Methods inherited from interface com.swfm.mica.model.MiiModelEntity
appendModelChangeHandler, appendModelEntity, appendModelRelation, appendPropertyChangeHandler, copy, copy, createModelEntity, createModelRelation, deepCopy, deepCopy, deleteSelf, equals, equalsProperties, getChild, getChildren, getEditingPermissions, getIgnoreCase, getIndexOfModelEntity, getLocation, getModelChangeHandler, getModelEntities, getModelEntity, getModelEntity, getModelRelations, getName, getNumberOfModelChangeHandlers, getNumberOfModelEntities, getNumberOfPropertyChangeHandlers, getParent, getPropertiesAreOrdered, getPropertyChangeHandler, getPropertyDescriptions, getPropertyNames, getPropertyValue, getTitle, getType, getUserData, hasUserData, insertModelEntity, insertModelRelation, removeAllModelEntities, removeAllModelRelations, removeAllProperties, removeModelChangeHandler, removeModelEntity, removeModelRelation, removeProperty, removePropertyChangeHandler, removeSelf, replaceSelf, setIgnoreCase, setLocation, setModelChangeEventDispatchingEnabled, setName, setParent, setPropertiesAreOrdered, setPropertyChangeEventDispatchingEnabled, setPropertyDescriptions, setPropertyValue, setTitle, setType, validateModelEntity, validateModelRelation, validatePropertyValue
 

Constructor Detail

MiGraphicsBaseViewManager

public MiGraphicsBaseViewManager()
Constructs a new MiGraphicsBaseViewManager.

Method Detail

setPostGraphicsCreationHandler

public void setPostGraphicsCreationHandler(MiViewManagerPostGraphicsCreationHandler handler)

getPostGraphicsCreationHandler

public MiViewManagerPostGraphicsCreationHandler getPostGraphicsCreationHandler()

setView

public void setView(MiPart target)
Sets the target container. This container will be loaded with graphics by the #setModel command and will be converted to a MiiModelEntity by the #getModel command. The target must be an instanceof MiEditor.

Specified by:
setView in interface MiiViewManager
Parameters:
target - the target container
See Also:
getView()

getView

public MiPart getView()
Gets the target container.

Specified by:
getView in interface MiiViewManager

processAction

public boolean processAction(MiiAction action)
Processes the given action. The actions supported are:
    Mi_TRANSACTION_MANAGER_CHANGED_ACTION
    Mi_DATA_IMPORT_ACTION
 

Specified by:
processAction in interface MiiActionHandler
Overrides:
processAction in class MiModelEntity
Parameters:
action - the action to process
Returns:
false if consumes the action

getModel

public MiiModelEntity getModel()
Converts the graphics found in the target container to a MiiModelEntity. This creates entities in the given document from the graphics in the target.

Specified by:
getModel in interface MiiViewManager
Returns:
the document
See Also:
setView(com.swfm.mica.core.MiPart)