|
BioLegato 0.6.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biolegato.core.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.
| Field Summary | |
|---|---|
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 java.awt.Font |
DEFAULT_FONT
The default font for BioLegato |
static int |
DOUBLE_CLICK_TIME
The amount of time between clicks to be considered a double click. |
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 void |
aboutPopup()
Displays an about popup for BioLegato. |
static void |
addData(Sequence[] dataAdd)
Adds the data to the canvas. |
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(java.lang.String headingName,
javax.swing.JMenuItem menuItem)
Adds a menu item (JMenuItem) to a menu heading (JMenu) within the window (ProgramWindow) |
static void |
addPropertiesListener(java.lang.String key,
PropertiesListener listener)
Adds a properties listener to the properties object. |
static void |
error(java.lang.String message)
Sends an error message to BioLegato's standard err. |
static void |
error(java.lang.String message,
java.lang.String location)
Sends an error message to BioLegato's standard err. |
static Sequence[] |
getAllData()
Returns the complete contents of the data in the canvas. |
static Sequence[] |
getClipboard()
Obtains the current contents of the clipboard (null if empty). |
static Sequence[] |
getData()
Returns the current/selected data in the canvas. |
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 SeqDoc |
getSeqDoc()
Returns the root sequence document for BioLegato. |
static void |
main(java.lang.String[] args)
Starts up BioLegato. |
static void |
message(java.lang.String message)
Sends a message to BioLegato's standard out. |
static void |
message(java.lang.String message,
java.lang.String location)
Sends a message to BioLegato's standard out. |
static java.lang.String |
readStream(java.io.BufferedReader reader)
Reads the complete contents of a BufferedReader into a string. |
static java.lang.Process |
safeExecute(java.lang.String cmd)
Ensures that the command will be executed properly as a shell command |
static void |
setClipboard(Sequence[] copy)
Changes the current contents of the clipboard. |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Changes properties for BioLegato. |
static void |
shellCommand(java.lang.String cmd,
java.lang.String data)
Runs simple shell commands. |
static boolean |
testNumber(char[] test)
Checks if a character array is all digits. |
static void |
warning(java.lang.String message)
Sends an warning message to BioLegato's standard err. |
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 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.awt.Font DEFAULT_FONT
public static final int DOUBLE_CLICK_TIME
public static final long serialVersionUID
| Constructor Detail |
|---|
public BLMain()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line arguments for BioLegato.
public static void setProperty(java.lang.String key,
java.lang.String value)
key - the property to change.value - the new value for the property.public static java.lang.String getProperty(java.lang.String property)
property - the property key to retrieve the value for
public static Sequence[] getClipboard()
public static void setClipboard(Sequence[] copy)
copy - the new content for the clipboard.public static SeqDoc getSeqDoc()
public static Sequence[] getData()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException - any exceiptions related to obtaining the data
public static Sequence[] getAllData()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException - any location exceptions thrown by the underlying Document classpublic static void addData(Sequence[] dataAdd)
dataAdd - the data to add to the canvas.
javax.swing.text.BadLocationException - any exceptions thrown by the underlying document classpublic 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(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 aboutPopup()
public static void addPropertiesListener(java.lang.String key,
PropertiesListener listener)
key - the key of the properties to listen to.listener - the listener to add to the object.public static java.lang.Process safeExecute(java.lang.String cmd)
This function generates a command list for execution. The command list will contain the appropriate shell for the current operating system, followed by the "execution-argument", (whatever flag is required to tell the shell that the rest of the commandline should be executed by the shell), followed by the command to execute (the variable cmd)
Operating system values obtained from http://lopica.sourceforge.net/os.html
cmd - the command string to execute
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)
message - the error message to send.
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)
message - the warning message to send.
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)
message - the message to send.
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 java.lang.String readStream(java.io.BufferedReader reader)
throws java.io.IOException
reader - the BufferedReader to read.
java.io.IOException - throws any exceptions from the read operation.public static boolean testNumber(char[] test)
test - the character array to test.
|
BioLegato 0.6.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||