org.jhotdraw.app
Interface ApplicationModel
-
- All Known Implementing Classes:
- AbstractApplicationModel, DefaultApplicationModel, DrawApplicationModel, EmptyApplicationModel, NetApplicationModel, ODGApplicationModel, PertApplicationModel, SVGApplicationModel, TeddyApplicationModel
public interface ApplicationModelApplicationModelprovides meta-data for anApplication, actions and factory methods for creatingViews, toolbars andURIChoosers.
Design PatternsFramework
The interfaces and classes listed below together with theActionclasses in the org.jhotddraw.app.action package define the contracts of a framework for document oriented applications:
Contract:Application,ApplicationModel,View.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description javax.swing.ActionMapcreateActionMap(Application a, View v)Creates an action map.URIChoosercreateExportChooser(Application a, View v)Creates an export chooser.URIChoosercreateImportChooser(Application a, View v)Creates an import chooser.URIChoosercreateOpenChooser(Application a, View v)Creates an open chooser.URIChoosercreateOpenDirectoryChooser(Application a, View v)Creates an open chooser for directories.URIChoosercreateSaveChooser(Application a, View v)Creates a save chooser.java.util.List<javax.swing.JToolBar>createToolBars(Application a, View v)Creates tool bars.ViewcreateView()Creates a new view for the application.voiddestroyApplication(Application a)Destroys the application.voiddestroyView(Application a, View v)Destroys the supplied view.java.lang.StringgetCopyright()Returns the copyright of the application.MenuBuildergetMenuBuilder()Returns the abstract factory for building application menus.java.lang.StringgetName()Returns the name of the application.java.lang.StringgetVersion()Returns the version of the application.voidinitApplication(Application a)Inits the application.voidinitView(Application a, View v)Inits the supplied view for the application.
-
-
-
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.
-
initApplication
void initApplication(Application a)
Inits the application.
-
destroyApplication
void destroyApplication(Application a)
Destroys the application.
-
initView
void initView(Application a, View v)
Inits the supplied view for the application.
-
destroyView
void destroyView(Application a, View v)
Destroys the supplied view.
-
createActionMap
javax.swing.ActionMap createActionMap(Application a, @Nullable View v)
Creates an action map.This method is invoked once for the application, and once for each created view.
The application adds the created map to a hierarchy of action maps. Thus actions created for the application are accessible from the action maps of the views.
- Parameters:
a- Application.v- The view for which the toolbars need to be created, or null if the actions are shared by multiple views.
-
createToolBars
java.util.List<javax.swing.JToolBar> createToolBars(Application a, @Nullable 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 toolbars are shared by multiple views.
-
getMenuBuilder
MenuBuilder getMenuBuilder()
Returns the abstract factory for building application menus.
-
createOpenChooser
URIChooser createOpenChooser(Application a, @Nullable View v)
Creates an open chooser.- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createOpenDirectoryChooser
URIChooser createOpenDirectoryChooser(Application a, @Nullable View v)
Creates an open chooser for directories.- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createSaveChooser
URIChooser createSaveChooser(Application a, @Nullable View v)
Creates a save chooser.- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createImportChooser
URIChooser createImportChooser(Application a, @Nullable View v)
Creates an import chooser.- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
createExportChooser
URIChooser createExportChooser(Application a, @Nullable View v)
Creates an export chooser.- Parameters:
a- Application.v- The view for which the chooser needs to be created, or null if the chooser is shared by multiple views.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG