Class DesktopApplication

java.lang.Object
xal.extension.application.Application
xal.extension.application.DesktopApplication
All Implemented Interfaces:
XalInternalDocumentListener

public class DesktopApplication extends Application implements XalInternalDocumentListener
Application subclass for JDesktopPane based applications.
  • Constructor Details

    • DesktopApplication

      protected DesktopApplication(DesktopApplicationAdaptor adaptor)
      Constructor
      Parameters:
      adaptor - The application adaptor used for customization.
    • DesktopApplication

      protected DesktopApplication(DesktopApplicationAdaptor adaptor, URL[] urls)
      Constructor
      Parameters:
      adaptor - The application adaptor used for customization.
      urls - An array of document URLs to open upon startup.
  • Method Details

    • setup

      protected void setup(URL[] urls)
      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 class Application
      Parameters:
      urls - An array of document URLs to open.
    • makeCommander

      protected Commander makeCommander()
      Make an application commander
      Overrides:
      makeCommander in class Application
      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 class Application
      Parameters:
      document - the document to produce
      makeVisible - make the document visible
    • newDocument

      protected void newDocument()
      Create and open a new empty document.
      Specified by:
      newDocument in class Application
    • newDocument

      protected void newDocument(String type)
      Create and open a new empty document of the specified type.
      Specified by:
      newDocument in class Application
      Parameters:
      type - the type of document to create.
    • launch

      public static void launch(DesktopApplicationAdaptor adaptor, URL[] urls)
      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

      public void titleChanged(XalInternalDocument document, String newTitle)
      Handle document title change event. Empty implementation.
      Specified by:
      titleChanged in interface XalInternalDocumentListener
      Parameters:
      document - The document whose title changed.
      newTitle - The new document title.
    • hasChangesChanged

      public void hasChangesChanged(XalInternalDocument document, boolean newHasChangesStatus)
      Handle document change event. Empty implementation.
      Specified by:
      hasChangesChanged in interface XalInternalDocumentListener
      Parameters:
      document - The document whose change status changed
      newHasChangesStatus - The new "hasChanges" status of the document.
    • documentWillClose

      public void documentWillClose(XalInternalDocument document)
      Handle document closing event. Empty implementation.
      Specified by:
      documentWillClose in interface XalInternalDocumentListener
      Parameters:
      document - The document that will close.
    • documentHasClosed

      public void documentHasClosed(XalInternalDocument document)
      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 interface XalInternalDocumentListener
      Parameters:
      document - The document that has closed.
    • documentActivated

      public void documentActivated(XalInternalDocument document)
      Handle the document activated event.
      Specified by:
      documentActivated in interface XalInternalDocumentListener
      Parameters:
      document - the document that has been activated.
    • documentDeactivated

      public void documentDeactivated(XalInternalDocument document)
      Handle the document activated event.
      Specified by:
      documentDeactivated in interface XalInternalDocumentListener
      Parameters:
      document - the document that has been activated.