|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapplication.Application
org.jhotdraw.application.AbstractDocumentOrientedApplication
org.jhotdraw.application.AbstractOSXApplication
public abstract class AbstractOSXApplication
A AbstractOSXApplication can handle the life cycle of multiple document windows each being presented in a JFrame of its own. The application provides all the functionality needed to work with the document, such as a menu bar, tool bars and palette windows.
OSX stands for Mac OS X Application Document Interface. An OSX application can handle multiple DocumentView's at the same time. Each documentView gets a JFrame of its own. An OSX application has one menu bar, attached to the top of the screen. This 'screen menu bar' is shared by all DocumentView's.
AbstractOSXApplication is designed for Mac OS X. It will not work on other platforms.
The screen menu bar has the following standard menus:
"Application-Name" File Edit Window HelpThe first menu, is the application menu. It has the following standard menu items. AbstractOSXApplication wires the menu items to the action objects specified in brackets. The preferences menu item is only displayed, if the application has an action with PreferencesAction.ID. The other menu items are always displayed. Menu items without action wiring are generated by Mac OS X and can not be changed.
About "Application-Name" (AboutAction.ID) - Preferences... (PreferencesAction.ID) - Services - Hide "Application-Name" Hide Others Show All - Quit "Application-Name" (ExitAction.ID)The file menu has the following standard menu items. AbstractOSXApplication wires the menu items to the action objects specified in brackets. If the application hasn't an action with the specified ID, the menu item is not displayed. Menu items without action wiring are generated by this class, and can be changed by subclasses.
New (NewAction.ID) Open... (OpenAction.ID) Open Recent > - Close (CloseAction.ID) Save (SaveAction.ID) Save As... (SaveAsAction.ID) Save All Revert to Saved (RevertToSavedAction.ID) - Page Setup... (PrintPageSetupAction.ID) Print... (PrintAction.ID)The edit menu has the following standard menu items. AbstractOSXApplication wires the menu items to the action objects specified in brackets. If the application hasn't an action with the specified ID, the menu item is not displayed. Menu items without action wiring are generated by this class, and can be changed by subclasses.
Undo (UndoAction.ID) Redo (RedoAction.ID) - Cut (CutAction.ID) Copy (CopyAction.ID) Paste (PasteAction.ID) Delete (DeleteAction.ID) Select All (SelectAllAction.ID)
Field Summary |
---|
Fields inherited from class org.jhotdraw.application.AbstractDocumentOrientedApplication |
---|
PROP_CURRENT_VIEW, PROP_VIEW_COUNT |
Constructor Summary | |
---|---|
AbstractOSXApplication()
Creates a new instance. |
Method Summary | |
---|---|
void |
addPalette(java.awt.Window palette)
Adds a palette window to the application. |
protected javax.swing.ActionMap |
createActionMap()
Creates an action map for actions which haven not been defined using the |
protected javax.swing.JMenu |
createFileMenu(DocumentView p)
Creates the file menu. |
protected javax.swing.JMenuBar |
createMenuBar(DocumentView p)
Creates a menu bar. |
protected javax.swing.JMenu |
createWindowMenu(DocumentView p)
Creates the window menu. |
java.awt.Component |
getComponent()
Returns the application component. |
DocumentView |
getCurrentView()
Returns the current view. |
void |
hide(DocumentView p)
Hides a view. |
static void |
initAWT(java.lang.String[] args)
|
void |
initialize(java.lang.String[] args)
Initializes the application. |
protected void |
initLookAndFeel()
Initializes the look and feel of the application. |
protected void |
initPalettes(java.util.LinkedList<javax.swing.Action> paletteActions)
|
protected void |
initScreenMenuBar()
|
protected void |
initView(DocumentView v)
Initializes the view. |
boolean |
isEditorShared()
Returns true, if this application shares an editor among multiple views. |
void |
removePalette(java.awt.Window palette)
Removes a palette window from the application. |
void |
setCurrentView(DocumentView newValue)
|
void |
show(DocumentView p)
Shows a view. |
Methods inherited from class org.jhotdraw.application.AbstractDocumentOrientedApplication |
---|
add, addRecentFile, clearRecentFiles, createEditMenu, createHelpMenu, createMenuBar, createMenus, createToolBars, createView, createViewMenu, destroyView, getAction, getFrameworkResourceMap, getResourceMap, getViewClass, getViews, initActionMap, initDefaults, initMainFrame, initRecentFiles, isEnabled, launch, recentFiles, remove, setEnabled, shutdown, startup, updateName, updateOpenRecentMenu |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jhotdraw.application.DocumentOrientedApplication |
---|
addPropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
public AbstractOSXApplication()
Method Detail |
---|
public void initialize(java.lang.String[] args)
AbstractDocumentOrientedApplication
initDefaults
.
initialize
in interface DocumentOrientedApplication
initialize
in class AbstractDocumentOrientedApplication
public static void initAWT(java.lang.String[] args)
protected void initLookAndFeel()
AbstractDocumentOrientedApplication
initDefaults
.
initLookAndFeel
in class AbstractDocumentOrientedApplication
protected javax.swing.ActionMap createActionMap()
AbstractDocumentOrientedApplication
createActionMap
in class AbstractDocumentOrientedApplication
protected void initView(DocumentView v)
AbstractDocumentOrientedApplication
initView
in class AbstractDocumentOrientedApplication
public void addPalette(java.awt.Window palette)
DocumentOrientedApplication
addPalette
in interface DocumentOrientedApplication
addPalette
in class AbstractDocumentOrientedApplication
public void removePalette(java.awt.Window palette)
DocumentOrientedApplication
removePalette
in interface DocumentOrientedApplication
removePalette
in class AbstractDocumentOrientedApplication
public void show(DocumentView p)
AbstractDocumentOrientedApplication
start
on the view.
show
in interface DocumentOrientedApplication
show
in class AbstractDocumentOrientedApplication
public void hide(DocumentView p)
AbstractDocumentOrientedApplication
stop
on the view.
hide
in interface DocumentOrientedApplication
hide
in class AbstractDocumentOrientedApplication
protected javax.swing.JMenuBar createMenuBar(DocumentView p)
p
- The documentView for which the menu bar is created. This may be
null
if the menu bar is attached to an application
component, such as the screen menu bar or a floating palette window.protected javax.swing.JMenu createWindowMenu(DocumentView p)
AbstractDocumentOrientedApplication
createWindowMenu
in class AbstractDocumentOrientedApplication
protected javax.swing.JMenu createFileMenu(DocumentView p)
AbstractDocumentOrientedApplication
createFileMenu
in class AbstractDocumentOrientedApplication
public DocumentView getCurrentView()
AbstractDocumentOrientedApplication
This is a bound property.
getCurrentView
in interface DocumentOrientedApplication
getCurrentView
in class AbstractDocumentOrientedApplication
public void setCurrentView(DocumentView newValue)
protected void initScreenMenuBar()
protected void initPalettes(java.util.LinkedList<javax.swing.Action> paletteActions)
public boolean isEditorShared()
AbstractDocumentOrientedApplication
isEditorShared
in interface DocumentOrientedApplication
isEditorShared
in class AbstractDocumentOrientedApplication
public java.awt.Component getComponent()
DocumentOrientedApplication
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |