com.swfm.mica.view
Interface MiiController

All Known Implementing Classes:
MiController

public interface MiiController

This interface manages the saving an loading of MiiModelEntitys and converting them to/from graphics objects.

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

Method Summary
 void closeOpenDocument()
          Closes the document this is managing.
 MiiController copy()
          Copies this controller.
 MiiModelIOFormatManager getIOFormatManager()
          Gets the IO manager.
 MiiModelIOManager getIOManager()
           
 MiiModelEntity getOpenDocument()
          Gets the document this is managing.
 MiPart getView()
           
 MiiViewManager getViewManager()
          Gets the view manager.
 void load()
          Loads the view with graphics generated by the viewManager from the model generated by the ioFormatManager from the data loaded by the ioManager.
 void save()
          Saves the view of graphics converted by the viewManager to the model to be saved by the ioFormatManager to the data stream managed by the ioManager.
 void saveAs(MiiModelIOFormatManager outputIOFormatManager, MiiModelIOManager outputIOManager)
          Saves the contents of the previously assigned view.
 void setIOFormatManager(MiiModelIOFormatManager manager)
          Sets the IO manager.
 void setIOManager(MiiModelIOManager manager)
           
 void setOpenDocument(MiiModelEntity doc)
          Sets the document this is managing and hands off the doc to the ViewManager, if any, which populates the view it manages with a graphics representation of the doc.
 void setView(MiPart view)
           
 void setViewManager(MiiViewManager manager)
          Sets the view manager.
 

Method Detail

copy

public MiiController copy()
Copies this controller.

Returns:
the copy

setOpenDocument

public void setOpenDocument(MiiModelEntity doc)
Sets the document this is managing and hands off the doc to the ViewManager, if any, which populates the view it manages with a graphics representation of the doc.

Parameters:
doc - the open document

getOpenDocument

public MiiModelEntity getOpenDocument()
Gets the document this is managing.

Returns:
the open document

closeOpenDocument

public void closeOpenDocument()
Closes the document this is managing.

Returns:
the open document

setIOFormatManager

public void setIOFormatManager(MiiModelIOFormatManager manager)
Sets the IO manager.

Parameters:
manager - the IO manager

getIOFormatManager

public MiiModelIOFormatManager getIOFormatManager()
Gets the IO manager.

Returns:
the IO manager

setViewManager

public void setViewManager(MiiViewManager manager)
Sets the view manager.

Parameters:
manager - the view manager

getViewManager

public MiiViewManager getViewManager()
Gets the view manager.

Returns:
the view manager

setIOManager

public void setIOManager(MiiModelIOManager manager)

getIOManager

public MiiModelIOManager getIOManager()

setView

public void setView(MiPart view)

getView

public MiPart getView()

load

public void load()
          throws java.lang.Exception
Loads the view with graphics generated by the viewManager from the model generated by the ioFormatManager from the data loaded by the ioManager.

Throws:
java.lang.Exception

save

public void save()
          throws java.lang.Exception
Saves the view of graphics converted by the viewManager to the model to be saved by the ioFormatManager to the data stream managed by the ioManager.

Throws:
java.lang.Exception

saveAs

public void saveAs(MiiModelIOFormatManager outputIOFormatManager,
                   MiiModelIOManager outputIOManager)
            throws java.lang.Exception
Saves the contents of the previously assigned view.

Parameters:
outputIOFormatManager - format to save the contents in
outputIOManager - the stream
Throws:
java.lang.Exception