AFLPgui
Class FragmentMap
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--AFLPgui.FragmentMap
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.awt.event.WindowListener
- public class FragmentMap
- extends java.awt.Frame
- implements java.awt.event.ActionListener, java.awt.event.WindowListener
This is the main GenoGrapher program window. It displays all of the
data and manages the classes. It takes care of all of the menu items
and switches between different data view. It can display the data as
a standard gel image, as a set of thumbnails for the current bin,
a graph of the bin, a trace, or as text analysis. These view are
actually created in seperate classes. Each of these views has it's own
button bar and info bar, but this class picks which one to display.
It also handles the printing of the views as well as saving, opening,
importing, and exporting files. Most of the views do a lot of work in
their respective classes, but this one manages them all.
- See Also:
- Serialized Form
Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary |
FragmentMap()
Create a new FragmentMap. |
FragmentMap(java.lang.String[] argv)
Create a new FragmentMap. |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handles the events from buttons and menu items. |
java.awt.MenuItem[] |
addMenu(java.awt.Menu menu,
Manager mgr)
Adds Operation s from the specified Manager
to the specified menu and stores the menu items. |
void |
exportView(int view)
This will export the specified data view out to a file. |
void |
readFile(java.lang.String fileName)
Reads the specified file in to the program. |
protected void |
showAbout()
Displays an about dialog box for the program. |
void |
switchTo(java.lang.String value)
Change the program display so that it displays the type specified. |
void |
windowActivated(java.awt.event.WindowEvent e)
Unused |
void |
windowClosed(java.awt.event.WindowEvent e)
Unused |
void |
windowClosing(java.awt.event.WindowEvent e)
exits the program when the window is closed. |
void |
windowDeactivated(java.awt.event.WindowEvent e)
Unused |
void |
windowDeiconified(java.awt.event.WindowEvent e)
Unused |
void |
windowIconified(java.awt.event.WindowEvent e)
Unused |
void |
windowOpened(java.awt.event.WindowEvent e)
Unused |
void |
writeFile(java.lang.String fileName)
Writes the gel out to the specified file name. |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, paramString, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle |
Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
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 |
GEL
public static final int GEL
THUMBNAIL
public static final int THUMBNAIL
GRAPH
public static final int GRAPH
TRACE
public static final int TRACE
ANALYSIS
public static final int ANALYSIS
BAR_HEIGHT
protected static int BAR_HEIGHT
newItem
protected java.awt.MenuItem newItem
openItem
protected java.awt.MenuItem openItem
saveItem
protected java.awt.MenuItem saveItem
saveAsItem
protected java.awt.MenuItem saveAsItem
importItem
protected java.awt.MenuItem importItem
exportItem
protected java.awt.MenuItem exportItem
printItem
protected java.awt.MenuItem printItem
exitItem
protected java.awt.MenuItem exitItem
laneDeleteItem
protected java.awt.MenuItem laneDeleteItem
laneOpItem
protected java.awt.MenuItem[] laneOpItem
binRedrawItem
protected java.awt.MenuItem binRedrawItem
binOpItem
protected java.awt.MenuItem[] binOpItem
gelRedrawItem
protected java.awt.MenuItem gelRedrawItem
gelOpItem
protected java.awt.MenuItem[] gelOpItem
viewGelItem
protected java.awt.MenuItem viewGelItem
viewThumbnailItem
protected java.awt.MenuItem viewThumbnailItem
viewGraphItem
protected java.awt.MenuItem viewGraphItem
viewTraceItem
protected java.awt.MenuItem viewTraceItem
viewAnalysisItem
protected java.awt.MenuItem viewAnalysisItem
helpItem
protected java.awt.MenuItem helpItem
aboutItem
protected java.awt.MenuItem aboutItem
newButton
protected java.awt.Button newButton
openButton
protected java.awt.Button openButton
saveButton
protected java.awt.Button saveButton
printButton
protected java.awt.Button printButton
gel
protected Gel gel
gelView
protected GelView gelView
thumbnail
protected Thumbnail thumbnail
graph
protected GraphView graph
trace
protected TraceView trace
analysis
protected AnalysisView analysis
mainPanel
protected java.awt.ScrollPane mainPanel
buttonBar
protected ButtonBar buttonBar
infoBar
protected Bar infoBar
statusBar
protected Bar statusBar
bottomP
protected java.awt.Panel bottomP
statusLabel
protected java.awt.Label statusLabel
defaultCutoff
protected double defaultCutoff
currentView
protected int currentView
currentBin
protected Bin currentBin
importDialog
protected MultiFileDialog importDialog
fileDialog
protected java.awt.FileDialog fileDialog
errorDialog
protected AFLPgui.ErrorDialog errorDialog
currentFile
protected java.lang.String currentFile
currentDir
protected java.lang.String currentDir
modified
protected boolean modified
FragmentMap
public FragmentMap()
- Create a new FragmentMap. This is the main program window.
FragmentMap
public FragmentMap(java.lang.String[] argv)
- Create a new FragmentMap. This is the main program window.
- Parameters:
command
- line parameters. The only value accepted is
the path for the program files. It should be
the same as the startup directory.
switchTo
public void switchTo(java.lang.String value)
- Change the program display so that it displays the type specified.
Possible values are: "Gel" "Thumbnail" "Graph" "Trace" and "Analysis".
This will handle switching the button bars as well as the main window.
- Parameters:
value
- the view to switch the display to.
readFile
public void readFile(java.lang.String fileName)
- Reads the specified file in to the program. The file should be the
result of writing out a gel. This is the format used by the program.
This is the result of an open operation.
- Parameters:
fileName
- the name of a gel file written by the program.- See Also:
Gel.read(java.io.DataInputStream)
,
writeFile(java.lang.String)
writeFile
public void writeFile(java.lang.String fileName)
- Writes the gel out to the specified file name. This will write all of
the information in the program session. In other words, it saves the
session. The file can be restored with the
readFile
method.
- Parameters:
fileName
- the name of the file to write to.- See Also:
Gel.write(java.io.DataOutputStream)
,
readFile(java.lang.String)
exportView
public void exportView(int view)
- This will export the specified data view out to a file. A dialog
box will be presented to allow the user to select a file name.
Only the gel and analysis currently support exporting. The gel is
exported as a PNG file, which can be read by several graphics programs.
The analysis is exported as a simple text file.
- Parameters:
view
- corresponds to one of the constants declared in this
class: GEL
, THUMBNAIL
,
GRAPH
, TRACE
, or
ANALYSIS
. Only GEL
and
ANALYSIS
are currently supported.
showAbout
protected void showAbout()
- Displays an about dialog box for the program.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Handles the events from buttons and menu items.
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- exits the program when the window is closed.
- Specified by:
windowClosing
in interface java.awt.event.WindowListener
addMenu
public java.awt.MenuItem[] addMenu(java.awt.Menu menu,
Manager mgr)
- Adds
Operation
s from the specified Manager
to the specified menu and stores the menu items. If the manager
contains anything, the mehtod will add a separator to the menu before
it adds any of the items.
- Parameters:
menu
- the menu to add the items to.mgr
- the manager to retrieve the operations from- Returns:
- an array containing all of the menu items added.
- See Also:
Manager
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Unused
- Specified by:
windowOpened
in interface java.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Unused
- Specified by:
windowClosed
in interface java.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Unused
- Specified by:
windowIconified
in interface java.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Unused
- Specified by:
windowDeiconified
in interface java.awt.event.WindowListener
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Unused
- Specified by:
windowActivated
in interface java.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Unused
- Specified by:
windowDeactivated
in interface java.awt.event.WindowListener