Package diva.gui.tutorial
Class MDIApplicationTutorial
- java.lang.Object
-
- diva.gui.tutorial.AbstractApplication
-
- diva.gui.tutorial.MDIApplication
-
- diva.gui.tutorial.MDIApplicationTutorial
-
- All Implemented Interfaces:
Application
public class MDIApplicationTutorial extends MDIApplication
A simple MDI text editor. This application uses the MDIApplication base class to provide a separate internal frame associated with each document. This class is similar in many ways to the ApplicationTutorial. The code in the initializeApp(), initializeMenuBar(), and initializeToolBar() methods is the same in both.Note that there appears to be a bug in jdk1.2 with the keyboard handling in JEditorPane. Maximizing one of the internal frames loses the event hooks that the JEditorPane uses for keyboard input. This is fixed in jdk1.3.
- Version:
- $Id$
- Author:
- Steve Neuendorffer
-
-
Constructor Summary
Constructors Constructor Description MDIApplicationTutorial(DesktopContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ViewcreateView(Document d)Create a view on the given document.java.lang.StringgetTitle()Get the title of this applicationvoidinitializeApp()Initialize the application.voidinitializeMenuBar(javax.swing.JMenuBar menuBar)Initialize the menu barvoidinitializeToolBar(javax.swing.JToolBar tb)Initialize the given toolbar.static voidmain(java.lang.String[] argv)Construct a new instance of the Tutorial, running in a new application context.-
Methods inherited from class diva.gui.tutorial.MDIApplication
addView, getMDIContext, getView, removeView, setCurrentView
-
Methods inherited from class diva.gui.tutorial.AbstractApplication
actions, addAction, addDocument, addDocumentListener, addMenuItem, addMenuItem, addPropertyChangeListener, addToolBarButton, addToolBarButton, addViewListener, closeDocument, closeView, documentList, getAction, getAppContext, getClipboard, getCurrentView, getDocumentFactory, getResources, getStoragePolicy, isVisible, removeDocument, removeDocumentListener, removePropertyChangeListener, removeViewListener, setAppContext, setClipboard, setDocumentFactory, setStoragePolicy, setVisible, showError, viewList, viewList
-
-
-
-
Constructor Detail
-
MDIApplicationTutorial
public MDIApplicationTutorial(DesktopContext context)
-
-
Method Detail
-
main
public static void main(java.lang.String[] argv)
Construct a new instance of the Tutorial, running in a new application context.
-
createView
public View createView(Document d)
Create a view on the given document.- Specified by:
createViewin interfaceApplication- Specified by:
createViewin classMDIApplication
-
getTitle
public java.lang.String getTitle()
Get the title of this application- Specified by:
getTitlein interfaceApplication- Specified by:
getTitlein classAbstractApplication
-
initializeApp
public void initializeApp()
Initialize the application.
-
initializeMenuBar
public void initializeMenuBar(javax.swing.JMenuBar menuBar)
Initialize the menu bar
-
initializeToolBar
public void initializeToolBar(javax.swing.JToolBar tb)
Initialize the given toolbar. Image icons will be obtained from the ApplicationResources object and added to the actions. Note that the image icons are not added to the actions -- if we did that, the icons would appear in the menus, which I suppose is a neat trick but completely useless.
-
-