edu.iastate.metnet.metaomgraph
Class MetaOmTablePanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by edu.iastate.metnet.metaomgraph.MetaOmTablePanel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.event.ListSelectionListener

public class MetaOmTablePanel
extends javax.swing.JPanel
implements java.awt.event.ActionListener, javax.swing.event.ListSelectionListener, javax.swing.event.ChangeListener

A JPanel for displaying information related to a MetaOmProject, and accessing many of MetaOmGraph's functions. The panel contains a JTabbedPane with at least one tab. The first tab is the main project window for MetaOmGraph. It contains row names, gene lists, and buttons for all major MetaOmGraph operations. The second tab is optional, and only appears when the

Author:
Nick Ransom
See Also:
Serialized Form

Nested Class Summary
 class MetaOmTablePanel.ListNameComparator
          Comparator for comparing names of lists.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
static java.lang.String ATGENESEARCH_COMMAND
           
static java.lang.String DELETE_LIST_COMMAND
           
static java.lang.String EDIT_LIST_COMMAND
           
static java.lang.String GRAPH_FILTERED_COMMAND
           
static java.lang.String GRAPH_LIST_COMMAND
           
static java.lang.String GRAPH_SELECTED_COMMAND
           
static java.lang.String LIST_FROM_FILTER_COMMAND
           
static java.lang.String NEW_LIST_COMMAND
           
static java.lang.String PEARSON_COMMAND
           
static java.lang.String REMOVE_ALL_CORRELATIONS_COMMAND
           
static java.lang.String REMOVE_CORRELATION_COMMAND
           
static java.lang.String RENAME_LIST_COMMAND
           
static java.lang.String REPORT_COMMAND
           
static java.lang.String SAVE_CORRELATION_COMMAND
           
static java.lang.String SPEARMAN_COMMAND
           
static java.lang.String TAIR_COMMAND
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
MetaOmTablePanel(MetaOmProject project)
          Constructs a MetaOmTablePanel from the given MetaOmProject.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addExtInfoTab()
           
 void applyFilter(java.lang.String[] values, boolean caseSensitive)
           
 void applyFilter(java.lang.String value, boolean caseSensitive)
           
 void deleteSelectedList()
           
 int[] getAllTrueRows()
           
 javax.swing.JList getGeneLists()
           
 CorrelationValue[] getLastCorrelation()
           
 javax.swing.JTable getListDisplay()
           
 int getSelectedGeneIndex()
           
 java.lang.String getSelectedGeneName()
           
 java.lang.String getSelectedListName()
           
 TableSorter getSorter()
           
 javax.swing.JTabbedPane getTabbedPane()
           
 javax.swing.JTable getTable()
           
 int getTrueRow(int row)
           
 int getTrueSelectedRow()
           
 int[] getTrueSelectedRows()
           
 void graphFilteredList()
          Creates a plot for all the rows allowed by the current filter and displays it in a JInternalFrame.
 void graphSelectedList()
          Creates a plot for the selected list and displays it in a JInternalFrame.
 void graphSelectedRows()
          Creates a plot for the selected rows and displays it in a JInternalFrame.
 boolean keepLastCorrelation()
           
 void launchAtGeneSearch()
          Opens a browser to the AtGeneSearch results page for the selected rows.
 void launchTAIR()
          Opens a browser to the TAIR page for the selected rows.
 void makeReport()
          Generates a report for the selected row.
 void selectList(java.lang.String listName)
          Selects the given gene list, if it exists.
 void selectNode(java.lang.String findMe)
           
 void selectRows(java.util.Collection<java.lang.Integer> rows)
           
 void selectValues(java.lang.String[] values)
           
 void setExtInfoDividerPos(double pos)
           
 void setLastCorrelation(CorrelationValue[] lastCorrelation)
           
 void sizeColumnsToFit()
          Resizes the columns of the entry table to their initial length.
 void stateChanged(javax.swing.event.ChangeEvent event)
          Called when this table's MetaOmProject changes.
 void valueChanged(javax.swing.event.ListSelectionEvent event)
          Called when a new gene list is selected.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRAPH_LIST_COMMAND

public static final java.lang.String GRAPH_LIST_COMMAND
See Also:
Constant Field Values

GRAPH_SELECTED_COMMAND

public static final java.lang.String GRAPH_SELECTED_COMMAND
See Also:
Constant Field Values

GRAPH_FILTERED_COMMAND

public static final java.lang.String GRAPH_FILTERED_COMMAND
See Also:
Constant Field Values

REPORT_COMMAND

public static final java.lang.String REPORT_COMMAND
See Also:
Constant Field Values

ATGENESEARCH_COMMAND

public static final java.lang.String ATGENESEARCH_COMMAND
See Also:
Constant Field Values

TAIR_COMMAND

public static final java.lang.String TAIR_COMMAND
See Also:
Constant Field Values

