edu.iastate.metnet.birdseyeview
Class BirdsEyeView

java.lang.Object
  extended by edu.iastate.metnet.birdseyeview.BirdsEyeView
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class BirdsEyeView
extends java.lang.Object
implements java.beans.PropertyChangeListener

The BirdsEyeView Class is the main class for the Bird's Eye View API in the Metnet Project. This class contains information about the experimental data and the GUI objects. This class may be incorporated as a panel into an existing GUI. Use the BirdsEyeViewWindow class to run the Bird's Eye View API as a stand alone application.

Author:
Matt Studham Created Jan 21, 2005

Nested Class Summary
(package private)  class BirdsEyeView.LoadAnnotation
          This class uses thread to load annotation independently
(package private)  class BirdsEyeView.Task
           
 
Field Summary
static int CellViewID
           
static java.lang.String CellViewName
           
static int[] colorBrew
           
static int DefaultViewID
           
 int fileFormat
           
 int genedotCapacity
           
static int GenePanelBuffer
           
static java.awt.Dimension GenePanelSize
           
static int GoBioProcessViewID
           
static java.lang.String GoBioProcessViewName
           
static int GoFunctionViewID
           
static java.lang.String GoFunctionViewName
           
 int[] oricolorRange
           
static java.lang.String PathwayCompartmentPrefix
           
 int pathwaydotCapacity
           
static java.lang.String PathwayPrefix
           
static int PathwayViewID
           
static java.lang.String PathwayViewName
           
(package private) static java.util.ArrayList<Annotation> selectedAnnotation
           
 int textpanelCapacity
           
 
Constructor Summary
BirdsEyeView(javax.swing.JFrame f)
          Constructor.
BirdsEyeView(javax.swing.JFrame f, int initialViewID, java.lang.String algorithm)
          Constructor.
 
Method Summary
 void displayaddAnnotations(java.util.ArrayList annList)
          This method instructs the root panel to display the given annotation in addition to the annotations that are already being displayed.
 void displayAnnotation(Annotation annotation)
          This method instructs the root panel to display the given annotation in addition to the annotations that are already being displayed.
 void displayOrHideAnnotation(Annotation annotation)
          This method instructs the root panel to display or hide the given annotation based on the current status of the annotation.
 void displaySpePathGenes(java.lang.String pathway)
          This method lets program only show the genes belonging to special pathway
 java.util.ArrayList getAnnotations()
          This method returns the gene product annotation list.
 java.awt.Component getBirdsEyeView()
          This method returns the component that contains the Bird's Eye View.
 int getCapacity()
           
 java.util.Properties getConfiguration()
          This method returns the configuration object.
 ViewInfo getCurrentView()
           
 Database getDatabase()
          This method returns the database object.
static java.io.File getLastDir()
           
 LoadController getLoadController()
           
 RootPanel getRootPanel()
           
 java.util.ArrayList getViewInfoList()
          This method returns the view info list.
 void goDown()
          This method sends the user "down" in the GO hierarchy.
 void goUp()
          This method sends the user "up" in the GO hierarchy.
 void hideAnnotation(Annotation annotation)
          This method instructs the root panel to no longer display the given annotation.
 void highlightAnnotation(Annotation annotation)
          This method highlights the given annoation.
 void highlightAnnotations(java.util.ArrayList annList)
          This method highlights the given annoation.
 void initialize(java.awt.Dimension size, java.lang.String algorithm)
          This method initializes the Bird's Eye View.
 boolean isValidViewID(int id)
          This method checks the given ID to see if it is a valid view ID.
 void loadConfiguration()
          This method load the configuration and repaint
 void loadData()
          This method calls the load controller to load experimental data.
 void newData(java.lang.String newExperimentName, java.util.ArrayList experimentNames, java.util.ArrayList newProbeNames, java.util.ArrayList newVariances)
          This method processes the new data so it can be displayed.
 void newExperiment(int experimentIndex)
          This method calls the load controller to load data from a different experiment using the current probe name and variance data.
 void newVariances(java.util.ArrayList newVariances)
          This method processes the new variances.
 void newVariant(double variant, int sequece)
           
 void newView(ViewInfo newViewInfo)
          This method sets the new view.
 void propertyChange(java.beans.PropertyChangeEvent evt)
          Invoked when task's progress property changes.
 void repaint()
          This method ensures that the window is updated after a change.
 void saveAnnotationsToFile()
          This method enables the user to save the selected gene annotations to a file.
 void setAnnotations(java.util.ArrayList a)
          This method sets the annotations list.
 void setCapacity(int capacity)
          set the capacity to current info
