Class PopupPRPlistSelector

java.lang.Object
  |
  +--PopupPRPlistSelector
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.event.ItemListener, java.awt.event.WindowListener

public class PopupPRPlistSelector
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.WindowListener

This class creates and displays a popup window to select samples.

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government and Djamel Medjahed (SAIC-Frederick). As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file.

Version:
$Date: 2002/10/14 20:17:17 $ $Revision: $
Author:
P. Lemkin (NCI), Djamel Medjahed (SAIC), NCI-Frederick, Frederick, MD
See Also:
ProtPlot Home

This work was derived from prpxplorer under the Mozilla 1.1 Open Source Public License by Peter Lemkin of the National Cancer Institute, an agency of the United States Government subject to the limitations noted in the accompanying LEGAL file. See licence info on http://prpxplorer.sourceforge.org/


Field Summary
 boolean allowSetsFlag
          Flag is true if may set multiple samples else enforce single sample
private  java.awt.Checkbox allowXYsetsCheckBox
          allow XY sets (else single) samples Checkbox
private  java.awt.Panel checkBoxPanel
           
private  java.awt.Button clearAllButton
          "Clear all" window button
private  java.awt.Button closeButton
          close window button
private  java.awt.Panel controlPanel
           
 boolean ok
          pressed close and the proper number of samples expected was set
private  int oldSample
          old Sample if selecting a single sample (-1 if none)
private  boolean[] oldSampleList
          old list of samples [0:oldNlist-1]
private static ProtPlot prp
           
private  java.awt.Checkbox prpListANDCheckBox
          select BOTH family and Checkbox
private  java.awt.Frame prpListFrame
          Frame of name checkboxes
private  java.awt.Checkbox[] prpListNameCheckbox
          [0:nFamilies-1] checkboxes
 boolean[] sampleList
          list of samples in the expression list of of samples [0:prp.nPRPs-1]
static int SEL_CUR_SAMPLE
          Select current sample
static int SEL_EP_SAMPLES
          Select EP sample
static int SEL_X_SAMPLE
          Select Y sample or sample set
static int SEL_Y_SAMPLE
          Select Y sample or sample set
 int selSample
          new selected sample if not -1
private  int selType
           
private  java.awt.Button setAllButton
          "Set all" window button
private  java.awt.Button setCancerButton
          "Set 'cancer'" window button
private  java.awt.Button setNormalButton
          "Set 'normal'" window button
private  java.awt.Button setPrecancerButton
          "Set 'precancer'" window button
private static ShowScatterPlotPopup spp
           
 
Constructor Summary
(package private) PopupPRPlistSelector(ProtPlot prP, ShowScatterPlotPopup spP, int selType, int curSample, boolean[] curSampleList, boolean allowSetsFlag)
          PopupPRPlistSelector() - popup selector
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed() - Handle button clicks
 void itemStateChanged(java.awt.event.ItemEvent e)
          itemStateChanged() - handle item state checkbox selectors.
 void quit()
          quit() - kill this frame
 void saveSamplesList()
          saveSamplesList() - Save the save list back into the PRP DB
 void setGroupButtonsEnable(boolean flag)
          setGroupButtonsEnable() - set the enable state of the sample assignement buttons: "Set all", "Clear all", "Set normal", "Set precancer", "Set cancer"
 void setProteinsPerSampleScodeLabels()
          setProteinsPerSampleScodeLabels() - set the Scode for all checkbox labels.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
          windowClosing() - close down the window.
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

prp

private static ProtPlot prp

spp

private static ShowScatterPlotPopup spp

SEL_CUR_SAMPLE

public static final int SEL_CUR_SAMPLE
Select current sample

SEL_X_SAMPLE

public static final int SEL_X_SAMPLE
Select Y sample or sample set

SEL_Y_SAMPLE

public static final int SEL_Y_SAMPLE
Select Y sample or sample set

SEL_EP_SAMPLES

public static final int SEL_EP_SAMPLES
Select EP sample

prpListFrame

private java.awt.Frame prpListFrame
Frame of name checkboxes

checkBoxPanel

private java.awt.Panel checkBoxPanel

controlPanel

private java.awt.Panel controlPanel

allowXYsetsCheckBox

private java.awt.Checkbox allowXYsetsCheckBox
allow XY sets (else single) samples Checkbox

prpListANDCheckBox

private java.awt.Checkbox prpListANDCheckBox
select BOTH family and Checkbox

prpListNameCheckbox

private java.awt.Checkbox[] prpListNameCheckbox
[0:nFamilies-1] checkboxes

setAllButton

private java.awt.Button setAllButton
"Set all" window button

clearAllButton

private java.awt.Button clearAllButton
"Clear all" window button

setNormalButton

private java.awt.Button setNormalButton
"Set 'normal'" window button

setPrecancerButton

private java.awt.Button setPrecancerButton
"Set 'precancer'" window button

setCancerButton

private java.awt.Button setCancerButton
"Set 'cancer'" window button

closeButton

private java.awt.Button closeButton
close window button

selType

private int selType

oldSample

private int oldSample
old Sample if selecting a single sample (-1 if none)

oldSampleList

private boolean[] oldSampleList
old list of samples [0:oldNlist-1]

ok

public boolean ok
pressed close and the proper number of samples expected was set

selSample

public int selSample
new selected sample if not -1

sampleList

public boolean[] sampleList
list of samples in the expression list of of samples [0:prp.nPRPs-1]

allowSetsFlag

public boolean allowSetsFlag
Flag is true if may set multiple samples else enforce single sample
Constructor Detail

PopupPRPlistSelector

PopupPRPlistSelector(ProtPlot prP,
                     ShowScatterPlotPopup spP,
                     int selType,
                     int curSample,
                     boolean[] curSampleList,
                     boolean allowSetsFlag)
PopupPRPlistSelector() - popup selector
Parameters:
prP - is instance of ProtPlot
spP - is instance of ShowScatterPlotPopup
selType - is type of selection: SEL_CUR_SAMPLE, SEL_X_SAMPLE, SEL_Y_SAMPLE, SEL_LISTOF_SAMPLES
curSample - is the current sample # if using a single sample
curSampleList - is the list of current samples # if using multiple samples
allowSetsFlag - is true if may set multiple samples else enforce single sample
Method Detail

setProteinsPerSampleScodeLabels

public void setProteinsPerSampleScodeLabels()
setProteinsPerSampleScodeLabels() - set the Scode for all checkbox labels. The Scode of sample i is 'S' if the nbrProteins[i] >= thresholdSproteins

setGroupButtonsEnable

public void setGroupButtonsEnable(boolean flag)
setGroupButtonsEnable() - set the enable state of the sample assignement buttons: "Set all", "Clear all", "Set normal", "Set precancer", "Set cancer"
Parameters:
flag - to set all of these buttons.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged() - handle item state checkbox selectors. computes the prp.useClasBits.
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - Handle button clicks
Specified by:
actionPerformed in interface java.awt.event.ActionListener

saveSamplesList

public void saveSamplesList()
saveSamplesList() - Save the save list back into the PRP DB

quit

public void quit()
quit() - kill this frame

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
windowClosing() - close down the window.
Specified by:
windowClosing in interface java.awt.event.WindowListener
Parameters:
e - is WindowEvent when close

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener