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
ConstructorsModifierConstructorDescriptionprotected
FrameApplication
(ApplicationAdaptor adaptor) Constructorprotected
FrameApplication
(ApplicationAdaptor adaptor, URL[] urls) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Handle the "Close All" action by closing all open documents and opening a new empty document.void
documentHasClosed
(XalDocument document) Implement XalDocumentListener.void
documentWillClose
(XalDocument document) Implement XalDocumentListener.void
hasChangesChanged
(XalDocument document, boolean newHasChangesStatus) Implement XalDocumentListener.static void
launch
(ApplicationAdaptor adaptor, URL[] urls) Handle the launching of the application by creating the application instance and performing application initialization.protected 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
revertToSaved
(xal.extension.application.XalAbstractDocument document) Handle the "Revert To Saved" action by reverting the specified document to that of its source file.protected void
Initialize the Application and open the documents specified by the URL array.void
titleChanged
(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:
setup
in 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:
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.
-
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:
revertToSaved
in 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:
closeAllDocuments
in classApplication
-
titleChanged
Implement XalDocumentListener. Empty implementation.- Specified by:
titleChanged
in interfaceXalDocumentListener
- Parameters:
document
- The document whose title changed.newTitle
- The new document title.
-
hasChangesChanged
Implement XalDocumentListener. Empty implementation.- Specified by:
hasChangesChanged
in interfaceXalDocumentListener
- Parameters:
document
- The document whose change status changednewHasChangesStatus
- The new "hasChanges" status of the document.
-
documentWillClose
Implement XalDocumentListener. Empty implementation.- Specified by:
documentWillClose
in 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:
documentHasClosed
in 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
-