Class DesktopApplicationAdaptor

java.lang.Object
xal.extension.application.AbstractApplicationAdaptor
xal.extension.application.DesktopApplicationAdaptor
All Implemented Interfaces:
ApplicationListener

public abstract class DesktopApplicationAdaptor extends AbstractApplicationAdaptor
DesktopApplicationAdaptor is the abstract superclass of the custom application adaptors each of which acts as a delegate for its corresponding desktop application. It contains hooks for handling application events. It also provides application wide information about the application.
Author:
t6p
  • Constructor Details

    • DesktopApplicationAdaptor

      public DesktopApplicationAdaptor()
  • Method Details

    • newEmptyDocument

      public abstract XalInternalDocument newEmptyDocument()
      Subclasses should implement this method to return an instance of their custom subclass of XalDocument.
      Returns:
      An instance of the custom subclass of XalDocument
    • newEmptyDocument

      public XalInternalDocument newEmptyDocument(String type)
      Subclasses should implement this method to return an instance of their custom subclass of XalDocument.
      Returns:
      An instance of the custom subclass of XalDocument
    • newDocument

      public abstract XalInternalDocument newDocument(URL url)
      Subclasses should implement this method to return an instance of their custom subclass of XalDocument loaded from the specified URL.
      Returns:
      An instance of the custom subclass of XalDocument
    • generateEmptyDocument

      public final xal.extension.application.XalAbstractDocument generateEmptyDocument(String type)
      Generate a new empty document.
      Specified by:
      generateEmptyDocument in class AbstractApplicationAdaptor
      Parameters:
      type - the type of document to create.
      Returns:
      an instance of the custom subclass of XalAbstractDocument
    • editPreferences

      public void editPreferences(XalInternalDocument document)
      Override this method to show your application's preference panel. The preference panel may optionally be document specific or application wide depending on the application's specific implementation. The default implementation displays a warning dialog box that now preference panel exists.
      Parameters:
      document - The document whose preferences are being changed. Subclasses may ignore.
    • drawsDocumentContentOnDrag

      public boolean drawsDocumentContentOnDrag()
      Determine whether to draw a document's contents when its window is dragged. The default behavior is true. Subclasses should override this method if outline mode is desired.
      Returns:
      true to draw the contents on drag and false to draw an outline.
    • applicationWillDisplayDesktopPane

      public void applicationWillDisplayDesktopPane()
      Event indicating that the application will display the desktop pane. Subclasses may override this method to handle this event if needed.