biggests.tables
Class TableFunctionGroup

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTable
                  extended by biggests.tables.TableFunctionGroup
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.CellEditorListener, javax.swing.event.ListSelectionListener, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener, javax.swing.Scrollable

public class TableFunctionGroup
extends javax.swing.JTable

Title: Table of Functions for a Group of Biclusters

Description: Defines a table for displaying data of function analysis performed on a given a group of biclusters.
It contains the following information:
1st column - Bicluster ID
2nd column - Number of Genes
3rd column - Number of Conditions
4th column - Best p-value
5th column - Best corrected p-value
6th column - Number of significant functions
7th column - Number of highly significant functions
8th column - P-value user's threshold
9th column - Number of significant functions (user's threshold)
Note: if the bicluster group is a post-processed one, an an extra column is added at the beggining, holding the post-processed bicluster id.

Copyright: Copyright (C) 2007 Joana Gonçalves This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See Also:
Serialized Form

Nested Class Summary
protected static class TableFunctionGroup.FloatCellRenderer
          Title: FloatCellRenderer: A renderer for cells which contain float numbers.
protected static class TableFunctionGroup.NumberCellRenderer
          Title: NumberCellRenderer: A renderer for cells which contain numbers.
 
Nested classes/interfaces inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable, javax.swing.JTable.PrintMode
 
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.awt.Color EVEN_ROWS_COLOR
          Default color to user in even rows (when they are not selected).
static java.awt.Color ODD_ROWS_COLOR
          Default color to user in odd rows (when they are not selected).
static java.awt.Color SIGNIFICANT_COLOR
          Default color to mark rows that contain biclusters with significant terms.
 
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
 
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
  TableFunctionGroup(Biclustering biclustering, java.util.Hashtable<java.lang.Integer,BiologicalRelevanceSummary> biologicalRelevanceSummary, boolean postProcessed)
          Creates a new function table from the data of a biclusters group object.
protected TableFunctionGroup(java.lang.Object[][] rowData, java.lang.Object[] columnNames, boolean postProcessed)
          Creates a new function table from the data of a biclusters group object.
protected TableFunctionGroup(TableSorterFunctionGroup tableSorterModel)
          Creates a new function table from the data of a biclusters group object.
 
Method Summary
static java.lang.String[] columnNames(boolean postProcessed)
          Returns the abbreviated names for the columns of this functions table.
static java.lang.String[] completeColumnNames(boolean postProcessed)
          Returns the complete names of the columns of this functions table.
protected static java.lang.Object[][] constructRowData(Biclustering biclustering, java.util.Hashtable<java.lang.Integer,BiologicalRelevanceSummary> biologicalRelevanceSummary, boolean postProcessed)
          Constructs the row data matrix with data retrieved from the biclustering object.
protected  javax.swing.table.JTableHeader createDefaultTableHeader()
          Overrides JTable's createDefaultTableHeader method.
 java.awt.Color getEvenRowsColor()
          Returns the Color used to mark even rows that are not selected.
 java.awt.Color getOddRowsColor()
          Returns the Color used to mark odd rows that are not selected.
 java.awt.Color getSignificantColor()
          Returns the Color used to mark significant terms.
 java.lang.String getToolTipText(java.awt.event.MouseEvent event)
          Overrides JTable's getToolTipText method in order to allow the renderer's tips to be used if they have text set.
 java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer, int row, int column)
          Overrides JTable's prepareRenderer method.
 void setEvenRowsColor(java.awt.Color newEvenRowsColor)
          Sets a new color to mark even rows that are not selected.
 void setOddRowsColor(java.awt.Color newOddRowsColor)
          Sets a new color to mark odd rows that are not selected.
 void setSignificantColor(java.awt.Color newSignificantColor)
          Sets a new color to mark significant terms.
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, changeSelection, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createScrollPaneForTable, doLayout, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isRowSelected, moveColumn, paramString, prepareEditor, print, print, print, print, processKeyBinding, removeColumn, removeColumnSelectionInterval, removeEditor, removeNotify, removeRowSelectionInterval, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, unconfigureEnclosingScrollPane, updateUI, valueChanged
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, 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

SIGNIFICANT_COLOR

