biggests.gui
Class PanelAnalyzingFunctionSignificanceGraph

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

public class PanelAnalyzingFunctionSignificanceGraph
extends javax.swing.JPanel

Title: Function Analysis - Significance Graph Panel

Description: Displays a significance graph of a bicluster.

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 java.lang.String GIF
          GIF image type.
static java.lang.String PNG
          PNG image type.
static java.lang.String SVG
          SVG image 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
PanelAnalyzingFunctionSignificanceGraph(BiggestsFrame frame)
          Creates a new function analysis - significance graph panel.
 
Method Summary
 void clear()
          Clears this panel.
 java.lang.String convertDOTtoImage(java.lang.String pathToDotFile, java.lang.String pathToImgDirectory, java.lang.String imgFileExtension)
          Converts a .dot file to an image file (png, gif, svg).
 BiggestsFrame getMainFrame()
          Returns the application's main frame.
 java.lang.String getPathToImage()
          Returns the path to image.
 java.lang.String getPathToSvg()
          Returns the path to svg.
 org.apache.batik.swing.svg.JSVGComponent getSvgGraph()
          Returns the swing-based component which holds the svg graph.
 float getZoom()
          Returns the current zoom scale factor.
 javax.swing.JSlider getZoomSlider()
          Returns the zoom slider.
 boolean isSvgBuilded()
          Checks if the gvt tree for the svg document is already built.
 void paint(Bicluster bicluster, javax.swing.tree.TreePath selectionPath)
          Paints this panel with a table of functions for the genes in bicluster.
 void saveGraph_actionPerformed(java.awt.event.ActionEvent e)
          Handles the user click on the save graph button.
 void zoomSlider_stateChanged(javax.swing.event.ChangeEvent e)
          Handles changes on the zoom slider.
 
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

PNG

public static final java.lang.String PNG
PNG image type.

See Also:
Constant Field Values

GIF

public static final java.lang.String GIF
GIF image type.

See Also:
Constant Field Values

SVG

public static final java.lang.String SVG
SVG image type.

See Also:
Constant Field Values
Constructor Detail

PanelAnalyzingFunctionSignificanceGraph

public PanelAnalyzingFunctionSignificanceGraph(BiggestsFrame frame)
Creates a new function analysis - significance graph panel.

Parameters:
frame - the main BiggestsFrame
Method Detail

clear

public void clear()
Clears this panel. Removes the elements that are not needed anymore.


paint

public void paint(Bicluster bicluster,
                  javax.swing.tree.TreePath selectionPath)
Paints this panel with a table of functions for the genes in bicluster. The path to the given bicluster datafile is retrieved from the selectionPath.

Parameters:
bicluster - the Bicluster from which the table of functions will be constructed and shown
selectionPath - the TreePath holding the necessary data to find the path to the given bicluster graph file

convertDOTtoImage

public java.lang.String convertDOTtoImage(java.lang.String pathToDotFile,
                                          java.lang.String pathToImgDirectory,
                                          java.lang.String imgFileExtension)
                                   throws java.lang.InterruptedException,
                                          java.io.IOException,
                                          java.lang.Exception
Converts a .dot file to an image file (png, gif, svg).

Parameters:
pathToDotFile - the String path to dot file
pathToImgDirectory - the String path to destination directory
imgFileExtension - the String image file extension
Returns:
the String path to the new image file
Throws:
java.lang.InterruptedException - if an error occured while waiting for the conversion of the .dot file
java.io.IOException - if files do not exist or an error occurs in the conversion process
java.lang.Exception - if it was not possible to convert the .dot file

saveGraph_actionPerformed

public void saveGraph_actionPerformed(java.awt.event.ActionEvent e)
Handles the user click on the save graph button. It allows the saving of the current significance graph in png or svg format.

Parameters:
e - the ActionEvent fired by the click of the user in save graph button

zoomSlider_stateChanged

public void zoomSlider_stateChanged(javax.swing.event.ChangeEvent e)
Handles changes on the zoom slider.

Parameters:
e - ChangeEvent fired by the user manipulation of the zoom slider

getMainFrame

public BiggestsFrame getMainFrame()
Returns the application's main frame.

Returns:
the main BiggestsFrame

getPathToImage

public java.lang.String getPathToImage()
Returns the path to image.

Returns:
the path String to image

getPathToSvg

public java.lang.String getPathToSvg()
Returns the path to svg.

Returns:
the path String to svg

getZoomSlider

public javax.swing.JSlider getZoomSlider()
Returns the zoom slider.

Returns:
the zoom JSlider

getZoom

public float getZoom()
Returns the current zoom scale factor.

Returns:
the float zoom scale factor

getSvgGraph

public org.apache.batik.swing.svg.JSVGComponent getSvgGraph()
Returns the swing-based component which holds the svg graph.

Returns:
the swing-based JSVGComponent which holds the svg graph

isSvgBuilded

public boolean isSvgBuilded()
Checks if the gvt tree for the svg document is already built.

Returns:
boolean that indicates if gvt tree for the svg document is already built