Skip navigation links
JHotDraw 7rev808

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)

Package org.jhotdraw.app

Defines a framework for document oriented applications and provides default implementations.

See: Description

Package org.jhotdraw.app Description

Defines a framework for document oriented applications and provides default implementations.

Supports single document interface (SDI), multiple document interface (MDI), the Mac OS X application document interface (OSX), and applets.

Key interfaces in this framework: Application, ApplicationModel, View.


Features

Launch application
Reads command line parameters, creates initial windows and menu bars and then opens the first view(s).
For this feature, you are supposed to implement your own Main class, which creates an Application of the desired type, creates and configures an ApplicationModel, sets the class name of the desired Views on the ApplicationModel and then invokes the Application.launch(args) method. See the class comments of Application for example code.
The core behavior of this feature is implemented in Application.launch(java.lang.String[]).
Data is supplied by your Main class.
This feature triggers the following features: Open last URI on launch, Open URIs from command line on launch.

Open last URI on launch
When the application is started, the last opened URI is opened in a view.
The core behavior of this feature is implemented in Application.launch(java.lang.String[]).
This feature is enabled if ApplicationModel.isOpenLastURIOnLaunch() returns true.
The last opened URI is retrieved from Application.getRecentURIs().
The last opened URI's are supplied by actions that open files. Known data suppliers are OpenFileAction, OpenApplicationFileAction, SaveFileAction, LoadFileAction.
The data suppliers use method Application.addRecentURI(java.net.URI).
This feature triggers the following feature: Open URIs on launch.

Open URIs from command line on launch
When the application is started, each URI given on the command line is opened in a new view.
The core behavior of this feature is implemented in Application.configure(java.lang.String[]).
Data is supplied by the feature Launch application.
This feature triggers the following feature: Open URIs on launch.

Open URIs on launch
When the application is started, a view is opened for each URI. If no URI is supplied, an empty view is opened.
The core behavior of this feature is implemented in Application.start(java.util.List<java.net.URI>).
The start() method parses the command line parameters. If the command line specifies URI's, a view is created for each URI and then View.read(java.net.URI, org.jhotdraw.gui.URIChooser) is invoked.
Otherwise a single view is created and then View.clear() is invoked.
Data is supplied by the features Open last URI on launch, Open URIs from command line on launch.

Allow multiple views per URI
Allows opening the same URI in multiple views. When the feature is disabled, opening multiple views is prevented, and saving to a file for which another view is open is prevented.
The core behavior of this feature is implemented by actions that open and save files.
Known actions are OpenFileAction, OpenRecentFileAction, SaveFileAction, LoadFileAction, LoadRecentFileAction, ExportFileAction, OpenApplicationFileAction.
This feature is enabled if ApplicationModel.isAllowMultipleViewsPerURI() returns true.
The list of open URI's can be retrieved via Application.getViews() and then calling View.getURI().

Version:
$Id: package-info.java 788 2014-03-22 07:56:28Z rawcoder $
Author:
Werner Randelshofer
Skip navigation links
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.