static void setLastDir(java.io.File lastDir)
           
 void setLoadController(LoadController loadController)
           
 void setRootPanel(RootPanel rootPanel)
           
 boolean showhideLegend()
          This method shows or hides the legend pane
 void showNewData()
          Cooperate with newVariant() After all variants called newVariant(), call it to display new data
 void toggleMapLabels(boolean labelsOn)
          This method turns the map labels on/off given the flag.
 void unHighlightAnnotation(Annotation annotation)
          This method unhighlights the given annotation.
 void updateCapacity(int capacity)
          this method update the gene dots' capacity value in legend panel
 void updateminiCapacity(int capacity)
          this method update the gene dots' capacity minimum value in legend panel when new data loaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CellViewID

public static final int CellViewID
See Also:
Constant Field Values

PathwayViewID

public static final int PathwayViewID
See Also:
Constant Field Values

GoBioProcessViewID

public static final int GoBioProcessViewID
See Also:
Constant Field Values

GoFunctionViewID

public static final int GoFunctionViewID
See Also:
Constant Field Values

DefaultViewID

public static final int DefaultViewID
See Also:
Constant Field Values

CellViewName

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

PathwayViewName

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

GoBioProcessViewName

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

GoFunctionViewName

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

PathwayPrefix

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

PathwayCompartmentPrefix

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

GenePanelSize

public static final java.awt.Dimension GenePanelSize

GenePanelBuffer

public static final int GenePanelBuffer
See Also:
Constant Field Values

fileFormat

public int fileFormat

selectedAnnotation

static java.util.ArrayList<Annotation> selectedAnnotation

genedotCapacity

public int genedotCapacity

pathwaydotCapacity

public int pathwaydotCapacity

textpanelCapacity

public int textpanelCapacity

colorBrew

public static int[] colorBrew

oricolorRange

public int[] oricolorRange
Constructor Detail

BirdsEyeView

public BirdsEyeView(javax.swing.JFrame f)
Constructor. The initial display will be the default view.

Parameters:
f - Parent window

BirdsEyeView

public BirdsEyeView(javax.swing.JFrame f,
                    int initialViewID,
                    java.lang.String algorithm)
Constructor. Make the initial view the given view identifier. Please ensure that the given int is valid (use the static class variables).

Parameters:
f - Parent window
initialView - Valid view ID
algorithm - Treemaps
Method Detail

initialize

public void initialize(java.awt.Dimension size,
                       java.lang.String algorithm)
                throws BirdsEyeViewException
This method initializes the Bird's Eye View. The configuration data is loaded here.

Parameters:
size - Size of root panel
Throws:
BirdsEyeViewException - Unable to connect to database

getBirdsEyeView

public java.awt.Component getBirdsEyeView()
This method returns the component that contains the Bird's Eye View.

Returns:
Component

getViewInfoList

public java.util.ArrayList getViewInfoList()
This method returns the view info list.

Returns:
ArrayList of ViewInfo objects

newView

public void newView(ViewInfo newViewInfo)
This method sets the new view.

Parameters:
newView - Valid ViewInfo object

loadData

public void loadData()
This method calls the load controller to load experimental data.


loadConfiguration

public void loadConfiguration()
This method load the configuration and repaint


newData

public void newData(java.lang.String newExperimentName,
                    java.util.ArrayList experimentNames,
                    java.util.ArrayList newProbeNames,
                    java.util.ArrayList newVariances)
This method processes the new data so it can be displayed. This method must call newVariances() to save the data to the display.

Parameters:
newExperimentName - The name of the newly selected experiment
experimentNames - List of experiment names
newProbeNames - List of probe names (or gene product names; affymetrix IDs)
newVariances - List of variances (experimental results - Doubles) for the probes

newVariances

public void newVariances(java.util.ArrayList newVariances)
This method processes the new variances. Variances for genes which do not exist in the Metnet database will be ignored.

Parameters:
newVariances - List of variances (experimental results) for the probes

newVariant

public void newVariant(double variant,
                       int sequece)
