|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.gui.tutorial.AbstractApplication
diva.gui.tutorial.MDIApplication
public abstract class MDIApplication
An abstract superclass for applications that use an MDI (multiple document interface) style of presentation. This class manages the interaction between documents of the application, and the frame that they are displayed in. For example, keeping documents and views in sync, handling focus changes, and so on. The context must implement MDIContext for this to work properly. Note: this application only manages one view per document. If you have multiple views per document, you will need to implement the view-document mapping yourself.
Nested Class Summary | |
---|---|
private class |
MDIApplication.MDIViewListener
|
Field Summary | |
---|---|
private java.util.HashMap |
_viewMap
A mapping from content panes to views |
Constructor Summary | |
---|---|
MDIApplication(MDIContext context)
Create an MDI application in the given MDI context |
Method Summary | |
---|---|
void |
addView(View v)
Add a view to the list of views currently known by this application. |
abstract View |
createView(Document d)
Given a document, create a new view which displays that document. |
MDIContext |
getMDIContext()
Get the MDI frame -- type-specific version of getApplicationFrame(). |
View |
getView(javax.swing.JComponent c)
Get the Document displayed by the given component. |
void |
removeView(View v)
Remove a view from the list of view currently known by this application. |
void |
setCurrentView(View v)
Set the given document to be the current document, and raise the internal window that corresponds to that component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.HashMap _viewMap
Constructor Detail |
---|
public MDIApplication(MDIContext context)
Method Detail |
---|
public void addView(View v)
AbstractApplication
addView
in interface Application
addView
in class AbstractApplication
public abstract View createView(Document d)
createView
in interface Application
createView
in class AbstractApplication
public MDIContext getMDIContext()
public View getView(javax.swing.JComponent c)
public void removeView(View v)
removeView
in interface Application
removeView
in class AbstractApplication
public void setCurrentView(View v)
setCurrentView
in interface Application
setCurrentView
in class AbstractApplication
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |