|
BioLegato 0.5.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.biolegato.core.main.ProgramWindow
public final class ProgramWindow
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 |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
javax.swing.JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Sequence[] |
clipboard
Global clipboard used for copy, cut, and paste |
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. |
protected SeqDoc |
mainSeqDoc
The main data container for BioLegato. |
static java.lang.String |
PROGRAM_DIR
This constant is set to the path of BioLegato.jar The value of this constant determined at runtime. |
protected BLProperties |
properties
Stores the properties for BioLegato. |
static long |
serialVersionUID
This constant is used for Serialization |
static java.lang.String |
VERSION
This constant is used to keep track of version changes. |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
|---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ProgramWindow(java.lang.String[] args)
Creates a new instance of ProgramWindow. |
|
| Method Summary | |
|---|---|
void |
aboutPopup()
Displays an about popup for BioLegato. |
void |
addData(Sequence[] dataAdd)
Adds the data to the canvas. |
javax.swing.JMenu |
addMenuHeading(int order,
java.lang.String name)
Adds a menu heading (JMenu) to our menu (BLMenu). |
javax.swing.JMenu |
addMenuHeading(java.lang.String name)
Adds a menu heading (JMenu) to our menu (BLMenu). |
void |
addMenuItem(java.lang.String headingName,
javax.swing.JMenuItem menuItem)
Adds a menu item (JMenuItem) to a menu heading (JMenu) within the window (ProgramWindow) |
void |
addPropertiesListener(java.lang.String key,
PropertiesListener listener)
Adds a properties listener to the properties object. |
Sequence[] |
getAllData()
Returns the complete contents of the data in the canvas. |
Sequence[] |
getClipboard()
Obtains the current contents of the clipboard. |
Sequence[] |
getData()
Returns the current/selected data in the canvas. |
java.lang.String |
getProperty(java.lang.String property)
Retrieves individual settings for BioLegato. |
SeqDoc |
getSeqDoc()
Returns the root sequence document for BioLegato. |
java.lang.Process |
safeExecute(java.lang.String cmd)
Ensures that the command will be executed properly as a shell command |
void |
setClipboard(Sequence[] copy)
Changes the current contents of the clipboard. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Changes properties for BioLegato. |
void |
shellCommand(java.lang.String cmd,
java.lang.String data)
Runs simple shell commands. |
| Methods inherited from class javax.swing.JFrame |
|---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
|---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
protected BLProperties 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 |
| shell.name | Yes | determines the shell to execute |
| shell.parameter | Yes | determines the parameter for directing the shell to execute a command |
| user.properties | Yes | determines whether or not to read the user's propery files (located in the user's home directory |
| user.properties | Yes | determines whether or not to read the user's plugin files (located in the user's home directory |
| default.canvas | Yes | determines the default canvas to show on startup |
| default.fileformat | Yes | determines the default file format for open/save dialogs |
| default.fontsize | Yes | determines the default font size for objects in BioLegato |
| default.sequencename | No | determines the name of new GDE sequences |
| 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 |
protected SeqDoc mainSeqDoc
protected Sequence[] clipboard
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 ProgramWindow(java.lang.String[] args)
args - the command line arguments for BioLegato.| Method Detail |
|---|
public 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 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 void setProperty(java.lang.String key,
java.lang.String value)
key - the property to change.value - the new value for the property.public java.lang.String getProperty(java.lang.String property)
property - the property key to retrieve the value for
public void setClipboard(Sequence[] copy)
copy - the new content for the clipboard.public Sequence[] getClipboard()
public SeqDoc getSeqDoc()
public Sequence[] getData()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException - any exceiptions related to obtaining the data
public Sequence[] getAllData()
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationException - any location exceptions thrown by the underlying Document class
public void addData(Sequence[] dataAdd)
throws javax.swing.text.BadLocationException
dataAdd - the data to add to the canvas.
javax.swing.text.BadLocationException - any exceptions thrown by the underlying document classpublic javax.swing.JMenu addMenuHeading(java.lang.String name)
name - the name of the menu heading
public 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 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 void aboutPopup()
public 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.
|
BioLegato 0.5.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||