| edu.rice.cs.drjava.model.SingleDisplayModel
All known Subclasses: edu.rice.cs.drjava.model.AbstractGlobalModel,
SingleDisplayModel | public interface SingleDisplayModel extends GlobalModel(Code) | | A GlobalModel that enforces invariants associated with having
one active document at a time.
Invariants:
-
SingleDisplayModel.getOpenDefinitionsDocuments will always return an array of
at least size 1.
- (follows from previous) If there is ever no document in the model,
a new one will be created.
- There is always exactly one active document, which can be get/set
via
SingleDisplayModel.getActiveDocument and
SingleDisplayModel.setActiveDocument .
Other functions added by this class:
- When calling
SingleDisplayModel.openFile , if there is currently only one open
document, and it is untitled and unchanged, it will be closed after the
new document is opened. This means that, in one atomic transaction, the
model goes from having one totally empty document open to having one
document (the requested one) open.
version: $Id: SingleDisplayModel.java 4257 2007-09-12 00:29:25Z mgricken $ |
closeAllFilesOnQuit | public boolean closeAllFilesOnQuit()(Code) | | |
closeFiles | public boolean closeFiles(List<OpenDefinitionsDocument> docList)(Code) | | Shared code between close project and close All files which only sets the new active document after all documents
to be closed have been closed.
Parameters: docList - the list of files to close whether all files were closed |
dispose | public void dispose()(Code) | | |
disposeExternalResources | public void disposeExternalResources()(Code) | | Disposes of external resources, e.g. other VMs.
|
getDocCollectionWidget | public java.awt.Container getDocCollectionWidget()(Code) | | the IDocumentNavigator container expressed as an AWT component. |
refreshActiveDocument | public void refreshActiveDocument()(Code) | | Invokes the activeDocumentChanged method in the global listener on the argument _activeDocument.
|
setActiveDocument | public void setActiveDocument(OpenDefinitionsDocument doc)(Code) | | Sets the currently active document by updating the selection model.
Parameters: doc - Document to set as active |
setActiveFirstDocument | public void setActiveFirstDocument()(Code) | | |
setActiveNextDocument | public void setActiveNextDocument()(Code) | | Sets the active document to be the next one in the list.
|
setActivePreviousDocument | public void setActivePreviousDocument()(Code) | | Sets the active document to be the previous one in the list.
|
|
|