|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.application.ApplicationAdaptor
ApplicationAdaptor is the abstract superclass of the custom applicaton adaptors each of which acts as a delegate for its corresponding application. It contains hooks for handling application events. It also provides application wide information about the application.
| Field Summary | |
static java.net.URL[] |
docURLs
The URLs to open existing document(s) in the command-line. |
| Constructor Summary | |
ApplicationAdaptor()
|
|
| Method Summary | |
void |
applicationFinishedLaunching()
Subclasses may override this method to provide custom handling upon completion of the application having launched. |
abstract java.lang.String |
applicationName()
Subclasses must implement this method to return the name of their application. |
void |
applicationWillQuit()
Implement ApplicationListener. |
protected void |
customizeCommands(Commander commander)
Override this method to register custom application commands. |
void |
documentClosed(XalDocument document)
Implement ApplicationListener. |
void |
documentCreated(XalDocument document)
Implement ApplicationListener. |
void |
editPreferences(XalDocument document)
Override this method to show your application's preference panel. |
java.lang.String |
getApplicationHelpPath()
Subclasses should override this method if the application Help file is in a location other than the default one. |
java.lang.String |
getApplicationInfoPath()
Subclasses should override this method if the application information properties (displayed in the "About" box) file is in a location other than the default one. |
static java.net.URL[] |
getDocURLs()
|
java.lang.String |
getMenuDefinitionPath()
Subclasses should override this method if the menudefinition properties file is in a location other than the default one. |
java.lang.String |
getPathToResource(java.lang.String resourceName)
Get the path to the specified named resource which resides in the the resource folder path as specified by the getResourcesPath() method. |
java.lang.String |
getResourcesPath()
Subclasses should override this method if the resources folder path is in a location other than the default one. |
abstract XalDocument |
newDocument(java.net.URL url)
Subclasses should implement this method to return an instance of their custom subclass of XalDocument loaded from the specified URL. |
abstract XalDocument |
newEmptyDocument()
Subclasses should implement this method to return an instance of their custom subclass of XalDocument. |
abstract java.lang.String[] |
readableDocumentTypes()
Subclasses should implement this method to return the array of file suffixes identifying the files that can be read by the application. |
protected static void |
setOptions(java.lang.String[] args)
Define some flags for launching the application, such as pre-load a default accelerator. |
boolean |
usesConsole()
Identifies whether the application sends standard output and standard error to the application's console or whether it should simply go to the terminal from which the application was launched. |
abstract java.lang.String[] |
writableDocumentTypes()
Subclasses should implement this method to return the array of file suffixes identifying the files that can be written by the application. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static java.net.URL[] docURLs
| Constructor Detail |
public ApplicationAdaptor()
| Method Detail |
public abstract java.lang.String[] readableDocumentTypes()
public abstract java.lang.String[] writableDocumentTypes()
public abstract XalDocument newEmptyDocument()
public abstract XalDocument newDocument(java.net.URL url)
public void editPreferences(XalDocument document)
document - The document whose preferences are being changed. Subclass may ignore.public abstract java.lang.String applicationName()
public boolean usesConsole()
protected void customizeCommands(Commander commander)
commander - The commander with which to register commands.Commander.registerAction(Action)protected static void setOptions(java.lang.String[] args)
public static java.net.URL[] getDocURLs()
public void applicationFinishedLaunching()
public void documentClosed(XalDocument document)
documentClosed in interface ApplicationListenerdocument - The document that has closed.public void documentCreated(XalDocument document)
documentCreated in interface ApplicationListenerdocument - The document that has been created.public void applicationWillQuit()
applicationWillQuit in interface ApplicationListenerpublic java.lang.String getResourcesPath()
resources located within the same
folder where the runtime subclass of ApplicationAdaptor resides.
Java package path notation is used.
For example "gov.sns.apps.Myapp.resources".
public final java.lang.String getPathToResource(java.lang.String resourceName)
resourceName - The name of the resource for which to get the path
getResourcesPath()public java.lang.String getMenuDefinitionPath()
"menudef.properties" located in the
resources folder. Java package path notation is used. The file's suffix is
excluded from the path.
For example "gov.sns.apps.Myapp.resources.menudef".
public java.lang.String getApplicationInfoPath()
"About.properties"
located in the resources folder. Java package path notation is used. The file's
suffix is excluded from the path.
For example "gov.sns.apps.Myapp.resources.About".
public java.lang.String getApplicationHelpPath()
"Help.html"
located in the resources folder. Standard relative URL notation is used.
For example "resources/Help.html".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||