biggests.gui
Class PanelExpression

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 biggests.gui.PanelExpression
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class PanelExpression
extends javax.swing.JPanel

Title: Expression Panel

Description: Displays expression charts. May contain bicluster time points, all time points or bicluster pattern charts. The charts are constructed from either single biclusters or groups of biclusters.

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
 
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 int ALL_TIME_POINTS
          Constant which defines all time points expression chart type.
static int BICLUSTER_TIME_POINTS
          Constant which defines bicluster time points expression chart type.
protected  BiggestsFrame mainFrame
          The application's main frame, where this panel is being displayed.
static int PATTERN
          Constant which defines pattern expression chart type.
 
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
PanelExpression(BiggestsFrame frame, int expressionType)
          Creates a new panel to display expression charts.
 
Method Summary
 void clear()
          Clears this panel.
 int getChartHeight()
          Returns the height of the displayed expression chart(s).
 int getChartWidth()
          Returns the width of the displayed expression chart(s).
 PanelExpressionChart getExpressionChart()
          Returns single bicluster's expression chart that is being displayed in this panel.
 PanelExpressionChart[] getExpressionCharts()
          Returns the expression charts of a set of biclusters (which belong to a specific group of biclusters).
 int getExpressionType()
          Returns the type of expression for this panel's chart.
 BiggestsFrame getMainFrame()
          Returns the application's main frame, where this panel is being displayed.
 javax.swing.JCheckBox getNormalize()
          Returns the check box which allows the user to choose between an expression chart with original or normalized data.
 javax.swing.JComboBox getOption()
          Returns the combo box for the user to choose the number of biclusters to display.
 Bicluster[] getSetOfBiclusters()
          Returns the set of biclusters retrieved from the group of biclusters to display.
 java.lang.String[] getVisualizationOption()
          Returns visualization options (number of biclusters to be displayed) to include in a combo box when the expression type is either BICLUSTER_TIME_POINTS or PATTERN and the corresponding object is a group of biclusters.
 void normalize_itemStateChanged(java.awt.event.ItemEvent e)
          Checks the option selected by the user in the normalize check box.
 void option_itemStateChanged(java.awt.event.ItemEvent e)
          Checks the option selected by the user in the "number of biclusters to display" combo box.
 void paintAllTimePointsChart(NodeInfo nodeInfo, NodeInfo parentNodeInfo)
          Paints an expression chart which data consists of the gene expression values for the genes in a specific nodeInfo matrix object under all conditions of a specific parentNodeInfo matrix object.
 void paintBiclusterPatternCharts(NodeInfo nodeInfo)
          Paints one bicluster / set of bicluster pattern charts.
 void paintBiclusterTimePointsCharts(NodeInfo nodeInfo)
          Paints one or a set of bicluster time points charts.
 void this_ancestorResized(java.awt.event.HierarchyEvent e)
           
 
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

BICLUSTER_TIME_POINTS

public static final int BICLUSTER_TIME_POINTS
Constant which defines bicluster time points expression chart type.

See Also:
Constant Field Values

ALL_TIME_POINTS

public static final int ALL_TIME_POINTS
Constant which defines all time points expression chart type.

See Also:
Constant Field Values

PATTERN

public static final int PATTERN
Constant which defines pattern expression chart type.

See Also:
Constant Field Values

mainFrame

protected BiggestsFrame mainFrame
The application's main frame, where this panel is being displayed.

Constructor Detail

PanelExpression

public PanelExpression(BiggestsFrame frame,
                       int expressionType)
Creates a new panel to display expression charts. This panel may hold three different types of expression charts:
- BICLUSTER_TIME_POINTS
- ALL_TIME_POINTS
- PATTERN

Parameters:
frame - the BiggestsFrame, where this panel is being displayed.
expressionType - the type of expression chart(s) which is/are being displayed in this panel
Method Detail

clear

public void clear()
Clears this panel. Removes the graphic components.


paintAllTimePointsChart

public void paintAllTimePointsChart(NodeInfo nodeInfo,
                                    NodeInfo parentNodeInfo)
Paints an expression chart which data consists of the gene expression values for the genes in a specific nodeInfo matrix object under all conditions of a specific parentNodeInfo matrix object.

Parameters:
nodeInfo - the NodeInfo with the matrix object to retrieve the genes
parentNodeInfo - the NodeInfo with the matrix object to retrieve all the conditions

