mev-4.0.01/source/org/tigr/microarray/mev/cluster/gui/IViewer.java

Code
Comments
Other
Rev Date Author Line
2 26 Feb 07 jari 1 /*
2 26 Feb 07 jari 2 Copyright @ 1999-2003, The Institute for Genomic Research (TIGR).
2 26 Feb 07 jari 3 All rights reserved.
2 26 Feb 07 jari 4  */
2 26 Feb 07 jari 5 /*
2 26 Feb 07 jari 6  * $RCSfile: IViewer.java,v $
2 26 Feb 07 jari 7  * $Revision: 1.7 $
2 26 Feb 07 jari 8  * $Date: 2006/03/24 15:49:53 $
2 26 Feb 07 jari 9  * $Author: eleanorahowe $
2 26 Feb 07 jari 10  * $State: Exp $
2 26 Feb 07 jari 11  */
2 26 Feb 07 jari 12 package org.tigr.microarray.mev.cluster.gui;
2 26 Feb 07 jari 13
2 26 Feb 07 jari 14 import java.awt.image.BufferedImage;
2 26 Feb 07 jari 15 import java.beans.Expression;
2 26 Feb 07 jari 16
2 26 Feb 07 jari 17 import javax.swing.JComponent;
2 26 Feb 07 jari 18
2 26 Feb 07 jari 19 /**
2 26 Feb 07 jari 20  * The interface of a class, which can be displayed
2 26 Feb 07 jari 21  * in the framework scroll pane.
2 26 Feb 07 jari 22  *
2 26 Feb 07 jari 23  * @version 1.0
2 26 Feb 07 jari 24  * @author Aleksey D.Rezantsev
2 26 Feb 07 jari 25  */
2 26 Feb 07 jari 26 public interface IViewer {
2 26 Feb 07 jari 27     
2 26 Feb 07 jari 28     public static int UPPER_LEFT_CORNER = 0;
2 26 Feb 07 jari 29     public static int UPPER_RIGHT_CORNER = 1;
2 26 Feb 07 jari 30     public static int LOWER_LEFT_CORNER = 2;
2 26 Feb 07 jari 31     
2 26 Feb 07 jari 32     /**
2 26 Feb 07 jari 33      * Returns a component to be inserted into scroll pane view port.
2 26 Feb 07 jari 34      */
2 26 Feb 07 jari 35     public JComponent getContentComponent();
2 26 Feb 07 jari 36     
2 26 Feb 07 jari 37     /**
2 26 Feb 07 jari 38      * Returns a component to be inserted into scroll pane header.
2 26 Feb 07 jari 39      */
2 26 Feb 07 jari 40     public JComponent getHeaderComponent();
2 26 Feb 07 jari 41     
2 26 Feb 07 jari 42     /**
2 26 Feb 07 jari 43      * Returns a component to be inserted into the scroll pane row header
2 26 Feb 07 jari 44      */
2 26 Feb 07 jari 45     public JComponent getRowHeaderComponent();  
2 26 Feb 07 jari 46
2 26 Feb 07 jari 47     /**
2 26 Feb 07 jari 48      * Returns the corner component corresponding to the indicated corner,
2 26 Feb 07 jari 49      * posibly null
2 26 Feb 07 jari 50      */
2 26 Feb 07 jari 51     public JComponent getCornerComponent(int cornerIndex);
2 26 Feb 07 jari 52     
2 26 Feb 07 jari 53     
2 26 Feb 07 jari 54     /**
2 26 Feb 07 jari 55      * Invoked by the framework when this viewer is selected.
2 26 Feb 07 jari 56      */
2 26 Feb 07 jari 57     public void onSelected(IFramework framework);
2 26 Feb 07 jari 58     
2 26 Feb 07 jari 59     /**
2 26 Feb 07 jari 60      * Invoked by the framework when data is changed,
2 26 Feb 07 jari 61      * if this viewer is selected.
2 26 Feb 07 jari 62      * @see IData
2 26 Feb 07 jari 63      */
2 26 Feb 07 jari 64     public void onDataChanged(IData data);
2 26 Feb 07 jari 65     
2 26 Feb 07 jari 66     /**
2 26 Feb 07 jari 67      * Invoked by the framework when display menu is changed,
2 26 Feb 07 jari 68      * if this viewer is selected.
2 26 Feb 07 jari 69      * @see IDisplayMenu
2 26 Feb 07 jari 70      */
2 26 Feb 07 jari 71     public void onMenuChanged(IDisplayMenu menu);
2 26 Feb 07 jari 72     
2 26 Feb 07 jari 73     /**
2 26 Feb 07 jari 74      * Invoked by the framework when this viewer was deselected.
2 26 Feb 07 jari 75      */
2 26 Feb 07 jari 76     public void onDeselected();
2 26 Feb 07 jari 77     
2 26 Feb 07 jari 78     /**
2 26 Feb 07 jari 79      * Invoked when the framework is going to be closed.
2 26 Feb 07 jari 80      */
2 26 Feb 07 jari 81     public void onClosed();
2 26 Feb 07 jari 82     
2 26 Feb 07 jari 83     /**
2 26 Feb 07 jari 84      * Invoked by the framework to save or to print viewer image.
2 26 Feb 07 jari 85      */
2 26 Feb 07 jari 86     public BufferedImage getImage();
2 26 Feb 07 jari 87     
2 26 Feb 07 jari 88     /**
2 26 Feb 07 jari 89      * Returns the viewer's clusters or null
2 26 Feb 07 jari 90      */
2 26 Feb 07 jari 91     public int[][] getClusters();
2 26 Feb 07 jari 92     
2 26 Feb 07 jari 93     
2 26 Feb 07 jari 94     /**
2 26 Feb 07 jari 95      *  Returns the viewer's experiment or null
2 26 Feb 07 jari 96      */
2 26 Feb 07 jari 97     public Experiment getExperiment();
2 26 Feb 07 jari 98     
2 26 Feb 07 jari 99     /**
2 26 Feb 07 jari 100      * Returns int value indicating viewer type
2 26 Feb 07 jari 101      * Cluster.GENE_CLUSTER, Cluster.EXPERIMENT_CLUSTER, or -1 for both or unspecified
2 26 Feb 07 jari 102      */
2 26 Feb 07 jari 103     public int getViewerType();
2 26 Feb 07 jari 104     
2 26 Feb 07 jari 105     /**
2 26 Feb 07 jari 106      * EH - state-saving
2 26 Feb 07 jari 107      * Sets the Experiment field for this Viewer.  Used when restoring state.  
2 26 Feb 07 jari 108      *
2 26 Feb 07 jari 109      */
2 26 Feb 07 jari 110     public void setExperiment(Experiment e);
2 26 Feb 07 jari 111     
2 26 Feb 07 jari 112     /**
2 26 Feb 07 jari 113     * EH - state-saving
2 26 Feb 07 jari 114     * Returns the ID value for the Experiment associated with this viewer.
2 26 Feb 07 jari 115     */
2 26 Feb 07 jari 116     public int getExperimentID();
2 26 Feb 07 jari 117     
2 26 Feb 07 jari 118     /**
2 26 Feb 07 jari 119     * EH - state-saving
2 26 Feb 07 jari 120     * Sets the ID value for the Experiment associated with this IViewer
2 26 Feb 07 jari 121     */
2 26 Feb 07 jari 122     public void setExperimentID(int id);
2 26 Feb 07 jari 123     
2 26 Feb 07 jari 124     /**
2 26 Feb 07 jari 125      * EH testing
2 26 Feb 07 jari 126      * @return An Expression that can be used to save the object's state.
2 26 Feb 07 jari 127      */
2 26 Feb 07 jari 128     public Expression getExpression();
2 26 Feb 07 jari 129 }