AFLPgui
Class AnalysisView

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--AFLPgui.AnalysisView
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, java.io.Serializable

public class AnalysisView
extends java.awt.Panel
implements java.awt.event.ItemListener

This class is responsible for displaying methods to analyze a gel and the results of the analysis. The analysis output is text, so it is simply displayed in a text area. A choice box is provided to switch between the different analysis methods. In addition to the main panel, which contains the TextArea, this class has a ButtonBar with controls and a Bar to display its status. These should be displayed by whichever object is displaying this. Also, this class expects to be contained by a ScrollPane. (To change this, modify the paint method.)

See Also:
Serialized Form

Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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.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
AnalysisView(java.awt.Frame parentWin)
          Create a new analysis view with the specified parent window.
 
Method Summary
 ButtonBar getButtonBar()
          Gives the button bar used by this class.
 Bar getInfoBar()
          Gives the label that this class uses to provide status information.
 java.lang.String getText()
          Gives the text currently displayed in the output text area.
 void init(Gel gel)
          This runs whatever analysis operation is selected, or the default if none has been choosen yet.
 void itemStateChanged(java.awt.event.ItemEvent e)
          Called to handle item events.
 void paint(java.awt.Graphics g)
          This is used to resize the text area.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
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, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, 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, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnalysisView

public AnalysisView(java.awt.Frame parentWin)
Create a new analysis view with the specified parent window. The parent window is used as a parameter for dialog box.
Parameters:
parentWin - the window that contains this class
Method Detail

init

public void init(Gel gel)
This runs whatever analysis operation is selected, or the default if none has been choosen yet. The output from that method is then displayed in a text area.
Parameters:
gel - the gel to analyze

getText

public java.lang.String getText()
Gives the text currently displayed in the output text area.
Returns:
the text

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Called to handle item events. It watches for the selection box for the analysis method to change, and when it does, it re-runs the analysis.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

paint

public void paint(java.awt.Graphics g)
This is used to resize the text area. Note: it assumes that the text area is contained by a ScrollPane. The size is set so that it mostly fills the display area. No actually drawing is handled here. Instead, the super is called.
Overrides:
paint in class java.awt.Container
Parameters:
g - the graphics object that represents the drawable area of this component.
See Also:
ScrollPane

getButtonBar

public ButtonBar getButtonBar()
Gives the button bar used by this class.
Returns:
a button bar with components specific to this class, as wells as the standard new, open, save, and print buttons.

getInfoBar

public Bar getInfoBar()
Gives the label that this class uses to provide status information.
Returns:
a bar containing the label described above.