com.swfm.mica.view
Class MiPaletteViewManager

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

public class MiPaletteViewManager
extends MiGraphicsBaseViewManager
implements MiiViewManager, MiiTypes, MiiCommandNames, MiiActionHandler, MiiActionTypes

This class implements the MiiViewManager interface and supports the loading and saving of graphics palettes to and from MiiModelDocuments. The target must be an instance of MiEditorPalette.

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

Field Summary
               
Constructor Summary
MiPaletteViewManager()
          Constructs a new MiPaletteViewManager.
 
Method Summary
static MiViewManagerPostGraphicsCreationHandler getDefaultPostGraphicsCreationHandler()
           
 MiiModelEntity getModel()
          Converts the graphics found in the target container to a MiiModelEntity.
static void setDefaultPostGraphicsCreationHandler(MiViewManagerPostGraphicsCreationHandler handler)
           
 void setModel(MiiModelEntity document)
          Loads the target container with graphics as specified in the given document.
 void setView(MiPart target)
          Sets the target container.
 
Methods inherited from class com.swfm.mica.view.MiGraphicsBaseViewManager
getPostGraphicsCreationHandler, getView, processAction, setPostGraphicsCreationHandler
 
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
getView
 
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
 
Methods inherited from interface com.swfm.mica.core.MiiActionHandler
processAction
 

Constructor Detail

MiPaletteViewManager

public MiPaletteViewManager()
Constructs a new MiPaletteViewManager.

Method Detail

setDefaultPostGraphicsCreationHandler

public static void setDefaultPostGraphicsCreationHandler(MiViewManagerPostGraphicsCreationHandler handler)

getDefaultPostGraphicsCreationHandler

public static MiViewManagerPostGraphicsCreationHandler getDefaultPostGraphicsCreationHandler()

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 MiEditorPalette.

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

setModel

public void setModel(MiiModelEntity document)
Loads the target container with graphics as specified in the given document.

Specified by:
setModel in interface MiiViewManager
Parameters:
document - the document
See Also:
setView(com.swfm.mica.core.MiPart)

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
Overrides:
getModel in class MiGraphicsBaseViewManager
Returns:
the document
See Also:
setView(com.swfm.mica.core.MiPart)