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
ConstructorsModifierConstructorDescriptionprotectedConstructorprotectedDesktopApplication(DesktopApplicationAdaptor adaptor, URL[] urls) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoiddocumentActivated(XalInternalDocument document) Handle the document activated event.voiddocumentDeactivated(XalInternalDocument document) Handle the document activated event.voiddocumentHasClosed(XalInternalDocument document) When a document has closed, the application receives this event and removes the document from its open documents list.voiddocumentWillClose(XalInternalDocument document) Handle document closing event.voidhasChangesChanged(XalInternalDocument document, boolean newHasChangesStatus) Handle document change event.static voidlaunch(DesktopApplicationAdaptor adaptor, URL[] urls) Handle the launching of the application by creating the application instance and performing application initialization.protected CommanderMake an application commanderprotected voidCreate and open a new empty document.protected voidnewDocument(String type) Create and open a new empty document of the specified type.voidproduceDocument(xal.extension.application.XalAbstractDocument document, boolean makeVisible) Add a new document to this application and if makeVisible is true, show itprotected voidInitialize the Application and open the documents specified by the URL array.voidtitleChanged(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:
setupin classApplication- Parameters:
urls- An array of document URLs to open.
-
makeCommander
Make an application commander- Overrides:
makeCommanderin 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:
produceDocumentin classApplication- Parameters:
document- the document to producemakeVisible- make the document visible
-
newDocument
protected void newDocument()Create and open a new empty document.- Specified by:
newDocumentin classApplication
-
newDocument
Create and open a new empty document of the specified type.- Specified by:
newDocumentin 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:
titleChangedin interfaceXalInternalDocumentListener- Parameters:
document- The document whose title changed.newTitle- The new document title.
-
hasChangesChanged
Handle document change event. Empty implementation.- Specified by:
hasChangesChangedin 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:
documentWillClosein 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:
documentHasClosedin interfaceXalInternalDocumentListener- Parameters:
document- The document that has closed.
-
documentActivated
Handle the document activated event.- Specified by:
documentActivatedin interfaceXalInternalDocumentListener- Parameters:
document- the document that has been activated.
-
documentDeactivated
Handle the document activated event.- Specified by:
documentDeactivatedin interfaceXalInternalDocumentListener- Parameters:
document- the document that has been activated.
-