public interface Application
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
actions()
Get an iterator over the names of the actions that are
contained by this application.
|
void |
addAction(javax.swing.Action action)
Add an action to the table of actions.
|
void |
addDocument(Document d)
Add a document to the application and notify document
listeners.
|
void |
addDocumentListener(javax.swing.event.ListDataListener listener)
Add a document listener to this application.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this application.
|
void |
addView(View d)
Add a view to the application and notify view
listeners.
|
void |
addViewListener(javax.swing.event.ListDataListener listener)
Add a view listener to this application.
|
boolean |
closeDocument(Document d)
Try to close the given document, respecting the
storage policy.
|
boolean |
closeView(View v)
Try to close the given view, respecting the
storage policy.
|
View |
createView(Document d)
Create a view to display the given document.
|
java.util.List |
documentList()
Get an iterator over all documents
|
javax.swing.Action |
getAction(java.lang.String name)
Get an action by name.
|
AppContext |
getAppContext()
Get the context that this application draws itself in.
|
java.awt.datatransfer.Clipboard |
getClipboard()
Return the clipboard used by this application.
|
View |
getCurrentView()
Get the current view.
|
DocumentFactory |
getDocumentFactory()
Get the factory that this application uses to create document
objects.
|
StoragePolicy |
getStoragePolicy()
Get the storage policy of this application.
|
java.lang.String |
getTitle()
Get the title of this application
|
boolean |
isVisible()
Test whether the application frame is visible.
|
void |
removeDocument(Document d)
This method should only be called by storage policies.
|
void |
removeDocumentListener(javax.swing.event.ListDataListener listener)
Remove a document list listener from this application.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this application.
|
void |
removeView(View v)
This method should only be called by storage policies.
|
void |
removeViewListener(javax.swing.event.ListDataListener listener)
Remove a view list listener from this application.
|
void |
setCurrentView(View v)
Set the given view to be the current view.
|
void |
setVisible(boolean visible)
Set the visibility of the application's frame
|
void |
showError(java.lang.String op,
java.lang.Exception e)
Report that an exception occurred to the user.
|
java.util.List |
viewList()
Get an iterator over all views
|
java.util.Iterator actions()
void addAction(javax.swing.Action action)
void addDocument(Document d)
void addDocumentListener(javax.swing.event.ListDataListener listener)
void addView(View d)
void addViewListener(javax.swing.event.ListDataListener listener)
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
boolean closeDocument(Document d)
boolean closeView(View v)
View createView(Document d)
java.util.List documentList()
java.util.List viewList()
javax.swing.Action getAction(java.lang.String name)
View getCurrentView()
java.awt.datatransfer.Clipboard getClipboard()
DocumentFactory getDocumentFactory()
AppContext getAppContext()
StoragePolicy getStoragePolicy()
java.lang.String getTitle()
boolean isVisible()
void removeDocument(Document d)
void removeView(View v)
void removeDocumentListener(javax.swing.event.ListDataListener listener)
void removeViewListener(javax.swing.event.ListDataListener listener)
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
void setCurrentView(View v)
void setVisible(boolean visible)
void showError(java.lang.String op, java.lang.Exception e)