Package xal.extension.application
Class DesktopApplication
java.lang.Object
xal.extension.application.Application
xal.extension.application.DesktopApplication
- All Implemented Interfaces:
XalInternalDocumentListener
Application subclass for JDesktopPane based applications.
-
Field Summary
Fields inherited from class xal.extension.application.Application
applicationAdaptor, commander, NO_OPTION, noticeProxy, openDocuments, YES_OPTION
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructorprotected
DesktopApplication
(DesktopApplicationAdaptor adaptor, URL[] urls) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
documentActivated
(XalInternalDocument document) Handle the document activated event.void
documentDeactivated
(XalInternalDocument document) Handle the document activated event.void
documentHasClosed
(XalInternalDocument document) When a document has closed, the application receives this event and removes the document from its open documents list.void
documentWillClose
(XalInternalDocument document) Handle document closing event.void
hasChangesChanged
(XalInternalDocument document, boolean newHasChangesStatus) Handle document change event.static void
launch
(DesktopApplicationAdaptor adaptor, URL[] urls) Handle the launching of the application by creating the application instance and performing application initialization.protected Commander
Make an application commanderprotected void
Create and open a new empty document.protected void
newDocument
(String type) Create and open a new empty document of the specified type.void
produceDocument
(xal.extension.application.XalAbstractDocument document, boolean makeVisible) Add a new document to this application and if makeVisible is true, show itprotected void
Initialize the Application and open the documents specified by the URL array.void
titleChanged
(XalInternalDocument document, String newTitle) Handle document title change event.Methods inherited from class xal.extension.application.Application
addApplicationListener, authorizeWithRBAC, canOpenDocuments, cascadeWindowsAbout, changeRBACUser, closeAllDocuments, closeDocument, displayApplicationError, displayConfirmDialog, displayError, displayError, displayError, displayWarning, displayWarning, displayWarning, getActiveWindow, getAdaptor, getApp, getApplicationAdaptor, getCommander, getDefaultDocumentFolder, getDefaultDocumentFolderURL, getDocuments, getDocumentsCopy, getLaunchTime, getNextDocumentOpenLocation, getOpenFileChooser, getRbacLogin, getRbacSubject, getSaveFileChooser, hideAllWindows, launch, launch, makeFileChoosers, newDocumentFromTemplate, openDocument, openDocument, openDocumentVersion, openFile, openFiles, openURL, produceDocument, quit, registerApplicationStatusService, registerEvents, removeApplicationListener, revertToSaved, saveAllDocuments, saveAsDocument, saveDocument, saveDocumentToFile, setNextDocumentOpenLocation, setOpenFileChooser, setSaveFileChooser, setupConsole, showAboutBox, showAllWindows, showOpenFileChooser, showSaveFileChooser, showsWelcomeDialogAtLaunch, showWelcomeDialog, updateNextDocumentOpenLocation
-
Constructor Details
-
DesktopApplication
Constructor- Parameters:
adaptor
- The application adaptor used for customization.
-
DesktopApplication
Constructor- Parameters:
adaptor
- The application adaptor used for customization.urls
- An array of document URLs to open upon startup.
-
-
Method Details
-
setup
Initialize the Application and open the documents specified by the URL array. If the URL array is empty, then create one empty document.- Specified by:
setup
in classApplication
- Parameters:
urls
- An array of document URLs to open.
-
makeCommander
Make an application commander- Overrides:
makeCommander
in classApplication
- Returns:
- the commander that loads default and custom actions.
-
produceDocument
public void produceDocument(xal.extension.application.XalAbstractDocument document, boolean makeVisible) Add a new document to this application and if makeVisible is true, show it- Specified by:
produceDocument
in classApplication
- Parameters:
document
- the document to producemakeVisible
- make the document visible
-
newDocument
protected void newDocument()Create and open a new empty document.- Specified by:
newDocument
in classApplication
-
newDocument
Create and open a new empty document of the specified type.- Specified by:
newDocument
in classApplication
- Parameters:
type
- the type of document to create.
-
launch
Handle the launching of the application by creating the application instance and performing application initialization.- Parameters:
adaptor
- The custom application adaptor.urls
- The URLs of documents to open upon launching the application
-
titleChanged
Handle document title change event. Empty implementation.- Specified by:
titleChanged
in interfaceXalInternalDocumentListener
- Parameters:
document
- The document whose title changed.newTitle
- The new document title.
-
hasChangesChanged
Handle document change event. Empty implementation.- Specified by:
hasChangesChanged
in interfaceXalInternalDocumentListener
- Parameters:
document
- The document whose change status changednewHasChangesStatus
- The new "hasChanges" status of the document.
-
documentWillClose
Handle document closing event. Empty implementation.- Specified by:
documentWillClose
in interfaceXalInternalDocumentListener
- Parameters:
document
- The document that will close.
-
documentHasClosed
When a document has closed, the application receives this event and removes the document from its open documents list. If there are no documents remaining, the application quits.- Specified by:
documentHasClosed
in interfaceXalInternalDocumentListener
- Parameters:
document
- The document that has closed.
-
documentActivated
Handle the document activated event.- Specified by:
documentActivated
in interfaceXalInternalDocumentListener
- Parameters:
document
- the document that has been activated.
-
documentDeactivated
Handle the document activated event.- Specified by:
documentDeactivated
in interfaceXalInternalDocumentListener
- Parameters:
document
- the document that has been activated.
-