org.jhotdraw.app
Interface ApplicationModel

All Known Implementing Classes:
DefaultApplicationModel, DrawApplicationModel, NetApplicationModel, ODGApplicationModel, PertApplicationModel, SVGApplicationModel, TeddyApplicationModel

public interface ApplicationModel

ApplicationModel.

Version:
1.0 June 10, 2006 Created.
Author:
Werner Randelshofer.

Method Summary
 java.util.List<javax.swing.JMenu> createMenus(Application a, View v)
          Creates menus.
 java.util.List<javax.swing.JToolBar> createToolBars(Application a, View v)
          Creates tool bars.
 View createView()
          Creates a new view for the application.
 javax.swing.Action getAction(java.lang.String id)
          Returns the action with the specified id.
 java.lang.String getCopyright()
          Returns the copyright of the application.
 java.lang.String getName()
          Returns the name of the application.
 java.lang.String getVersion()
          Returns the version of the application.
 void initApplication(Application a)
           
 void initView(Application a, View v)
           
 void putAction(java.lang.String id, javax.swing.Action action)
          Puts an action with the specified id.
 

Method Detail

getName

java.lang.String getName()
Returns the name of the application.


getVersion

java.lang.String getVersion()
Returns the version of the application.


getCopyright

java.lang.String getCopyright()
Returns the copyright of the application.


createView

View createView()
Creates a new view for the application.


initView

void initView(Application a,
              View v)

initApplication

void initApplication(Application a)

putAction

void putAction(java.lang.String id,
               javax.swing.Action action)
Puts an action with the specified id.


getAction

javax.swing.Action getAction(java.lang.String id)
Returns the action with the specified id.


createToolBars

java.util.List<javax.swing.JToolBar> createToolBars(Application a,
                                                    View v)
Creates tool bars.

Depending on the document interface of the application, this method may be invoked only once for the application, or for each opened view.

Parameters:
a - Application.
v - The view for which the toolbars need to be created, or null if the toolbar needs to be shared with multiple views.

createMenus

java.util.List<javax.swing.JMenu> createMenus(Application a,
                                              View v)
Creates menus.

Depending on the document interface of the application, this method may be invoked only once for the application, or for each opened view.

Parameters:
a - Application.
v - The view for which the toolbars need to be created, or null if the toolbar needs to be shared with multiple views.