Package xal.extension.application
Class FrameApplication
java.lang.Object
xal.extension.application.Application
xal.extension.application.FrameApplication
- All Implemented Interfaces:
XalDocumentListener
- Direct Known Subclasses:
AcceleratorApplication
Application subclass for JFrame based applications.
-
Field Summary
Fields inherited from class xal.extension.application.Application
applicationAdaptor, commander, NO_OPTION, noticeProxy, openDocuments, YES_OPTION -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFrameApplication(ApplicationAdaptor adaptor) ConstructorprotectedFrameApplication(ApplicationAdaptor adaptor, URL[] urls) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidHandle the "Close All" action by closing all open documents and opening a new empty document.voiddocumentHasClosed(XalDocument document) Implement XalDocumentListener.voiddocumentWillClose(XalDocument document) Implement XalDocumentListener.voidhasChangesChanged(XalDocument document, boolean newHasChangesStatus) Implement XalDocumentListener.static voidlaunch(ApplicationAdaptor adaptor, URL[] urls) Handle the launching of the application by creating the application instance and performing application initialization.protected 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 voidrevertToSaved(xal.extension.application.XalAbstractDocument document) Handle the "Revert To Saved" action by reverting the specified document to that of its source file.protected voidInitialize the Application and open the documents specified by the URL array.voidtitleChanged(XalDocument document, String newTitle) Implement XalDocumentListener.Methods inherited from class xal.extension.application.Application
addApplicationListener, authorizeWithRBAC, canOpenDocuments, cascadeWindowsAbout, changeRBACUser, 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, makeCommander, makeFileChoosers, newDocumentFromTemplate, openDocument, openDocument, openDocumentVersion, openFile, openFiles, openURL, produceDocument, quit, registerApplicationStatusService, registerEvents, removeApplicationListener, saveAllDocuments, saveAsDocument, saveDocument, saveDocumentToFile, setNextDocumentOpenLocation, setOpenFileChooser, setSaveFileChooser, setupConsole, showAboutBox, showAllWindows, showOpenFileChooser, showSaveFileChooser, showsWelcomeDialogAtLaunch, showWelcomeDialog, updateNextDocumentOpenLocation
-
Constructor Details
-
FrameApplication
Constructor- Parameters:
adaptor- The application adaptor used for customization.
-
FrameApplication
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.
-
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.
-
revertToSaved
protected void revertToSaved(xal.extension.application.XalAbstractDocument document) Handle the "Revert To Saved" action by reverting the specified document to that of its source file.- Overrides:
revertToSavedin classApplication- Parameters:
document- The document to revert.
-
closeAllDocuments
protected void closeAllDocuments()Handle the "Close All" action by closing all open documents and opening a new empty document.- Overrides:
closeAllDocumentsin classApplication
-
titleChanged
Implement XalDocumentListener. Empty implementation.- Specified by:
titleChangedin interfaceXalDocumentListener- Parameters:
document- The document whose title changed.newTitle- The new document title.
-
hasChangesChanged
Implement XalDocumentListener. Empty implementation.- Specified by:
hasChangesChangedin interfaceXalDocumentListener- Parameters:
document- The document whose change status changednewHasChangesStatus- The new "hasChanges" status of the document.
-
documentWillClose
Implement XalDocumentListener. Empty implementation.- Specified by:
documentWillClosein interfaceXalDocumentListener- Parameters:
document- The document that will close.
-
documentHasClosed
Implement XalDocumentListener. 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 interfaceXalDocumentListener- Parameters:
document- The document that has closed.
-
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
-