gov.sns.xal.smf.application.demo
Class Demo

java.lang.Object
  |
  +--gov.sns.application.ApplicationAdaptor
        |
        +--gov.sns.xal.smf.application.demo.Demo
All Implemented Interfaces:
ApplicationListener

public class Demo
extends ApplicationAdaptor

Demo is a demo concrete subclass of ApplicationAdaptor. This demo application is a simple accelerator viewer that demonstrates how to build a simple accelerator based application using the accelerator application framework.


Field Summary
 
Fields inherited from class gov.sns.application.ApplicationAdaptor
docURLs
 
Constructor Summary
Demo()
           
 
Method Summary
 void applicationFinishedLaunching()
          Capture the application launched event and print it
 java.lang.String applicationName()
          Specifies the name of my application.
static void main(java.lang.String[] args)
          The main method of the application.
 XalDocument newDocument(java.net.URL url)
          Implement this method to return an instance of my custom document corresponding to the specified URL.
 XalDocument newEmptyDocument()
          Implement this method to return an instance of my custom document.
 java.lang.String[] readableDocumentTypes()
          Returns the text file suffixes of files this application can open.
 boolean usesConsole()
          Specifies whether I want to send standard output and error to the console.
 java.lang.String[] writableDocumentTypes()
          Returns the text file suffixes of files this application can write.
 
Methods inherited from class gov.sns.application.ApplicationAdaptor
applicationWillQuit, customizeCommands, documentClosed, documentCreated, editPreferences, getApplicationHelpPath, getApplicationInfoPath, getDocURLs, getMenuDefinitionPath, getPathToResource, getResourcesPath, setOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Demo

public Demo()
Method Detail

readableDocumentTypes

public java.lang.String[] readableDocumentTypes()
Returns the text file suffixes of files this application can open.

Specified by:
readableDocumentTypes in class ApplicationAdaptor
Returns:
Suffixes of readable files

writableDocumentTypes

public java.lang.String[] writableDocumentTypes()
Returns the text file suffixes of files this application can write.

Specified by:
writableDocumentTypes in class ApplicationAdaptor
Returns:
Suffixes of writable files

newEmptyDocument

public XalDocument newEmptyDocument()
Implement this method to return an instance of my custom document.

Specified by:
newEmptyDocument in class ApplicationAdaptor
Returns:
An instance of my custom document.

newDocument

public XalDocument newDocument(java.net.URL url)
Implement this method to return an instance of my custom document corresponding to the specified URL.

Specified by:
newDocument in class ApplicationAdaptor
Parameters:
url - The URL of the file to open.
Returns:
An instance of my custom document.

applicationName

public java.lang.String applicationName()
Specifies the name of my application.

Specified by:
applicationName in class ApplicationAdaptor
Returns:
Name of my application.

usesConsole

public boolean usesConsole()
Specifies whether I want to send standard output and error to the console. I don't need to override the superclass adaptor to return true (the default), but it is sometimes convenient to disable the console while debugging.

Overrides:
usesConsole in class ApplicationAdaptor
Returns:
Name of my application.

applicationFinishedLaunching

public void applicationFinishedLaunching()
Capture the application launched event and print it

Overrides:
applicationFinishedLaunching in class ApplicationAdaptor

main

public static void main(java.lang.String[] args)
The main method of the application.