LIST_FROM_FILTER_COMMAND

public static final java.lang.String LIST_FROM_FILTER_COMMAND
See Also:
Constant Field Values

DELETE_LIST_COMMAND

public static final java.lang.String DELETE_LIST_COMMAND
See Also:
Constant Field Values

NEW_LIST_COMMAND

public static final java.lang.String NEW_LIST_COMMAND
See Also:
Constant Field Values

EDIT_LIST_COMMAND

public static final java.lang.String EDIT_LIST_COMMAND
See Also:
Constant Field Values

RENAME_LIST_COMMAND

public static final java.lang.String RENAME_LIST_COMMAND
See Also:
Constant Field Values

PEARSON_COMMAND

public static final java.lang.String PEARSON_COMMAND
See Also:
Constant Field Values

SPEARMAN_COMMAND

public static final java.lang.String SPEARMAN_COMMAND
See Also:
Constant Field Values

SAVE_CORRELATION_COMMAND

public static final java.lang.String SAVE_CORRELATION_COMMAND
See Also:
Constant Field Values

REMOVE_CORRELATION_COMMAND

public static final java.lang.String REMOVE_CORRELATION_COMMAND
See Also:
Constant Field Values

REMOVE_ALL_CORRELATIONS_COMMAND

public static final java.lang.String REMOVE_ALL_CORRELATIONS_COMMAND
See Also:
Constant Field Values
Constructor Detail

MetaOmTablePanel

public MetaOmTablePanel(MetaOmProject project)
Constructs a MetaOmTablePanel from the given MetaOmProject.

Parameters:
project - the MetaOmProject to be displayed
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent event)
Called when this table's MetaOmProject changes. Refreshes the gene lists and the entries table.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener
Parameters:
event - a ChangeEvenet object

selectList

public void selectList(java.lang.String listName)
Selects the given gene list, if it exists.

Parameters:
listName - the name of the list to select

sizeColumnsToFit

public void sizeColumnsToFit()
Resizes the columns of the entry table to their initial length. Column widths will be a) wide enough to display the longest element in that column, b) wide enough to display the longest element in that column up to the first semicolon (if one exists), or c) 300 pixels. Whichever's smaller.


valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent event)
Called when a new gene list is selected. Loads the selected list's entries into the entries table.

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
event - a ListSelectionEvent object

launchAtGeneSearch

public void launchAtGeneSearch()
Opens a browser to the AtGeneSearch results page for the selected rows. Displays an error if there are no gene IDs in the selected rows.


launchTAIR

public void launchTAIR()
Opens a browser to the TAIR page for the selected rows. Displays an error if there are no Locus IDs in the selected rows.


makeReport

public void makeReport()
Generates a report for the selected row. Currently, this can only be used to find columns in which the value of the row is greater than a given value.


graphSelectedRows

public void graphSelectedRows()
Creates a plot for the selected rows and displays it in a JInternalFrame. Only to be used with MetaOmGraph.


graphSelectedList

public void graphSelectedList()
Creates a plot for the selected list and displays it in a JInternalFrame. Only to be used with MetaOmGraph.


graphFilteredList

public void graphFilteredList()
Creates a plot for all the rows allowed by the current filter and displays it in a JInternalFrame. Only to be used with MetaOmGraph.


deleteSelectedList

public void deleteSelectedList()

getSelectedGeneName

public java.lang.String getSelectedGeneName()

getSelectedGeneIndex

public int getSelectedGeneIndex()

addExtInfoTab

public void addExtInfoTab()

selectNode

public void selectNode(java.lang.String findMe)

setExtInfoDividerPos

public void setExtInfoDividerPos(double pos)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getTrueRow

public int getTrueRow(int row)

getAllTrueRows

public int[] getAllTrueRows()

getTrueSelectedRow

public int getTrueSelectedRow()

getTrueSelectedRows

public int[] getTrueSelectedRows()

getSorter

public TableSorter getSorter()

getTable

public javax.swing.JTable getTable()

selectRows

public void selectRows(java.util.Collection<java.lang.Integer> rows)

selectValues

public void selectValues(java.lang.String[] values)

applyFilter

public void applyFilter(java.lang.String[] values,
                        boolean caseSensitive)

applyFilter

public void applyFilter(java.lang.String value,
                        boolean caseSensitive)

getLastCorrelation

public CorrelationValue[] getLastCorrelation()

setLastCorrelation

public void setLastCorrelation(CorrelationValue[] lastCorrelation)

keepLastCorrelation

public boolean keepLastCorrelation()

getTabbedPane

public javax.swing.JTabbedPane getTabbedPane()

getSelectedListName

public java.lang.String getSelectedListName()

getListDisplay

public javax.swing.JTable getListDisplay()
Returns:
Returns the listDisplay.

getGeneLists

public javax.swing.JList getGeneLists()
Returns:
Returns the geneLists.