@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
See: Description
Interface | Description |
---|---|
Application |
An application handles the lifecycle of
View objects and
provides windows to present them on screen. |
ApplicationModel |
ApplicationModel provides meta-data for an Application ,
actions and factory methods for creating View s, toolbars and
URIChooser s. |
Disposable |
Interface for objects which explicitly must be disposed to free resources.
|
MenuBuilder |
MenuBuilder is used by Application to build to build its menu
bar(s) and popup menu(s). |
PrintableView |
The interface of a
View which can print its document. |
View |
A view paints a document on a
JComponent within an
Application . |
Class | Description |
---|---|
AbstractApplication |
This abstract class can be extended to implement an
Application . |
AbstractApplicationModel |
This abstract class can be extended to implement an
ApplicationModel . |
AbstractView |
This abstract class can be extended to implement a
View . |
AppletApplication |
AppletApplication handles the lifecycle of a single View
inside of a Java Applet. |
CrossPlatformApplication |
CrossPlatformApplication . |
DefaultApplicationModel |
An
ApplicationModel which creates a default set of Action s
and which does not override any of the default menu bars nor create tool bars. |
DefaultMenuBuilder |
DefaultMenuBuilder . |
EmptyApplicationModel |
An
ApplicationModel which neither creates Action s,
nor overrides the menu bars, nor creates tool bars. |
EmptyMenuBuilder |
EmptyMenuBuilder provides empty implementations of the
MenuBuilder interface. |
MDIApplication |
MDIApplication handles the lifecycle of multiple View s
using a Windows multiple document interface (MDI). |
OSXApplication |
OSXApplication handles the lifecycle of multiple View s using
a Mac OS X application interface. |
SDIApplication |
SDIApplication handles the lifecycle of multiple View s
using a Windows single document interface (SDI). |
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
.
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 View
s
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()
.