org.scijava.app
Class AbstractApp

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.app.AbstractApp
All Implemented Interfaces:
Comparable<Prioritized>, App, Contextual, HasPluginInfo, RichPlugin, SciJavaPlugin, SingletonPlugin, Prioritized, Versioned
Direct Known Subclasses:
SciJavaApp

public abstract class AbstractApp
extends AbstractRichPlugin
implements App

Abstract superclass of App implementations.

Author:
Curtis Rueden

Constructor Summary
AbstractApp()
           
 
Method Summary
 void about()
          Displays information about the application.
 File getBaseDirectory()
          Gets the application's root directory.
 String getInfo(boolean mem)
          Gets a string with information about the application.
 Manifest getManifest()
          Gets the manifest containing metadata about the application.
 POM getPOM()
          Gets the Maven POM containing metadata about the application.
 String getSystemProperty()
          A system property which, if set, overrides the base directory of the application.
 String getTitle()
          Gets the title of the application.
 String getVersion()
          Gets the version of the application.
 void prefs()
          Displays application preferences.
 void quit()
          Quits the application.
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority, toString
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.app.App
getArtifactId, getGroupId
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 

Constructor Detail

AbstractApp

public AbstractApp()
Method Detail

getTitle

public String getTitle()
Description copied from interface: App
Gets the title of the application.

Specified by:
getTitle in interface App

getVersion

public String getVersion()
Description copied from interface: App
Gets the version of the application.

SciJava conforms to the Semantic Versioning specification.

Specified by:
getVersion in interface App
Specified by:
getVersion in interface Versioned
Returns:
The application version, in major.minor.micro format.

getPOM

public POM getPOM()
Description copied from interface: App
Gets the Maven POM containing metadata about the application.

Specified by:
getPOM in interface App

getManifest

public Manifest getManifest()
Description copied from interface: App
Gets the manifest containing metadata about the application.

NB: This metadata may be null if run in a development environment.

Specified by:
getManifest in interface App

getInfo

public String getInfo(boolean mem)
Description copied from interface: App
Gets a string with information about the application.

Specified by:
getInfo in interface App
Parameters:
mem - If true, memory usage information is included.

getSystemProperty

public String getSystemProperty()
Description copied from interface: App
A system property which, if set, overrides the base directory of the application.

Specified by:
getSystemProperty in interface App

getBaseDirectory

public File getBaseDirectory()
Description copied from interface: App
Gets the application's root directory. If the application's system property is set, it is used. Otherwise, we scan up the tree from this class for a suitable directory.

Specified by:
getBaseDirectory in interface App

about

public void about()
Description copied from interface: App
Displays information about the application. Typically this action takes the form as About dialog in the UI, and/or a message on the console.

Specified by:
about in interface App

prefs

public void prefs()
Description copied from interface: App
Displays application preferences. The behavior is application-specific, but typically a preferences dialog will be shown onscreen.

Specified by:
prefs in interface App

quit

public void quit()
Description copied from interface: App
Quits the application. Typically this action will prompt the user about any unsaved work first.

Specified by:
quit in interface App


Copyright © 2009–2015 SciJava. All rights reserved.