Parameters:
variant - the value of expression level
sequece - the object annotation's sequence in annotation list (may not exist)

showNewData

public void showNewData()
Cooperate with newVariant() After all variants called newVariant(), call it to display new data


newExperiment

public void newExperiment(int experimentIndex)
This method calls the load controller to load data from a different experiment using the current probe name and variance data.

Parameters:
experimentIndex - The index of the experiment in the experiment list

goUp

public void goUp()
This method sends the user "up" in the GO hierarchy.


goDown

public void goDown()
This method sends the user "down" in the GO hierarchy.


getAnnotations

public java.util.ArrayList getAnnotations()
This method returns the gene product annotation list.

Returns:
ArrayList

displayAnnotation

public void displayAnnotation(Annotation annotation)
This method instructs the root panel to display the given annotation in addition to the annotations that are already being displayed.

Parameters:
annotation - Annotation object

displayaddAnnotations

public void displayaddAnnotations(java.util.ArrayList annList)
This method instructs the root panel to display the given annotation in addition to the annotations that are already being displayed.

Parameters:
annotationS - Annotation object List

displaySpePathGenes

public void displaySpePathGenes(java.lang.String pathway)
This method lets program only show the genes belonging to special pathway

Parameters:
pathway - Pathway Name

hideAnnotation

public void hideAnnotation(Annotation annotation)
This method instructs the root panel to no longer display the given annotation.

Parameters:
annotation - Annotation object

displayOrHideAnnotation

public void displayOrHideAnnotation(Annotation annotation)
This method instructs the root panel to display or hide the given annotation based on the current status of the annotation.

Parameters:
annotation - Annotation object

highlightAnnotation

public void highlightAnnotation(Annotation annotation)
This method highlights the given annoation.

Parameters:
annotation - Annotation object

highlightAnnotations

public void highlightAnnotations(java.util.ArrayList annList)
This method highlights the given annoation.

Parameters:
annotation - Annotation object

unHighlightAnnotation

public void unHighlightAnnotation(Annotation annotation)
This method unhighlights the given annotation.

Parameters:
annotation - Annotation object

updateCapacity

public void updateCapacity(int capacity)
this method update the gene dots' capacity value in legend panel

Parameters:
capacity - the number of genes represtented in each dot

updateminiCapacity

public void updateminiCapacity(int capacity)
this method update the gene dots' capacity minimum value in legend panel when new data loaded

Parameters:
capacity - the number of genes represtented in each dot

getConfiguration

public java.util.Properties getConfiguration()
This method returns the configuration object.

Returns:
Properties

saveAnnotationsToFile

public void saveAnnotationsToFile()
This method enables the user to save the selected gene annotations to a file.


toggleMapLabels

public void toggleMapLabels(boolean labelsOn)
This method turns the map labels on/off given the flag.

Parameters:
labelsOn - Flag indicating if map labels are to be turned on

showhideLegend

public boolean showhideLegend()
This method shows or hides the legend pane

Returns:
cuurent legend status (show/hide)

getCurrentView

public ViewInfo getCurrentView()
Returns:
current viewinfo

setCapacity

public void setCapacity(int capacity)
set the capacity to current info


getCapacity

public int getCapacity()

isValidViewID

public boolean isValidViewID(int id)
This method checks the given ID to see if it is a valid view ID.

Parameters:
id -
Returns:
boolean

setAnnotations

public void setAnnotations(java.util.ArrayList a)
This method sets the annotations list. This is the alternative to having annotations from a data file being loaded.

Parameters:
a - List of Annotation objects

repaint

public void repaint()
This method ensures that the window is updated after a change.


getDatabase

public Database getDatabase()
This method returns the database object.

Returns:
Database

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Invoked when task's progress property changes.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getLoadController

public LoadController getLoadController()
Returns:
Returns the loadController.

setLoadController

public void setLoadController(LoadController loadController)
Parameters:
loadController - The loadController to set.

getRootPanel

public RootPanel getRootPanel()
Returns:
Returns the rootPanel.

setRootPanel

public void setRootPanel(RootPanel rootPanel)
Parameters:
rootPanel - The rootPanel to set.

getLastDir

public static java.io.File getLastDir()
Returns:
Returns the lastDir.

setLastDir

public static void setLastDir(java.io.File lastDir)
Parameters:
lastDir - The lastDir to set.