Package xal.extension.application
Class DesktopApplicationAdaptor
java.lang.Object
xal.extension.application.AbstractApplicationAdaptor
xal.extension.application.DesktopApplicationAdaptor
- All Implemented Interfaces:
ApplicationListener
DesktopApplicationAdaptor is the abstract superclass of the custom
application adaptors each of which acts as a delegate for its corresponding
desktop application. It contains hooks for handling application events. It
also provides application wide information about the application.
- Author:
- t6p
-
Field Summary
Fields inherited from class xal.extension.application.AbstractApplicationAdaptor
docURLs, GUI_BRICKS_RESOURCE, WILDCARD_FILE_EXTENSION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Event indicating that the application will display the desktop pane.boolean
Determine whether to draw a document's contents when its window is dragged.void
editPreferences
(XalInternalDocument document) Override this method to show your application's preference panel.final xal.extension.application.XalAbstractDocument
generateEmptyDocument
(String type) Generate a new empty document.abstract XalInternalDocument
newDocument
(URL url) Subclasses should implement this method to return an instance of their custom subclass of XalDocument loaded from the specified URL.abstract XalInternalDocument
Subclasses should implement this method to return an instance of their custom subclass of XalDocument.newEmptyDocument
(String type) Subclasses should implement this method to return an instance of their custom subclass of XalDocument.Methods inherited from class xal.extension.application.AbstractApplicationAdaptor
applicationFinishedLaunching, applicationName, applicationWillOpenInitialDocuments, applicationWillQuit, canOpenDocuments, customizeCommands, documentClosed, documentCreated, getDefaultDocumentFolder, getDefaultDocumentFolderURL, getDefaultWindowReference, getDocURLs, getResourceURL, getUserPreferencesNode, readableDocumentTypes, setOptions, setResourcesLocation, setResourcesParentDirectory, setResourcesParentDirectoryWithPath, showsWelcomeDialogAtLaunch, usesConsole, writableDocumentTypes
-
Constructor Details
-
DesktopApplicationAdaptor
public DesktopApplicationAdaptor()
-
-
Method Details
-
newEmptyDocument
Subclasses should implement this method to return an instance of their custom subclass of XalDocument.- Returns:
- An instance of the custom subclass of XalDocument
-
newEmptyDocument
Subclasses should implement this method to return an instance of their custom subclass of XalDocument.- Returns:
- An instance of the custom subclass of XalDocument
-
newDocument
Subclasses should implement this method to return an instance of their custom subclass of XalDocument loaded from the specified URL.- Returns:
- An instance of the custom subclass of XalDocument
-
generateEmptyDocument
Generate a new empty document.- Specified by:
generateEmptyDocument
in classAbstractApplicationAdaptor
- Parameters:
type
- the type of document to create.- Returns:
- an instance of the custom subclass of XalAbstractDocument
-
editPreferences
Override this method to show your application's preference panel. The preference panel may optionally be document specific or application wide depending on the application's specific implementation. The default implementation displays a warning dialog box that now preference panel exists.- Parameters:
document
- The document whose preferences are being changed. Subclasses may ignore.
-
drawsDocumentContentOnDrag
public boolean drawsDocumentContentOnDrag()Determine whether to draw a document's contents when its window is dragged. The default behavior is true. Subclasses should override this method if outline mode is desired.- Returns:
- true to draw the contents on drag and false to draw an outline.
-
applicationWillDisplayDesktopPane
public void applicationWillDisplayDesktopPane()Event indicating that the application will display the desktop pane. Subclasses may override this method to handle this event if needed.
-