Inheritance diagram for com.arcle.rmt.j2se.swing.AbstractMainWindow:
Public Member Functions | |
void | init () |
void | start () |
void | stop () |
void | destroy () |
void | update (Observable source, Object param) |
boolean | isDirty () |
Protected Member Functions | |
void | cmFileNew () |
Handles user command to create a new, blank document. | |
void | cmFileOpen () |
Handles user command to open a file from disk. | |
void | cmFileSave () |
Handles user command to save the currently active document to disk. | |
void | cmFileSaveAs () |
Handles user command to save the currently active document as a new file on disk. | |
void | cmFileRevert () |
Handles user command to revert the document to the last-saved version. | |
void | cmFileExit () |
Handles user command to exit the application and/or closes the main window. | |
abstract void | doNewDocument () |
| |
void | doSaveDocument () |
| |
void | doOpenDocument () |
| |
boolean | doAskSave () |
Checks whether the document is modified and asks the user to save it. | |
void | doExit () |
| |
void | updateTitle () |
void | showException (Exception e) |
Displays a dialog window showing an exception's exception stack trace. | |
void | initMenu () |
Creates and initializes the main menu bar. | |
void | initFileMenu (JMenu file) |
Initialize the "File" menu. | |
void | initRequirementMenu (JMenu reqMenu) |
Initialize the "requirement" menu. | |
void | initHelpMenu (JMenu help) |
Initialize the "Help" menu. | |
void | initToolsMenu (JMenu tools) |
Initialize the "tools" menu. | |
void | runAsApplication (String[] args) |
Runs this class as a Java application instead of an applet. | |
AbstractDesktop | getDesktop () |
Returns the main "desktop". | |
void | setDirty (boolean d) |
Document | getDocument () |
Returns the current ocument. | |
void | setDocument (Document d) |
Sets the current document. | |
void | setDocumentFile (File f) |
Sets the current document file. | |
File | getDocumentFile () |
JFileChooser | getFileChooser () |
Map | getFileHandlers () |
Returns a map of (FileFilter, FileHandler) objects. | |
abstract FileHandler | getDefaultFileHandler () |
Returns the default file handler object. | |
Collection | getFileFilters () |
Returns the FileFilter objects used in the open and save file dialogs. | |
FileHandler | getCurrentFileHandler () |
Returns the last-selected file handler. | |
abstract AbstractDesktop | createDesktop () |
Abstract factory method that will create the "desktop" component. | |
abstract Collection | createFileHandlers () |
Abstract factory method used to create the available file handler objects. | |
Frame | createApplicationFrame (Component content) |
Factory method that creates and configures the main Frame window when run as a Java standalone application. | |
JFileChooser | createFileChooser () |
Creates the file chooser object used to open and save files. | |
JMenuBar | createMenuBar () |
Creates a menu bar for use in this component. | |
JMenu | createMenu () |
| |
JMenuItem | createMenuItem () |
| |
JMenuItem | createMenuItem (final Action action) |
| |
Action | createActionWrapper (Action wrapped) |
| |
Action | createFileNewAction () |
| |
Action | createFileOpenAction () |
| |
Action | createFileSaveAction () |
| |
Action | createFileSaveAsAction () |
| |
Action | createFileRevertAction () |
| |
Action | createFileExitAction () |
| |
Action | createHelpAboutAction () |
| |
Static Protected Attributes | |
final String | APPLICATION_TITLE = "Rambutan Desktop" |
The application title. | |
final String | FILE_UNMODIFIED = "(Unmodified)" |
final String | FILE_UNTITILED = " -untitled- " |
Private Attributes | |
AbstractDesktop | _desktop = null |
boolean | dirty = false |
Whether the document has been modified. | |
Document | document = null |
File | documentFile = null |
Frame | applicationFrame = null |
The main frame window when run as an application. | |
JFileChooser | _fileChooser = null |
The file chooser dialog. | |
Map | _fileHandlers = null |
Contains (FileFilter, FileHandler) mappings. |
Definition at line 99 of file AbstractMainWindow.java.
|
Handles user command to exit the application and/or closes the main window. This template method checks whether the document is unsaved, saves it if the user desires to do so, and quits the application. Definition at line 236 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.doAskSave(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.doExit(). |
|
Handles user command to create a new, blank document. This command handler is a template method that prior to blank-ing the current document, checks whether it is modified and provides an opportunity to the user to save it. Definition at line 110 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.doAskSave(), com.arcle.rmt.j2se.swing.AbstractMainWindow.doNewDocument(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.updateTitle(). |
|
Handles user command to open a file from disk. This command handler is a template method which, prior to calling doOpenDocument, assures that the documentFile property is set to a correct file as specified by the user.
Definition at line 126 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.doOpenDocument(), com.arcle.rmt.j2se.swing.AbstractMainWindow.getCurrentFileHandler(), com.arcle.rmt.j2se.swing.AbstractMainWindow.getFileChooser(), com.arcle.rmt.j2se.swing.AbstractMainWindow.setDocumentFile(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.updateTitle(). |
|
Handles user command to revert the document to the last-saved version. This template method simply calls doOpenDocument after asking confirmation from the user.
Definition at line 207 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.doOpenDocument(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.getDocumentFile(). |
|
Handles user command to save the currently active document to disk. This command handler is a template method that, prior to calling doSaveDocument, checks whether the documentFile is already been set and calls cmFileSaveAs if it isn't. Definition at line 159 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileSaveAs(), com.arcle.rmt.j2se.swing.AbstractMainWindow.doSaveDocument(), com.arcle.rmt.j2se.swing.AbstractMainWindow.getDocumentFile(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.updateTitle(). Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.doAskSave(). |
|
Handles user command to save the currently active document as a new file on disk. This command handler is a template method similar to cmFileSave, except that it requires the user to select a file name. In fact, cmFileSave uses this method if the current document doesn't yet corresponds to a file on disk.
Definition at line 177 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.doSaveDocument(), com.arcle.rmt.j2se.swing.AbstractMainWindow.getCurrentFileHandler(), com.arcle.rmt.j2se.swing.AbstractMainWindow.getFileChooser(), com.arcle.rmt.j2se.swing.AbstractMainWindow.setDocumentFile(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.updateTitle(). Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileSave(). |
|
Definition at line 770 of file AbstractMainWindow.java. |
|
Factory method that creates and configures the main Frame window when run as a Java standalone application.
Definition at line 692 of file AbstractMainWindow.java. |
|
Abstract factory method that will create the "desktop" component.
Implemented in com.arcle.rmt.j2se.swing.Main. |
|
Creates the file chooser object used to open and save files.
Definition at line 720 of file AbstractMainWindow.java. |
|
Definition at line 812 of file AbstractMainWindow.java. |
|
Abstract factory method used to create the available file handler objects.
Implemented in com.arcle.rmt.j2se.swing.Main. |
|
Definition at line 777 of file AbstractMainWindow.java. |
|
Definition at line 784 of file AbstractMainWindow.java. |
|
Definition at line 805 of file AbstractMainWindow.java. |
|
Definition at line 791 of file AbstractMainWindow.java. |
|
Definition at line 798 of file AbstractMainWindow.java. |
|
Definition at line 819 of file AbstractMainWindow.java. |
|
Definition at line 745 of file AbstractMainWindow.java. |
|
Creates a menu bar for use in this component.
Definition at line 738 of file AbstractMainWindow.java. |
|
Definition at line 759 of file AbstractMainWindow.java. |
|
Definition at line 752 of file AbstractMainWindow.java. |
|
Definition at line 384 of file AbstractMainWindow.java. |
|
Checks whether the document is modified and asks the user to save it.
Definition at line 300 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileSave(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.isDirty(). Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileExit(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileNew(). |
|
Definition at line 328 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.applicationFrame. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileExit(). |
|
Implemented in com.arcle.rmt.j2se.swing.Main. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileNew(). |
|
|
|
Returns the last-selected file handler.
Definition at line 663 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileOpen(), com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileSaveAs(), com.arcle.rmt.j2se.swing.AbstractMainWindow.doOpenDocument(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.doSaveDocument(). |
|
Returns the default file handler object.
Implemented in com.arcle.rmt.j2se.swing.Main. |
|
Returns the main "desktop".
Definition at line 556 of file AbstractMainWindow.java. |
|
Returns the current ocument.
Definition at line 584 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.doSaveDocument(). |
|
|
Definition at line 619 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileOpen(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileSaveAs(). |
|
Returns the FileFilter objects used in the open and save file dialogs.
Definition at line 655 of file AbstractMainWindow.java. |
|
Returns a map of (FileFilter, FileHandler) objects.
Definition at line 630 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.FileHandler.getFileFilter(). |
|
Definition at line 347 of file AbstractMainWindow.java. |
|
Initialize the "File" menu.
Definition at line 466 of file AbstractMainWindow.java. |
|
Initialize the "Help" menu.
Definition at line 491 of file AbstractMainWindow.java. |
|
Creates and initializes the main menu bar.
Definition at line 429 of file AbstractMainWindow.java. |
|
Initialize the "requirement" menu.
Definition at line 481 of file AbstractMainWindow.java. |
|
Initialize the "tools" menu.
Definition at line 498 of file AbstractMainWindow.java. |
|
Definition at line 565 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.doAskSave(). |
|
Runs this class as a Java application instead of an applet.
Definition at line 528 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.AbstractMainWindow.start(). Referenced by com.arcle.rmt.j2se.swing.Main.main(). |
|
Definition at line 572 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.Main.doNewDocument(), com.arcle.rmt.j2se.swing.AbstractMainWindow.doOpenDocument(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.doSaveDocument(). |
|
Sets the current document.
Definition at line 591 of file AbstractMainWindow.java. References com.arcle.rmt.j2se.swing.vc.AbstractDesktop.setDocument(). Referenced by com.arcle.rmt.j2se.swing.Main.doNewDocument(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.doOpenDocument(). |
|
Sets the current document file.
Definition at line 609 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileOpen(), com.arcle.rmt.j2se.swing.AbstractMainWindow.cmFileSaveAs(), and com.arcle.rmt.j2se.swing.Main.doNewDocument(). |
|
Displays a dialog window showing an exception's exception stack trace.
Definition at line 418 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.Main.doNewDocument(), com.arcle.rmt.j2se.swing.AbstractMainWindow.doOpenDocument(), and com.arcle.rmt.j2se.swing.AbstractMainWindow.doSaveDocument(). |
|
Definition at line 371 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.runAsApplication(). |
|
Definition at line 382 of file AbstractMainWindow.java. |
|
Definition at line 389 of file AbstractMainWindow.java. |
|
|
Definition at line 826 of file AbstractMainWindow.java. |
|
The file chooser dialog.
Definition at line 850 of file AbstractMainWindow.java. |
|
Contains (FileFilter, FileHandler) mappings.
Definition at line 855 of file AbstractMainWindow.java. |
|
The application title.
Definition at line 860 of file AbstractMainWindow.java. |
|
The main frame window when run as an application.
Definition at line 845 of file AbstractMainWindow.java. Referenced by com.arcle.rmt.j2se.swing.AbstractMainWindow.doExit(). |
|
Whether the document has been modified.
Definition at line 831 of file AbstractMainWindow.java. |
|
Definition at line 836 of file AbstractMainWindow.java. |
|
Definition at line 840 of file AbstractMainWindow.java. |
|
Definition at line 865 of file AbstractMainWindow.java. |
|
Definition at line 867 of file AbstractMainWindow.java. |