paintBiclusterTimePointsCharts

public void paintBiclusterTimePointsCharts(NodeInfo nodeInfo)
Paints one or a set of bicluster time points charts. The expression values to display on the graph(s) are retrieved from the NodeInfo object.

Parameters:
nodeInfo - the NodeInfo which contains the matrix object(s) with the expression values

paintBiclusterPatternCharts

public void paintBiclusterPatternCharts(NodeInfo nodeInfo)
Paints one bicluster / set of bicluster pattern charts. The pattern values to display in the pattern chart are retrieved from the NodeInfo object.

Parameters:
nodeInfo - the NodeInfo which contains the matrix object(s) with the expression values

normalize_itemStateChanged

public void normalize_itemStateChanged(java.awt.event.ItemEvent e)
Checks the option selected by the user in the normalize check box. If normalize is selected, computes the normalized expression chart and displays it. If normalize is not selected, computes original expression chart and displays it.

Parameters:
e - the ItemEvent of the check box selected state

option_itemStateChanged

public void option_itemStateChanged(java.awt.event.ItemEvent e)
Checks the option selected by the user in the "number of biclusters to display" combo box.
The number of biclusters selected by the user in the combo box will determine how many bicluster expression chars must be displayed in this panel.
Not all the bicluster expression charts are constructed a priori. That is, only the charts to display are constructed. Others will be generated later on, if the user pretends to display them.
Also if the user selects a number of bicluster charts to view that is smaller than the number of bicluster charts that was being displayed before the selection, the number of biclusters displayed is reduced but the expression charts that were already constructed are maintained in memory, in case the user pretends to see them again.
All the expression charts are destructed when the user selects another node in the tree, as they are no longer needed.

Parameters:
e - the ItemEvent that signals the change of selection by the user in the combo box

getVisualizationOption

public java.lang.String[] getVisualizationOption()
Returns visualization options (number of biclusters to be displayed) to include in a combo box when the expression type is either BICLUSTER_TIME_POINTS or PATTERN and the corresponding object is a group of biclusters.

Returns:
the set of visualization String options

getExpressionType

public int getExpressionType()
Returns the type of expression for this panel's chart. It may be:
PanelExpression.BICLUSTER_TIME_POINTS PanelExpression.ALL_TIME_POINTS PanelExpression.PATTERN

Returns:
int type of expression chart in this panel

getMainFrame

public BiggestsFrame getMainFrame()
Returns the application's main frame, where this panel is being displayed.

Returns:
the main BiggestsFrame

getNormalize

public javax.swing.JCheckBox getNormalize()
Returns the check box which allows the user to choose between an expression chart with original or normalized data. To be used on BICLUSTER_TIME_POINTS and ALL_TIME_POINTS expression charts panel.

Returns:
normalize JCheckBox

getOption

public javax.swing.JComboBox getOption()
Returns the combo box for the user to choose the number of biclusters to display. To be used when the expression type is either BICLUSTER_TIME_POINTS or PATTERN and the corresponding object is a group of biclusters.

Returns:
option JComboBox

getExpressionChart

public PanelExpressionChart getExpressionChart()
Returns single bicluster's expression chart that is being displayed in this panel. It can be a bicluster time points, an all time points or a pattern expression chart. It may be null if this panel does not contain a chart originated from an individual bicluster.

Returns:
PanelExpressionChart that holds the chart being displayed

getExpressionCharts

public PanelExpressionChart[] getExpressionCharts()
Returns the expression charts of a set of biclusters (which belong to a specific group of biclusters). They can be bicluster time points charts or expression pattern charts. The pointer may be null if this panel does not contain charts originated from a group of biclusters.

Returns:
the set of PanelExpressionCharts

getSetOfBiclusters

public Bicluster[] getSetOfBiclusters()
Returns the set of biclusters retrieved from the group of biclusters to display. It may be null if this panel was not constructed to display charts from a group of biclusters.

Returns:
the set of Biclusters

getChartWidth

public int getChartWidth()
Returns the width of the displayed expression chart(s).

Returns:
int width of expression chart(s)

getChartHeight

public int getChartHeight()
Returns the height of the displayed expression chart(s).

Returns:
int height of expression chart(s)

this_ancestorResized

public void this_ancestorResized(java.awt.event.HierarchyEvent e)