public static final java.awt.Color SIGNIFICANT_COLOR
Default color to mark rows that contain biclusters with significant terms.


EVEN_ROWS_COLOR

public static final java.awt.Color EVEN_ROWS_COLOR
Default color to user in even rows (when they are not selected).


ODD_ROWS_COLOR

public static final java.awt.Color ODD_ROWS_COLOR
Default color to user in odd rows (when they are not selected).

Constructor Detail

TableFunctionGroup

public TableFunctionGroup(Biclustering biclustering,
                          java.util.Hashtable<java.lang.Integer,BiologicalRelevanceSummary> biologicalRelevanceSummary,
                          boolean postProcessed)
                   throws InvalidNodeObjectTypeException
Creates a new function table from the data of a biclusters group object.

Parameters:
biclustering - the Biclustering from which the function table is created
biologicalRelevanceSummary - the Hashtable which contains the biological relevance summaries for all biclusters' group biclusters
postProcessed - boolean true if biclustering is a post-processed biclusters group object
Throws:
InvalidNodeObjectTypeException - when the type of the biclustering object is not valid
See Also:
#constructRowData(Biclustering biclustering), #TableFunctionGroup(Object[][] rowData, Object[] columnNames))

TableFunctionGroup

protected TableFunctionGroup(java.lang.Object[][] rowData,
                             java.lang.Object[] columnNames,
                             boolean postProcessed)
Creates a new function table from the data of a biclusters group object.

Parameters:
rowData - the Object[][] row data (for all table cells except the ones from the table header)
columnNames - the Object[] column names (for the table header)
postProcessed - boolean true if biclustering is a post-processed biclusters group object
See Also:
TableFunctionGroup(TableSorterFunctionGroup tableSorterModel), applicationgui.utils.TableSorter#TableSorter(TableModel tableModel), DefaultTableModel.DefaultTableModel(Object[][] rowData, Object[] columnNames)

TableFunctionGroup

protected TableFunctionGroup(TableSorterFunctionGroup tableSorterModel)
Creates a new function table from the data of a biclusters group object.

Parameters:
tableSorterModel - the TableSorter model for the table
See Also:
JTable.JTable(TableModel dm)
Method Detail

prepareRenderer

public java.awt.Component prepareRenderer(javax.swing.table.TableCellRenderer renderer,
                                          int row,
                                          int column)
Overrides JTable's prepareRenderer method. Prepares the renderer by querying the data model for the value and selection state of the cell at row, column. Returns the component (may be a Component or a JComponent) under the event location.

Overrides:
prepareRenderer in class javax.swing.JTable
Parameters:
renderer - the TableCellRenderer to prepare
row - the row of the cell to render, where 0 is the first row
column - the column of the cell to render, where 0 is the first column
Returns:
the Component under the event location
See Also:
JTable.prepareRenderer(TableCellRenderer renderer, int row, int column)

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
Overrides JTable's getToolTipText method in order to allow the renderer's tips to be used if they have text set.

Overrides:
getToolTipText in class javax.swing.JTable
Parameters:
event - MouseEvent the event that triggered the tool tip display
Returns:
String the message set as tool tip for the pointed table cell
See Also:
JTable.getToolTipText(MouseEvent event)

createDefaultTableHeader

protected javax.swing.table.JTableHeader createDefaultTableHeader()
Overrides JTable's createDefaultTableHeader method.
Creates the default table header for a values' table, that is, a header with specific text tool tips for this kind of table.

Overrides:
createDefaultTableHeader in class javax.swing.JTable
Returns:
an instance of TableHeaderFunction, i.e, a specific table header for a table of functions
See Also:
JTable.columnModel, JTable.createDefaultTableHeader(), applicationgui.utils.TableHeader#TableHeader(TableColumnModel cm)

constructRowData

protected static java.lang.Object[][] constructRowData(Biclustering biclustering,
                                                       java.util.Hashtable<java.lang.Integer,BiologicalRelevanceSummary> biologicalRelevanceSummary,
                                                       boolean postProcessed)
                                                throws InvalidNodeObjectTypeException
Constructs the row data matrix with data retrieved from the biclustering object.

