cdox
Class CDox

java.lang.Object
  extended bycdox.CDox

public class CDox
extends java.lang.Object

The main class.

Author:
Rutger Bezema, Andreas Schmitz

Field Summary
static Documentation documentation
          This is the documentation for CDox, used to display the helpbrowser (amongst other things).
static java.lang.String pluginsDir
          This is the plugins directory.
static java.lang.String prefixDir
          This can be a prefix where to find the cdox.jar.
static java.lang.String VERSION
          The Version.
 
Constructor Summary
CDox()
          Inits the CDox.
 
Method Summary
static java.lang.String[] askForLanguage()
          Pops up a dialog and asks for a language to choose.
static java.awt.Dimension getImageDimension()
          This method returns the ideal height and size for this screen resolution.
static Localizer getLocalizer()
          Gets the Localizer for this application.
static void main(java.lang.String[] args)
          Run me.
static void printUsage()
          Prints out usage information (possible command line arguments) on stdout and exits.
static void restartCDox()
          Shuts the current running CDox down and starts a new one, re-reading the configuration and those things.
 void setProgress(int val, java.lang.String prog)
          This method sets the current progress it is called from the CDoxFrame constructor.
 void start()
          It's here where the application starts.
 int stop()
          This method should be invoked when CDox is stopped/restarted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentation

public static Documentation documentation
This is the documentation for CDox, used to display the helpbrowser (amongst other things).


VERSION

public static final java.lang.String VERSION
The Version.

See Also:
Constant Field Values

prefixDir

public static java.lang.String prefixDir
This can be a prefix where to find the cdox.jar. Normally not needed when the cdox.jar is in the current directory.


pluginsDir

public static java.lang.String pluginsDir
This is the plugins directory. Default is plugins in the current directory.

Constructor Detail

CDox

public CDox()
Inits the CDox.

Method Detail

getLocalizer

public static Localizer getLocalizer()
Gets the Localizer for this application. This method will EXIT the Java VM if not even an english language file has been found!

Returns:
the Localizer for CDox. Note that only one Localizer is generated, no matter how often this method is invoked.

askForLanguage

public static java.lang.String[] askForLanguage()
Pops up a dialog and asks for a language to choose. Returns the language which the user chose as ISO3 language code (which can be placed in the preferences under /cdox with key language) and displayable string in its own language.

Returns:
a string array with the iso3-code in [0] and the display language in [1].

start

public void start()
It's here where the application starts.


stop

public int stop()
This method should be invoked when CDox is stopped/restarted.

Returns:
an int value indicating the JOptionPane option chosen.

setProgress

public void setProgress(int val,
                        java.lang.String prog)
This method sets the current progress it is called from the CDoxFrame constructor.

Parameters:
val - the progress value in procents,
prog - the progress String to draw on the splash screen.

getImageDimension

public static java.awt.Dimension getImageDimension()
This method returns the ideal height and size for this screen resolution.

Returns:
the ideal Dimension for the splash/about image.

restartCDox

public static void restartCDox()
Shuts the current running CDox down and starts a new one, re-reading the configuration and those things.


printUsage

public static void printUsage()
Prints out usage information (possible command line arguments) on stdout and exits.


main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Run me.

Parameters:
args - the arguments.
Throws:
java.io.IOException - if an error occurs