|
BioLegato 0.7.5 Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biolegato.main.BLMain
public final class BLMain
The main program and generic function class.
This class is used to generate the main window, do all startup processing, and run the program. This class also contains most of the utility functions.
| Nested Class Summary | |
|---|---|
static class |
BLMain.ARCH
|
static class |
BLMain.OS
|
| Field Summary | |
|---|---|
static javax.swing.JMenuItem |
ABOUT_MENUITEM
The menu item for BioLegato's "About..." |
static BLMain.ARCH |
CURRENT_ARCH
Stores the current machine architecture |
static java.lang.String |
CURRENT_DIR
This constant is set to the path of where biolegato was run The value of this constant determined at runtime. |
static BLMain.OS |
CURRENT_OS
Stores the current operating system |
static boolean |
debug
Stores information regarding the usage of the debug command NOTE: This should always be accessed using Main.debug |
static java.util.Properties |
DEFAULT_PROPERTIES
Stores the properties for BioLegato. |
static int |
DOUBLE_CLICK_TIME
The amount of time between clicks to be considered a double click. |
static java.lang.String |
EMPTY_STRING
This constant stores an empty string (to avoid recreation) |
static javax.swing.JMenuItem |
EXIT_MENUITEM
The menu item for BioLegato's "Exit..." |
static java.lang.String |
HOME_DIR
Stores the user's home directory |
static java.lang.String |
NAME
This constant stores the program's name |
static java.lang.String |
PROGRAM_DIR
This constant is set to the path of BioLegato.jar The value of this constant determined at runtime. |
static long |
serialVersionUID
This constant is used for Serialization |
static java.lang.String |
VERSION
This constant is used to keep track of version changes. |
| Constructor Summary | |
|---|---|
BLMain()
|
|
| Method Summary | |
|---|---|
static javax.swing.JMenu |
addMenuHeading(int order,
java.lang.String name)
Adds a menu heading (JMenu) to our menu (BLMenu). |
static javax.swing.JMenu |
addMenuHeading(java.lang.String name)
Adds a menu heading (JMenu) to our menu (BLMenu). |
static void |
addMenuItem(int location,
java.lang.String headingName,
javax.swing.JMenuItem menuItem)
Adds a menu item (JMenuItem) to a menu heading (JMenu) within the window (ProgramWindow) |
static void |
addMenuItem(java.lang.String headingName,
javax.swing.JMenuItem menuItem)
Adds a menu item (JMenuItem) to a menu heading (JMenu) within the window (ProgramWindow) |
static java.lang.String |
envreplace(java.lang.String change)
Replaces $VARIABLE name with environment variables. |
static void |
error(java.lang.String message,
java.lang.String location)
Sends an error message to BioLegato's standard err. |
static DataCanvas |
getCanvas()
Returns the current/selected data in the canvas. |
static java.io.File |
getCurrentPWD()
Gets the present working directory "PWD" for BioLegato (this does NOT change CURRENT_DIR!) This value can be used to cache which directory file dialog boxes should use as their "current working directory" |
static javax.swing.JFrame |
getJFrame()
Provides access for other classes to the main program window JFrame object. |
static java.lang.String |
getProperty(java.lang.String property)
Retrieves individual settings for BioLegato. |
static boolean |
isDigit(char test)
Tests if a character is a digit or not. |
static void |
main(java.lang.String[] args)
Starts up BioLegato. |
static void |
message(java.lang.String message,
java.lang.String location)
Sends a message to BioLegato's standard out. |
static int |
numberDigits(int n)
Divide and conquer algorithm to calculate the number of digits for a given number |
static void |
setCurrentPWD(java.io.File newPWD)
Sets the present working directory "PWD" for BioLegato (this does NOT change CURRENT_DIR!) This value can be used to cache which directory file dialog boxes should use as their "current working directory" |
static void |
shellCommand(java.lang.String cmd,
java.lang.String data)
Runs simple shell commands. |
static boolean |
testNumber(java.lang.String test)
Checks if a character array is all digits. |
static void |
warning(java.lang.String message,
java.lang.String location)
Sends an warning message to BioLegato's standard err. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String EMPTY_STRING
public static final java.lang.String NAME
public static final java.lang.String PROGRAM_DIR
public static final java.lang.String CURRENT_DIR
public static final java.lang.String VERSION
public static final java.lang.String HOME_DIR
public static final int DOUBLE_CLICK_TIME
public static final BLMain.OS CURRENT_OS
public static final BLMain.ARCH CURRENT_ARCH
public static final long serialVersionUID
public static final javax.swing.JMenuItem ABOUT_MENUITEM
public static final javax.swing.JMenuItem EXIT_MENUITEM
public static final java.util.Properties DEFAULT_PROPERTIES
| Property | Used internally | Description |
|---|---|---|
| debug | Yes | determines whether or not to display debug information |
| plugins | Yes | sets the plugin directory |
| temp | Yes | sets the temporary files directory |
| font.size | Yes | determines the default font size for objects in BioLegato |
| font.type | Yes | determines the default font type for objects in BioLegato |
| shell.name | Yes | determines the shell to execute |
| shell.parameter | Yes | determines the parameter for directing the shell to execute a command |
| user.plugins | Yes | determines whether or not to read the user's plugin files (located in the user's home directory |
| canvas | Yes | determines the canvas to show on startup (if multiple canvases available) |
| GDE.menu | No | determines whether or not to read the GDE menu files (backwards compatibility mode) |
| GDE.help.viewer | No | determines which file to feed the help file to |
| GDE.help.path | No | the location to search for the help files |
public static boolean debug
| Constructor Detail |
|---|
public BLMain()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line arguments for BioLegato.public static java.lang.String getProperty(java.lang.String property)
property - the property key to retrieve the value for
public static DataCanvas getCanvas()
public static javax.swing.JFrame getJFrame()
public static javax.swing.JMenu addMenuHeading(java.lang.String name)
name - the name of the menu heading
public static javax.swing.JMenu addMenuHeading(int order,
java.lang.String name)
order - the position to place the menu tagname - the name of the menu heading
public static void addMenuItem(int location,
java.lang.String headingName,
javax.swing.JMenuItem menuItem)
If the heading which was entered does not exist, this function will create it; hence why addMenuHeading returns the heading corresponding to the name entered if a menu heading with that name already exists.
location - is the location in the menu to insert the item atheadingName - is the name of the menu heading to add the menu item to.menuItem - is the menu item to add to the heading.
public static void addMenuItem(java.lang.String headingName,
javax.swing.JMenuItem menuItem)
If the heading which was entered does not exist, this function will create it; hence why addMenuHeading returns the heading corresponding to the name entered if a menu heading with that name already exists.
headingName - is the name of the menu heading to add the menu item to.menuItem - is the menu item to add to the heading.
public static void shellCommand(java.lang.String cmd,
java.lang.String data)
cmd - the command string to rundata - the data to use as standard input (System.in)
public static void error(java.lang.String message,
java.lang.String location)
message - the error message to send.location - the location the error occurred.
public static void warning(java.lang.String message,
java.lang.String location)
message - the warning message to send.location - the location the error occurred.
public static void message(java.lang.String message,
java.lang.String location)
message - the message to send.location - the location the message was sent from.public static boolean testNumber(java.lang.String test)
test - the character array to test.
public static int numberDigits(int n)
n - the number to calculate the digit contentpublic static java.lang.String envreplace(java.lang.String change)
change - the string to modify.
public static java.io.File getCurrentPWD()
public static void setCurrentPWD(java.io.File newPWD)
newPWD - the new directory to use as the "PWD"public static boolean isDigit(char test)
test - the character to test.
|
BioLegato 0.7.5 Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||