The final structure of the row data is:
for GROUPS OF BICLUSTERS
1st column - Bicluster ID
2nd column - Number of Genes
3rd column - Number of Conditions
4th column - Best p-value
5th column - Best corrected p-value
6th column - Number of significant functions
7th column - Number of highly significant functions
8th column - P-value user's threshold 9th column - Number of significant functions (user's threshold)
for POST-PROCESSED GROUPS OF BICLUSTERS
1st column - Post-Processed ID
2nd column - Bicluster ID
3rd column - Number of Genes
4th column - Number of Conditions
5th column - Best p-value
6th column - Best corrected p-value
7th column - Number of significant functions
8th column - Number of highly significant functions
9th column - P-value user's threshold 10th column - Number of significant functions (user's threshold)

Parameters:
biclustering - the Biclustering object which provides the data needed to create the row data matrix
biologicalRelevanceSummary - Hashtable contains the summary of function analysis results for all the biclusters in the group of biclusters (biclustering)
postProcessed - boolean true if biclustering is a post-processed biclusters group object
Returns:
the Object[][] row data matrix, ready to be used by TableFunctionGroup's constructor
Throws:
InvalidNodeObjectTypeException - when the type of the biclustering object is not valid

columnNames

public static java.lang.String[] columnNames(boolean postProcessed)
Returns the abbreviated names for the columns of this functions table. The abbreviated column names for the header of this table of functions.
GROUP OF BICLUSTERS:
1st column - Bicluster ID
2nd column - # Genes
3rd column - # Conditions
4th column - Best p-value
5th column - Best corrected p-value
6th column - # Significant terms
7th column - # Highly sig terms
8th column - Significance threshold
9th column - # Sig terms (threshold)
POST-PROCESSED GROUP OF BICLUSTERS:
1st column - Post-Processed ID
2nd column - Parent ID
3rd column - # Genes
4th column - # Conditions
5th column - Best p-value
6th column - Best corrected p-value
7th column - # Significant terms
8th column - # Highly sig terms
9th column - Significance threshold
10th column - # Sig terms (threshold)

Parameters:
postProcessed - boolean true if biclustering is a post-processed biclusters group object
Returns:
the String[] set of abbreviated columns names

completeColumnNames

public static java.lang.String[] completeColumnNames(boolean postProcessed)
Returns the complete names of the columns of this functions table. Complete column names for the header of this table of functions:
BICLUSTERS GROUP:
1st column - Bicluster ID
2nd column - Number of Genes
3rd column - Number of Conditions
4th column - Best p-value
5th column - Best corrected p-value
6th column - Number of Significant Rerms
7th column - Number of Highly Significant Rerms
8th column - Significance threshold
9th column - Number of Significant Terms (below significance threshold)
POST-PROCESSED BICLUSTER GROUP:
1st column - Post-Processed ID
2nd column - Bicluster ID
3rd column - Number of Genes
4th column - Number of Conditions
5th column - Best p-value
6th column - Best corrected p-value
7th column - Number of Significant Terms
8th column - Number of Highly Significant Terms
9th column - Significance threshold
10th column - Number of Significant Terms (below significance threshold)

Parameters:
postProcessed - boolean true if biclustering is a post-processed biclusters group object
Returns:
the String[] set of complete columns names

getSignificantColor

public java.awt.Color getSignificantColor()
Returns the Color used to mark significant terms.

Returns:
Color used to mark significant terms

getEvenRowsColor

public java.awt.Color getEvenRowsColor()
Returns the Color used to mark even rows that are not selected.

Returns:
Color used to mark even rows that are not selected

getOddRowsColor

public java.awt.Color getOddRowsColor()
Returns the Color used to mark odd rows that are not selected.

Returns:
Color used to mark odd rows that are not selected

setSignificantColor

public void setSignificantColor(java.awt.Color newSignificantColor)
Sets a new color to mark significant terms.

Parameters:
newSignificantColor - Color to mark significant terms

setEvenRowsColor

public void setEvenRowsColor(java.awt.Color newEvenRowsColor)
Sets a new color to mark even rows that are not selected.

Parameters:
newEvenRowsColor - Color to mark even rows that are not selected

setOddRowsColor

public void setOddRowsColor(java.awt.Color newOddRowsColor)
Sets a new color to mark odd rows that are not selected.

Parameters:
newOddRowsColor - Color to mark odd rows that are not selected