databionics
Class GraphicalApplication

java.lang.Object
  extended by databionics.Application
      extended by databionics.GraphicalApplication
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
Analyze

public class GraphicalApplication
extends Application

Base class for graphical applications. Adds a variable for the main window and handles hiding the window if the program is stopped from within the frontend.

See Also:
for more information how to use it.

Field Summary
protected  BaseMainFrame frame
          main program window
protected static org.apache.log4j.Logger log
          interface to log4j system
 
Fields inherited from class databionics.Application
banner, cmd, conf, done, env, exitCode, home, messages, msgfile, name, nf, options, project, standalone, thread, workdir
 
Constructor Summary
GraphicalApplication()
          Standard constructor.
GraphicalApplication(boolean standalone)
          Constructor with flag for standalone mode.
 
Method Summary
 void exit(int exitCode)
          Really exit if run in standalone mode, otherwise only set done flag for frontend and hide mai window.
 BaseMainFrame getFrame()
          Get main program window.
 void sleepAndExit()
          Things to be done after main window is displayed.
 
Methods inherited from class databionics.Application
exitOnInterruption, getBanner, getColorGradient, getColorPath, getConfigPath, getExitCode, getHelpFile, getHome, getLibPath, getMessage, getName, getProject, getThread, getWorkDir, init, init, interrupt, interrupted, isDone, main, printHelp, printVersion, run, setProject, setStandAlone, setWorkDir, sleep, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
interface to log4j system


frame

protected BaseMainFrame frame
main program window

Constructor Detail

GraphicalApplication

public GraphicalApplication()
Standard constructor.


GraphicalApplication

public GraphicalApplication(boolean standalone)
Constructor with flag for standalone mode.

Parameters:
standalone - flag whether app is run in stand alone mode from own main method
Method Detail

getFrame

public BaseMainFrame getFrame()
Get main program window.

Returns:
main program window.

sleepAndExit

public void sleepAndExit()
Things to be done after main window is displayed.


exit

public void exit(int exitCode)
Really exit if run in standalone mode, otherwise only set done flag for frontend and hide mai window.

Overrides:
exit in class Application
Parameters:
exitCode - exit code for System.exit() in standalone mode.


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.