2 |
26 Feb 07 |
jari |
1 |
/* |
2 |
26 Feb 07 |
jari |
Copyright @ 1999-2004, The Institute for Genomic Research (TIGR). |
2 |
26 Feb 07 |
jari |
All rights reserved. |
2 |
26 Feb 07 |
jari |
4 |
*/ |
2 |
26 Feb 07 |
jari |
5 |
/* |
2 |
26 Feb 07 |
jari |
* $RCSfile: MultipleArrayMenubar.java,v $ |
2 |
26 Feb 07 |
jari |
* $Revision: 1.16 $ |
2 |
26 Feb 07 |
jari |
* $Date: 2006/05/12 15:09:12 $ |
2 |
26 Feb 07 |
jari |
* $Author: eleanorahowe $ |
2 |
26 Feb 07 |
jari |
* $State: Exp $ |
2 |
26 Feb 07 |
jari |
11 |
*/ |
2 |
26 Feb 07 |
jari |
12 |
package org.tigr.microarray.mev; |
2 |
26 Feb 07 |
jari |
13 |
|
2 |
26 Feb 07 |
jari |
14 |
import java.awt.Color; |
2 |
26 Feb 07 |
jari |
15 |
import java.awt.Component; |
2 |
26 Feb 07 |
jari |
16 |
import java.awt.Dimension; |
2 |
26 Feb 07 |
jari |
17 |
import java.awt.GradientPaint; |
2 |
26 Feb 07 |
jari |
18 |
import java.awt.Graphics2D; |
2 |
26 Feb 07 |
jari |
19 |
import java.awt.event.ActionListener; |
2 |
26 Feb 07 |
jari |
20 |
import java.awt.image.BufferedImage; |
2 |
26 Feb 07 |
jari |
21 |
import java.util.Enumeration; |
2 |
26 Feb 07 |
jari |
22 |
import java.util.Vector; |
2 |
26 Feb 07 |
jari |
23 |
|
2 |
26 Feb 07 |
jari |
24 |
import javax.swing.Action; |
2 |
26 Feb 07 |
jari |
25 |
import javax.swing.ButtonGroup; |
2 |
26 Feb 07 |
jari |
26 |
import javax.swing.JCheckBoxMenuItem; |
2 |
26 Feb 07 |
jari |
27 |
import javax.swing.JMenu; |
2 |
26 Feb 07 |
jari |
28 |
import javax.swing.JMenuBar; |
2 |
26 Feb 07 |
jari |
29 |
import javax.swing.JMenuItem; |
2 |
26 Feb 07 |
jari |
30 |
import javax.swing.JPopupMenu; |
2 |
26 Feb 07 |
jari |
31 |
import javax.swing.JRadioButtonMenuItem; |
2 |
26 Feb 07 |
jari |
32 |
|
2 |
26 Feb 07 |
jari |
33 |
import org.tigr.microarray.mev.action.ActionManager; |
2 |
26 Feb 07 |
jari |
34 |
import org.tigr.microarray.mev.action.DefaultAction; |
2 |
26 Feb 07 |
jari |
35 |
import org.tigr.microarray.mev.cluster.algorithm.Algorithm; |
2 |
26 Feb 07 |
jari |
36 |
import org.tigr.microarray.mev.cluster.gui.ICGHCloneValueMenu; |
2 |
26 Feb 07 |
jari |
37 |
import org.tigr.microarray.mev.cluster.gui.ICGHDisplayMenu; |
2 |
26 Feb 07 |
jari |
38 |
import org.tigr.microarray.mev.cluster.gui.IDisplayMenu; |
2 |
26 Feb 07 |
jari |
39 |
import org.tigr.microarray.mev.cluster.gui.IDistanceMenu; |
2 |
26 Feb 07 |
jari |
40 |
|
2 |
26 Feb 07 |
jari |
41 |
public class MultipleArrayMenubar extends JMenuBar { |
2 |
26 Feb 07 |
jari |
42 |
|
2 |
26 Feb 07 |
jari |
43 |
private DisplayMenu displayMenu = new DisplayMenu(); |
2 |
26 Feb 07 |
jari |
44 |
private DistanceMenu distanceMenu = new DistanceMenu(); |
2 |
26 Feb 07 |
jari |
45 |
private JMenu normalizationMenu; |
2 |
26 Feb 07 |
jari |
46 |
private JMenu labelMenu; |
2 |
26 Feb 07 |
jari |
47 |
private JMenu expLabelSelectionMenu; |
2 |
26 Feb 07 |
jari |
48 |
private JMenu adjustMenu; |
2 |
26 Feb 07 |
jari |
49 |
private JMenu filterMenu; |
2 |
26 Feb 07 |
jari |
50 |
private ButtonGroup labelGroup; |
2 |
26 Feb 07 |
jari |
51 |
private ActionListener listener; |
2 |
26 Feb 07 |
jari |
52 |
private boolean affyNormAdded = false; |
2 |
26 Feb 07 |
jari |
53 |
private ButtonGroup experimentLabelGroup; |
2 |
26 Feb 07 |
jari |
54 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim |
2 |
26 Feb 07 |
jari |
* CGH Specific Menus |
2 |
26 Feb 07 |
jari |
57 |
*/ |
2 |
26 Feb 07 |
jari |
58 |
private JMenu cloneValuesMenu; |
2 |
26 Feb 07 |
jari |
59 |
private JMenu cghDispMenu; |
2 |
26 Feb 07 |
jari |
60 |
private JMenu cghAnalysisMenu; |
2 |
26 Feb 07 |
jari |
61 |
private JMenu helpMenu; |
2 |
26 Feb 07 |
jari |
62 |
CGHDisplayMenu cghDisplayMenu = new CGHDisplayMenu(); |
2 |
26 Feb 07 |
jari |
63 |
CGHCloneValueMenu cghCloneValueMenu = new CGHCloneValueMenu(); |
2 |
26 Feb 07 |
jari |
64 |
|
2 |
26 Feb 07 |
jari |
65 |
private ActionManager actionManager; |
2 |
26 Feb 07 |
jari |
66 |
|
2 |
26 Feb 07 |
jari |
67 |
/** |
2 |
26 Feb 07 |
jari |
* Constructs a <code>MultipleArrayMenubar</code> using specified |
2 |
26 Feb 07 |
jari |
* action maneger. |
2 |
26 Feb 07 |
jari |
* @see ActionManager |
2 |
26 Feb 07 |
jari |
71 |
*/ |
2 |
26 Feb 07 |
jari |
72 |
public MultipleArrayMenubar(ActionManager manager) { |
2 |
26 Feb 07 |
jari |
73 |
listener = manager.getListener(); |
2 |
26 Feb 07 |
jari |
74 |
actionManager = manager; |
2 |
26 Feb 07 |
jari |
75 |
JMenu fileMenu = new JMenu("File"); |
2 |
26 Feb 07 |
jari |
76 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.LOAD_ACTION))); |
2 |
26 Feb 07 |
jari |
77 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
78 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.LOAD_ANALYSIS_ACTION))); |
2 |
26 Feb 07 |
jari |
79 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
80 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.SAVE_ANALYSIS_ACTION))); |
2 |
26 Feb 07 |
jari |
81 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.SAVE_ANALYSIS_AS_ACTION))); |
2 |
26 Feb 07 |
jari |
82 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
83 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.NEW_SCRIPT_ACTION))); |
2 |
26 Feb 07 |
jari |
84 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
85 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.LOAD_SCRIPT_ACTION))); |
2 |
26 Feb 07 |
jari |
86 |
|
2 |
26 Feb 07 |
jari |
87 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
88 |
|
2 |
26 Feb 07 |
jari |
89 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.SAVE_MATRIX_ACTION))); |
2 |
26 Feb 07 |
jari |
90 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
91 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.SAVE_IMAGE_ACTION))); |
2 |
26 Feb 07 |
jari |
92 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
93 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.PRINT_IMAGE_ACTION))); |
2 |
26 Feb 07 |
jari |
94 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
95 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.NEW_MULTIPLEARRAYVIEWER))); |
2 |
26 Feb 07 |
jari |
96 |
fileMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
97 |
fileMenu.add(createJMenuItem(manager.getAction(ActionManager.CLOSE_ACTION))); |
2 |
26 Feb 07 |
jari |
98 |
add(fileMenu); |
2 |
26 Feb 07 |
jari |
99 |
|
2 |
26 Feb 07 |
jari |
100 |
adjustMenu = new JMenu("Adjust Data"); |
2 |
26 Feb 07 |
jari |
101 |
|
2 |
26 Feb 07 |
jari |
102 |
JMenu spotMenu = new JMenu("Gene/Row Adjustments"); |
2 |
26 Feb 07 |
jari |
103 |
spotMenu.add(createJMenuItem("Normalize Genes/Rows", ActionManager.NORMALIZE_SPOTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
104 |
spotMenu.add(createJMenuItem("Divide Genes/Rows by RMS", ActionManager.DIVIDE_SPOTS_RMS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
105 |
spotMenu.add(createJMenuItem("Divide Genes/Rows by SD", ActionManager.DIVIDE_SPOTS_SD_CMD, listener)); |
2 |
26 Feb 07 |
jari |
106 |
spotMenu.add(createJMenuItem("Mean Center Genes/Rows", ActionManager.MEAN_CENTER_SPOTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
107 |
spotMenu.add(createJMenuItem("Median Center Genes/Rows", ActionManager.MEDIAN_CENTER_SPOTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
108 |
spotMenu.add(createJMenuItem("Digitalize Genes/Rows", ActionManager.DIGITAL_SPOTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
109 |
adjustMenu.add(spotMenu); |
2 |
26 Feb 07 |
jari |
110 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
111 |
|
2 |
26 Feb 07 |
jari |
112 |
|
2 |
26 Feb 07 |
jari |
113 |
JMenu sampMenu = new JMenu("Sample/Column Adjustments"); |
2 |
26 Feb 07 |
jari |
114 |
sampMenu.add(createJMenuItem("Normalize Samples/Columns", ActionManager.NORMALIZE_EXPERIMENTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
115 |
sampMenu.add(createJMenuItem("Divide Samples/Columns by RMS", ActionManager.DIVIDE_EXPERIMENTS_RMS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
116 |
sampMenu.add(createJMenuItem("Divide Samples/Columns by SD", ActionManager.DIVIDE_EXPERIMENTS_SD_CMD, listener)); |
2 |
26 Feb 07 |
jari |
117 |
sampMenu.add(createJMenuItem("Mean Center Samples/Columns", ActionManager.MEAN_CENTER_EXPERIMENTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
118 |
sampMenu.add(createJMenuItem("Median Center Samples/Columns", ActionManager.MEDIAN_CENTER_EXPERIMENTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
119 |
sampMenu.add(createJMenuItem("Digitalize Samples/Columns", ActionManager.DIGITAL_EXPERIMENTS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
120 |
adjustMenu.add(sampMenu); |
2 |
26 Feb 07 |
jari |
121 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
// vu 7.22.05 |
2 |
26 Feb 07 |
jari |
123 |
JMenu repMenu = new JMenu( "Replicate Analysis" ); |
2 |
26 Feb 07 |
jari |
124 |
repMenu.add( createJMenuItem( "Rama Documentation", ActionManager.RAMA_DOC_CMD, listener ) ); |
2 |
26 Feb 07 |
jari |
125 |
repMenu.add( createJMenuItem( "Rama", ActionManager.RAMA_CMD, listener ) ); |
2 |
26 Feb 07 |
jari |
126 |
adjustMenu.add( repMenu ); |
2 |
26 Feb 07 |
jari |
127 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
128 |
|
2 |
26 Feb 07 |
jari |
129 |
JMenu logMenu = new JMenu("Log Transformations"); |
2 |
26 Feb 07 |
jari |
130 |
logMenu.add(createJMenuItem("Log2 Transform", ActionManager.LOG2_TRANSFORM_CMD, listener)); |
2 |
26 Feb 07 |
jari |
131 |
logMenu.add(createJMenuItem("UnLog2 Transform", ActionManager.UNLOG2_TRANSFORM_CMD, listener)); |
2 |
26 Feb 07 |
jari |
132 |
logMenu.add(createJMenuItem("Log10 to Log2", ActionManager.LOG10_TO_LOG2_CMD, listener)); |
2 |
26 Feb 07 |
jari |
133 |
logMenu.add(createJMenuItem("Log2 to Log10", ActionManager.LOG2_TO_LOG10_CMD, listener)); |
2 |
26 Feb 07 |
jari |
134 |
adjustMenu.add(logMenu); |
2 |
26 Feb 07 |
jari |
135 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
136 |
|
2 |
26 Feb 07 |
jari |
//wwang add low intensity filter of affy data and cdna |
2 |
26 Feb 07 |
jari |
138 |
filterMenu = new JMenu("Data Filters"); |
2 |
26 Feb 07 |
jari |
139 |
JMenu lowIntensityMenu=new JMenu("Low Intensity Cutoff Filter"); |
2 |
26 Feb 07 |
jari |
140 |
lowIntensityMenu.add(manager.getAction(ActionManager.CDNA_LOW_INTENSITY_ACTION)); |
2 |
26 Feb 07 |
jari |
141 |
lowIntensityMenu.add(manager.getAction(ActionManager.OLIGEN_LOW_INTENSITY_ACTION)); |
2 |
26 Feb 07 |
jari |
142 |
filterMenu.add(lowIntensityMenu); |
2 |
26 Feb 07 |
jari |
143 |
filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
144 |
|
2 |
26 Feb 07 |
jari |
//wwang |
2 |
26 Feb 07 |
jari |
146 |
filterMenu.add(createJMenuItem("Affymetrix detection call Noise Filter", ActionManager.USE_GCOS_PERCENTAGE_CUTOFF_CMD, listener)); |
2 |
26 Feb 07 |
jari |
//filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
148 |
filterMenu.add(createJMenuItem("Affymetrix P-value Filter", ActionManager.USE_PVALUE_CUTOFF_CMD, listener)); |
2 |
26 Feb 07 |
jari |
//filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
150 |
|
2 |
26 Feb 07 |
jari |
151 |
filterMenu.add(createJMenuItem("Bioconductor detection call Noise Filter", ActionManager.USE_PRESENT_CALL_CMD, listener)); |
2 |
26 Feb 07 |
jari |
152 |
filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
153 |
filterMenu.add(createJMenuItem("GenePix Flags Filter", ActionManager.USE_GENEPIXFLAGS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
154 |
filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
155 |
filterMenu.add(createJMenuItem("Percentage Cutoff Filter", ActionManager.USE_PERCENTAGE_CUTOFFS_CMD, listener)); |
2 |
26 Feb 07 |
jari |
156 |
filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
157 |
filterMenu.add(createJMenuItem("Variance Filter", ActionManager.USE_VARIANCE_FILTER_CMD, listener)); |
2 |
26 Feb 07 |
jari |
158 |
adjustMenu.add(filterMenu); |
2 |
26 Feb 07 |
jari |
159 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
160 |
|
2 |
26 Feb 07 |
jari |
161 |
ButtonGroup buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
162 |
normalizationMenu = new JMenu("Normalization"); |
2 |
26 Feb 07 |
jari |
163 |
normalizationMenu.add(createJRadioButtonMenuItem("Total Intensity", ActionManager.TOTAL_INTENSITY_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
164 |
normalizationMenu.add(createJRadioButtonMenuItem("Linear Regression", ActionManager.LINEAR_REGRESSION_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
165 |
normalizationMenu.add(createJRadioButtonMenuItem("Ratio Statistics", ActionManager.RATIO_STATISTICS_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
166 |
normalizationMenu.add(createJRadioButtonMenuItem("Iterative Log", ActionManager.ITERATIVE_LOG_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
167 |
normalizationMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
168 |
normalizationMenu.add(createJRadioButtonMenuItem("No Normalization", ActionManager.NO_NORMALIZATION_CMD, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
169 |
|
2 |
26 Feb 07 |
jari |
170 |
adjustMenu.add(normalizationMenu); |
2 |
26 Feb 07 |
jari |
171 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
172 |
adjustMenu.add(createJCheckBoxMenuItem("Adjust Intensities of '0'", ActionManager.ADJUST_INTENSITIES_0_CMD, listener, true)); |
2 |
26 Feb 07 |
jari |
173 |
|
2 |
26 Feb 07 |
jari |
174 |
add(adjustMenu); |
2 |
26 Feb 07 |
jari |
175 |
|
2 |
26 Feb 07 |
jari |
176 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
177 |
JMenu distanceMenu = new JMenu("Metrics"); |
2 |
26 Feb 07 |
jari |
178 |
distanceMenu.add(createJRadioButtonMenuItem("Default Distance", ActionManager.DEFAULT_DISTANCE_CMD, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
179 |
|
2 |
26 Feb 07 |
jari |
180 |
distanceMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
181 |
|
2 |
26 Feb 07 |
jari |
182 |
distanceMenu.add(createJRadioButtonMenuItem("Euclidean Distance", ActionManager.EUCLIDEAN_DISTANCE_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
183 |
distanceMenu.add(createJRadioButtonMenuItem("Manhattan Distance", ActionManager.MANHATTAN_DISTANCE_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
184 |
distanceMenu.add(createJRadioButtonMenuItem("Average Dot Product", ActionManager.AVERAGE_DOT_PRODUCT_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
185 |
|
2 |
26 Feb 07 |
jari |
186 |
distanceMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
187 |
|
2 |
26 Feb 07 |
jari |
188 |
distanceMenu.add(createJRadioButtonMenuItem("Pearson Correlation", ActionManager.PEARSON_CORRELATION_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
189 |
distanceMenu.add(createJRadioButtonMenuItem("Pearson Uncentered", ActionManager.PEARSON_UNCENTERED_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
190 |
distanceMenu.add(createJRadioButtonMenuItem("Pearson Squared", ActionManager.PEARSON_SQUARED_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
191 |
distanceMenu.add(createJRadioButtonMenuItem("Cosine Correlation", ActionManager.COSINE_CORRELATION_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
192 |
distanceMenu.add(createJRadioButtonMenuItem("Covariance Value", ActionManager.COVARIANCE_VALUE_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
193 |
distanceMenu.add(createJRadioButtonMenuItem("Spearman Rank Correlation", ActionManager.SPEARMAN_RANK_CORRELATION_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
194 |
|
2 |
26 Feb 07 |
jari |
195 |
distanceMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
196 |
|
2 |
26 Feb 07 |
jari |
197 |
distanceMenu.add(createJRadioButtonMenuItem("Kendall's Tau", ActionManager.KENDALLS_TAU_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
198 |
distanceMenu.add(createJRadioButtonMenuItem("Mutual Information", ActionManager.MUTUAL_INFORMATION_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
199 |
distanceMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
200 |
distanceMenu.add(createJCheckBoxMenuItem("Absolute distance", ActionManager.ABSOLUTE_DISTANCE_CMD, listener, false)); |
2 |
26 Feb 07 |
jari |
201 |
add(distanceMenu); |
2 |
26 Feb 07 |
jari |
202 |
|
2 |
26 Feb 07 |
jari |
203 |
JMenu analysisMenu = new JMenu("Analysis"); |
2 |
26 Feb 07 |
jari |
// add analysis menu here |
2 |
26 Feb 07 |
jari |
205 |
addAnalysisMenu(analysisMenu, manager); |
2 |
26 Feb 07 |
jari |
206 |
add(analysisMenu); |
2 |
26 Feb 07 |
jari |
207 |
|
2 |
26 Feb 07 |
jari |
208 |
JMenu displayMenu = new JMenu("Display"); |
2 |
26 Feb 07 |
jari |
209 |
|
2 |
26 Feb 07 |
jari |
210 |
|
2 |
26 Feb 07 |
jari |
211 |
JMenu expLabelMenu = new JMenu("Sample/Column Labels"); |
2 |
26 Feb 07 |
jari |
212 |
|
2 |
26 Feb 07 |
jari |
213 |
expLabelSelectionMenu = new JMenu("Select Sample Label"); |
2 |
26 Feb 07 |
jari |
214 |
expLabelMenu.add(expLabelSelectionMenu); |
2 |
26 Feb 07 |
jari |
215 |
expLabelMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
216 |
expLabelMenu.add(this.createJMenuItem("Edit Labels/Reorder Samples", ActionManager.ADD_NEW_EXPERIMENT_LABEL_CMD, listener)); |
2 |
26 Feb 07 |
jari |
217 |
expLabelMenu.add(createJMenuItem("Abbr. Sample Names", ActionManager.TOGGLE_ABBR_EXPT_NAMES_CMD, listener)); |
2 |
26 Feb 07 |
jari |
218 |
experimentLabelGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
219 |
displayMenu.add(expLabelMenu); |
2 |
26 Feb 07 |
jari |
220 |
|
2 |
26 Feb 07 |
jari |
221 |
labelMenu = new JMenu("Gene/Row Labels"); |
2 |
26 Feb 07 |
jari |
222 |
labelGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
223 |
displayMenu.add(labelMenu); |
2 |
26 Feb 07 |
jari |
224 |
displayMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
225 |
|
2 |
26 Feb 07 |
jari |
226 |
JMenu colorSchemeMenu = new JMenu("Color Scheme"); |
2 |
26 Feb 07 |
jari |
227 |
colorSchemeMenu.add(createJMenuItem("Green-Black-Red Scheme", ActionManager.GREEN_RED_COLOR_SCHEME_CMD, listener)); |
2 |
26 Feb 07 |
jari |
228 |
colorSchemeMenu.add(createJMenuItem("Blue-Black-Yellow Scheme", ActionManager.BLUE_YELLOW_COLOR_SCHEME_CMD, listener)); |
2 |
26 Feb 07 |
jari |
229 |
colorSchemeMenu.add(createJMenuItem("Rainbow Scheme", ActionManager.RAINBOW_COLOR_SCHEME_CMD, listener)); |
2 |
26 Feb 07 |
jari |
230 |
colorSchemeMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
231 |
colorSchemeMenu.add(createJMenuItem("Custom Color Scheme", ActionManager.CUSTOM_COLOR_SCHEME_CMD, listener)); |
2 |
26 Feb 07 |
jari |
232 |
colorSchemeMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
233 |
colorSchemeMenu.add(createJCheckBoxMenuItem("Use Color Gradient on Graphs", ActionManager.COLOR_GRADIENT_CMD, listener)); |
2 |
26 Feb 07 |
jari |
234 |
displayMenu.add(colorSchemeMenu); |
2 |
26 Feb 07 |
jari |
235 |
|
2 |
26 Feb 07 |
jari |
236 |
displayMenu.add(createJMenuItem("Set Color Scale Limits", ActionManager.DISPLAY_SET_RATIO_SCALE_CMD, listener)); |
2 |
26 Feb 07 |
jari |
237 |
displayMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
238 |
|
2 |
26 Feb 07 |
jari |
239 |
JMenu sizeMenu = new JMenu("Set Element Size"); |
2 |
26 Feb 07 |
jari |
240 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
241 |
sizeMenu.add(createJRadioButtonMenuItem("5 x 2", ActionManager.DISPLAY_5X2_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
242 |
sizeMenu.add(createJRadioButtonMenuItem("10 x 10", ActionManager.DISPLAY_10X10_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
243 |
sizeMenu.add(createJRadioButtonMenuItem("20 x 5", ActionManager.DISPLAY_20X5_CMD, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
244 |
sizeMenu.add(createJRadioButtonMenuItem("50 x 10", ActionManager.DISPLAY_50X10_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
245 |
sizeMenu.add(createJRadioButtonMenuItem("Custom", ActionManager.DISPLAY_OTHER_CMD, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
246 |
displayMenu.add(sizeMenu); |
2 |
26 Feb 07 |
jari |
247 |
|
2 |
26 Feb 07 |
jari |
248 |
displayMenu.add(createJCheckBoxMenuItem("Draw Borders", ActionManager.DISPLAY_DRAW_BORDERS_CMD, listener, false)); |
2 |
26 Feb 07 |
jari |
249 |
|
2 |
26 Feb 07 |
jari |
250 |
add(displayMenu); |
2 |
26 Feb 07 |
jari |
251 |
|
2 |
26 Feb 07 |
jari |
252 |
JMenu utilMenu = new JMenu("Utilities"); |
2 |
26 Feb 07 |
jari |
253 |
utilMenu.add(createJMenuItem(manager.getAction(ActionManager.SEARCH_ACTION))); |
2 |
26 Feb 07 |
jari |
254 |
utilMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
255 |
|
2 |
26 Feb 07 |
jari |
256 |
JMenu clusterMenu = new JMenu("Cluster Utilities"); |
2 |
26 Feb 07 |
jari |
257 |
|
2 |
26 Feb 07 |
jari |
258 |
JMenu importMenu = new JMenu("Import Cluster"); |
2 |
26 Feb 07 |
jari |
259 |
importMenu.add(manager.getAction(ActionManager.IMPORT_GENE_LIST_ACTION)); |
2 |
26 Feb 07 |
jari |
260 |
importMenu.add(manager.getAction(ActionManager.IMPORT_SAMPLE_LIST_ACTION)); |
2 |
26 Feb 07 |
jari |
261 |
clusterMenu.add(importMenu); |
2 |
26 Feb 07 |
jari |
262 |
|
2 |
26 Feb 07 |
jari |
263 |
clusterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
264 |
|
2 |
26 Feb 07 |
jari |
265 |
clusterMenu.add(manager.getAction(ActionManager.DELETE_ALL_ACTION)); |
2 |
26 Feb 07 |
jari |
266 |
clusterMenu.add(manager.getAction(ActionManager.DELETE_ALL_EXPERIMENT_CLUSTERS_ACTION)); |
2 |
26 Feb 07 |
jari |
267 |
utilMenu.add(clusterMenu); |
2 |
26 Feb 07 |
jari |
268 |
|
2 |
26 Feb 07 |
jari |
269 |
utilMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
270 |
|
2 |
26 Feb 07 |
jari |
271 |
utilMenu.add(manager.getAction(ActionManager.APPEND_GENE_ANNOTATION_ACTION)); |
2 |
26 Feb 07 |
jari |
272 |
utilMenu.add(manager.getAction(ActionManager.APPEND_SAMPLE_ANNOTATION_ACTION)); |
2 |
26 Feb 07 |
jari |
273 |
|
2 |
26 Feb 07 |
jari |
274 |
add(utilMenu); |
2 |
26 Feb 07 |
jari |
275 |
} |
2 |
26 Feb 07 |
jari |
276 |
|
2 |
26 Feb 07 |
jari |
277 |
|
2 |
26 Feb 07 |
jari |
278 |
|
2 |
26 Feb 07 |
jari |
279 |
/** |
2 |
26 Feb 07 |
jari |
* Constructs a <code>MultipleArrayMenubar</code> using specified |
2 |
26 Feb 07 |
jari |
* action maneger. |
2 |
26 Feb 07 |
jari |
* @see ActionManager |
2 |
26 Feb 07 |
jari |
283 |
*/ |
2 |
26 Feb 07 |
jari |
284 |
public MultipleArrayMenubar(MultipleArrayMenubar origMenubar, ActionManager manager) { |
2 |
26 Feb 07 |
jari |
//run main constructor |
2 |
26 Feb 07 |
jari |
286 |
this(manager); |
2 |
26 Feb 07 |
jari |
287 |
|
2 |
26 Feb 07 |
jari |
288 |
IDisplayMenu origDisplayMenu = origMenubar.getDisplayMenu(); |
2 |
26 Feb 07 |
jari |
289 |
|
2 |
26 Feb 07 |
jari |
290 |
this.setColorSchemeIndex(origDisplayMenu.getColorScheme()); |
2 |
26 Feb 07 |
jari |
291 |
Dimension dim = origDisplayMenu.getElementSize(); |
2 |
26 Feb 07 |
jari |
292 |
this.setElementSize(dim.width, dim.height); |
2 |
26 Feb 07 |
jari |
293 |
this.setAntiAliasing(origDisplayMenu.isAntiAliasing()); |
2 |
26 Feb 07 |
jari |
294 |
this.setTracing(origDisplayMenu.isTracing()); |
2 |
26 Feb 07 |
jari |
295 |
this.setLabelIndex(origDisplayMenu.getLabelIndex()); |
2 |
26 Feb 07 |
jari |
296 |
this.setPaletteStyle(origDisplayMenu.getPaletteStyle()); |
2 |
26 Feb 07 |
jari |
297 |
this.setGRScale(origDisplayMenu.isGRScale()); |
2 |
26 Feb 07 |
jari |
298 |
this.setDrawBorders(origDisplayMenu.isDrawingBorder()); |
2 |
26 Feb 07 |
jari |
299 |
this.setMaxRatioScale(origDisplayMenu.getMaxRatioScale()); |
2 |
26 Feb 07 |
jari |
300 |
this.setMinRatioScale(origDisplayMenu.getMinRatioScale()); |
2 |
26 Feb 07 |
jari |
301 |
this.setMidRatioValue(origDisplayMenu.getMidRatioValue()); |
2 |
26 Feb 07 |
jari |
302 |
this.setColorGradientState(origDisplayMenu.getColorGradientState()); |
2 |
26 Feb 07 |
jari |
303 |
this.setNegativeCustomGradient(origDisplayMenu.getNegativeGradientImage()); |
2 |
26 Feb 07 |
jari |
304 |
this.setPositiveCustomGradient(origDisplayMenu.getPositiveGradientImage()); |
2 |
26 Feb 07 |
jari |
305 |
this.setUseDoubleGradient(origDisplayMenu.getUseDoubleGradient()); |
2 |
26 Feb 07 |
jari |
306 |
this.addLabelMenuItems((origMenubar).getLabelMenuItems()); |
2 |
26 Feb 07 |
jari |
307 |
|
2 |
26 Feb 07 |
jari |
308 |
IDistanceMenu origDistanceMenu = origMenubar.getDistanceMenu(); |
2 |
26 Feb 07 |
jari |
309 |
|
2 |
26 Feb 07 |
jari |
310 |
this.setDistanceAbsolute(origDistanceMenu.isAbsoluteDistance()); |
2 |
26 Feb 07 |
jari |
311 |
this.setDistanceFunction(origDistanceMenu.getDistanceFunction()); |
2 |
26 Feb 07 |
jari |
//now have the full menu, minus probably the full sort and label menu |
2 |
26 Feb 07 |
jari |
313 |
} |
2 |
26 Feb 07 |
jari |
314 |
|
2 |
26 Feb 07 |
jari |
315 |
public void synchronizeSettings(MultipleArrayMenubar origMenuBar) { |
2 |
26 Feb 07 |
jari |
316 |
|
2 |
26 Feb 07 |
jari |
//first synchronize the distance menu |
2 |
26 Feb 07 |
jari |
318 |
|
2 |
26 Feb 07 |
jari |
319 |
JMenu origMenu = origMenuBar.getMenu(2); |
2 |
26 Feb 07 |
jari |
320 |
JMenu menu = getMenu(2); |
2 |
26 Feb 07 |
jari |
321 |
Object menuObject, origMenuObject; |
2 |
26 Feb 07 |
jari |
322 |
|
2 |
26 Feb 07 |
jari |
323 |
for(int i = 0; i < menu.getMenuComponentCount(); i++) { |
2 |
26 Feb 07 |
jari |
324 |
menuObject = menu.getMenuComponent(i); |
2 |
26 Feb 07 |
jari |
325 |
origMenuObject = origMenu.getMenuComponent(i); |
2 |
26 Feb 07 |
jari |
326 |
|
2 |
26 Feb 07 |
jari |
327 |
if(origMenuObject instanceof JRadioButtonMenuItem) { |
2 |
26 Feb 07 |
jari |
328 |
((JRadioButtonMenuItem)menuObject).setSelected( ((JRadioButtonMenuItem)origMenuObject).isSelected()); |
2 |
26 Feb 07 |
jari |
329 |
} else if (origMenuObject instanceof JCheckBoxMenuItem) { |
2 |
26 Feb 07 |
jari |
330 |
((JCheckBoxMenuItem)menuObject).setSelected( ((JCheckBoxMenuItem)origMenuObject).isSelected()); |
2 |
26 Feb 07 |
jari |
331 |
} |
2 |
26 Feb 07 |
jari |
332 |
} |
2 |
26 Feb 07 |
jari |
333 |
|
2 |
26 Feb 07 |
jari |
// now synchronize the display menu |
2 |
26 Feb 07 |
jari |
335 |
origMenu = origMenuBar.getMenu(4); |
2 |
26 Feb 07 |
jari |
336 |
menu = getMenu(4); |
2 |
26 Feb 07 |
jari |
337 |
|
2 |
26 Feb 07 |
jari |
//strategy: if it's a JMenu send it to the sync method else deal with it directly |
2 |
26 Feb 07 |
jari |
339 |
Component comp, origComp; |
2 |
26 Feb 07 |
jari |
340 |
int numComponents = origMenu.getMenuComponentCount(); |
2 |
26 Feb 07 |
jari |
341 |
for(int i = 0; i < numComponents; i++) { |
2 |
26 Feb 07 |
jari |
342 |
origComp = origMenu.getMenuComponent(i); |
2 |
26 Feb 07 |
jari |
343 |
comp = menu.getMenuComponent(i); |
2 |
26 Feb 07 |
jari |
344 |
|
2 |
26 Feb 07 |
jari |
345 |
if(origComp instanceof JMenu) { |
2 |
26 Feb 07 |
jari |
346 |
syncMenus((JMenu) origComp, (JMenu)comp); |
2 |
26 Feb 07 |
jari |
347 |
} else { |
2 |
26 Feb 07 |
jari |
348 |
if(origComp instanceof JRadioButtonMenuItem) { |
2 |
26 Feb 07 |
jari |
349 |
((JRadioButtonMenuItem)comp).setSelected( ((JRadioButtonMenuItem)origComp).isSelected()); |
2 |
26 Feb 07 |
jari |
350 |
} else if (origComp instanceof JCheckBoxMenuItem) { |
2 |
26 Feb 07 |
jari |
351 |
((JCheckBoxMenuItem)comp).setSelected( ((JCheckBoxMenuItem)origComp).isSelected()); |
2 |
26 Feb 07 |
jari |
352 |
} |
2 |
26 Feb 07 |
jari |
353 |
} |
2 |
26 Feb 07 |
jari |
354 |
} |
2 |
26 Feb 07 |
jari |
355 |
} |
2 |
26 Feb 07 |
jari |
356 |
|
2 |
26 Feb 07 |
jari |
357 |
private void syncMenus(JMenu origMenu, JMenu menu) { |
2 |
26 Feb 07 |
jari |
358 |
Object menuObject, origMenuObject; |
2 |
26 Feb 07 |
jari |
359 |
|
2 |
26 Feb 07 |
jari |
360 |
for(int i = 0; i < menu.getMenuComponentCount(); i++) { |
2 |
26 Feb 07 |
jari |
361 |
menuObject = menu.getMenuComponent(i); |
2 |
26 Feb 07 |
jari |
362 |
origMenuObject = origMenu.getMenuComponent(i); |
2 |
26 Feb 07 |
jari |
363 |
|
2 |
26 Feb 07 |
jari |
364 |
if(origMenuObject instanceof JRadioButtonMenuItem) { |
2 |
26 Feb 07 |
jari |
365 |
((JRadioButtonMenuItem)menuObject).setSelected( ((JRadioButtonMenuItem)origMenuObject).isSelected()); |
2 |
26 Feb 07 |
jari |
366 |
} else if (origMenuObject instanceof JCheckBoxMenuItem) { |
2 |
26 Feb 07 |
jari |
367 |
((JCheckBoxMenuItem)menuObject).setSelected( ((JCheckBoxMenuItem)origMenuObject).isSelected()); |
2 |
26 Feb 07 |
jari |
368 |
} else if(origMenuObject instanceof JMenu) { |
2 |
26 Feb 07 |
jari |
369 |
syncMenus((JMenu)origMenuObject, (JMenu)menuObject); |
2 |
26 Feb 07 |
jari |
370 |
} |
2 |
26 Feb 07 |
jari |
371 |
} |
2 |
26 Feb 07 |
jari |
372 |
} |
2 |
26 Feb 07 |
jari |
373 |
|
2 |
26 Feb 07 |
jari |
374 |
/** |
2 |
26 Feb 07 |
jari |
* Enables some menu items according to specified state. |
2 |
26 Feb 07 |
jari |
376 |
*/ |
2 |
26 Feb 07 |
jari |
377 |
public void systemEnable(int state) { |
2 |
26 Feb 07 |
jari |
378 |
switch (state) { |
2 |
26 Feb 07 |
jari |
379 |
case TMEV.SYSTEM: |
2 |
26 Feb 07 |
jari |
380 |
setEnableMenu("File", true); |
2 |
26 Feb 07 |
jari |
381 |
setEnableMenuItem("File", ActionManager.LOAD_STANFORD_COMMAND, true); |
2 |
26 Feb 07 |
jari |
382 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
383 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_AS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
384 |
setEnableMenuItem("File", ActionManager.NEW_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
385 |
setEnableMenuItem("File", ActionManager.LOAD_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
386 |
break; |
2 |
26 Feb 07 |
jari |
387 |
case TMEV.DATA_AVAILABLE: |
2 |
26 Feb 07 |
jari |
388 |
setEnableMenu("File", true); |
2 |
26 Feb 07 |
jari |
389 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
390 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_AS_COMMAND, true); |
2 |
26 Feb 07 |
jari |
391 |
setEnableMenuItem("File", ActionManager.SAVE_MATRIX_COMMAND, true); |
2 |
26 Feb 07 |
jari |
392 |
setEnableMenuItem("File", ActionManager.SAVE_IMAGE_COMMAND, true); |
2 |
26 Feb 07 |
jari |
393 |
setEnableMenuItem("File", ActionManager.NEW_SCRIPT_COMMAND, true); |
2 |
26 Feb 07 |
jari |
394 |
setEnableMenuItem("File", ActionManager.LOAD_SCRIPT_COMMAND, true); |
2 |
26 Feb 07 |
jari |
395 |
setEnableMenuItem("File", ActionManager.PRINT_IMAGE_COMMAND, true); |
2 |
26 Feb 07 |
jari |
396 |
setEnableMenuItem("File", ActionManager.NEW_MAV_COMMAND, false); |
2 |
26 Feb 07 |
jari |
397 |
setEnableMenu("Adjust Data", true); |
2 |
26 Feb 07 |
jari |
398 |
setEnableMenu("Normalization", true); |
2 |
26 Feb 07 |
jari |
399 |
setEnableMenu("Metrics", true); |
2 |
26 Feb 07 |
jari |
400 |
setEnableMenu("Utilities", true); |
2 |
26 Feb 07 |
jari |
401 |
setEnableMenu("Analysis", true); |
2 |
26 Feb 07 |
jari |
402 |
setEnableMenu("Display", true); |
2 |
26 Feb 07 |
jari |
403 |
setEnableMenu("Sort", true); |
2 |
26 Feb 07 |
jari |
404 |
break; |
2 |
26 Feb 07 |
jari |
405 |
case TMEV.ANALYSIS_LOADED: |
2 |
26 Feb 07 |
jari |
406 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_COMMAND, true); |
2 |
26 Feb 07 |
jari |
407 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_AS_COMMAND, true); |
2 |
26 Feb 07 |
jari |
408 |
case TMEV.DB_AVAILABLE: |
2 |
26 Feb 07 |
jari |
409 |
break; |
2 |
26 Feb 07 |
jari |
410 |
case TMEV.DB_LOGIN: |
2 |
26 Feb 07 |
jari |
411 |
setEnableMenuItem("File", ActionManager.LOAD_DB_COMMAND, true); |
2 |
26 Feb 07 |
jari |
412 |
break; |
2 |
26 Feb 07 |
jari |
413 |
} |
2 |
26 Feb 07 |
jari |
414 |
} |
2 |
26 Feb 07 |
jari |
415 |
|
2 |
26 Feb 07 |
jari |
416 |
/** |
2 |
26 Feb 07 |
jari |
* Disables some menu items according to specified state. |
2 |
26 Feb 07 |
jari |
418 |
*/ |
2 |
26 Feb 07 |
jari |
419 |
public void systemDisable(int state) { |
2 |
26 Feb 07 |
jari |
420 |
switch (state) { |
2 |
26 Feb 07 |
jari |
421 |
case TMEV.SYSTEM: |
2 |
26 Feb 07 |
jari |
422 |
setEnableMenu("File", true); |
2 |
26 Feb 07 |
jari |
423 |
setEnableMenuItem("File", ActionManager.LOAD_DB_COMMAND, false); |
2 |
26 Feb 07 |
jari |
424 |
setEnableMenuItem("File", ActionManager.LOAD_FILE_COMMAND, false); |
2 |
26 Feb 07 |
jari |
425 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
426 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_AS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
// setEnableMenuItem("File", ActionManager.NEW_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
// setEnableMenuItem("File", ActionManager.LOAD_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
429 |
setEnableMenuItem("File", ActionManager.NEW_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
430 |
setEnableMenuItem("File", ActionManager.LOAD_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
431 |
|
2 |
26 Feb 07 |
jari |
432 |
|
2 |
26 Feb 07 |
jari |
433 |
setEnableMenuItem("File", ActionManager.LOAD_DIRECTORY_COMMAND, false); |
2 |
26 Feb 07 |
jari |
434 |
setEnableMenuItem("File", ActionManager.LOAD_STANFORD_COMMAND, false); |
2 |
26 Feb 07 |
jari |
435 |
break; |
2 |
26 Feb 07 |
jari |
436 |
case TMEV.DATA_AVAILABLE: |
2 |
26 Feb 07 |
jari |
437 |
setEnableMenu("File", true); |
2 |
26 Feb 07 |
jari |
438 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
439 |
setEnableMenuItem("File", ActionManager.SAVE_ANALYSIS_AS_COMMAND, false); |
2 |
26 Feb 07 |
jari |
440 |
setEnableMenuItem("File", ActionManager.NEW_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
441 |
setEnableMenuItem("File", ActionManager.LOAD_SCRIPT_COMMAND, false); |
2 |
26 Feb 07 |
jari |
442 |
|
2 |
26 Feb 07 |
jari |
443 |
|
2 |
26 Feb 07 |
jari |
444 |
setEnableMenuItem("File", ActionManager.SAVE_MATRIX_COMMAND, false); |
2 |
26 Feb 07 |
jari |
445 |
setEnableMenuItem("File", ActionManager.SAVE_IMAGE_COMMAND, false); |
2 |
26 Feb 07 |
jari |
446 |
setEnableMenuItem("File", ActionManager.PRINT_IMAGE_COMMAND, false); |
2 |
26 Feb 07 |
jari |
447 |
setEnableMenu("Adjust Data", false); |
2 |
26 Feb 07 |
jari |
448 |
setEnableMenu("Normalization", false); |
2 |
26 Feb 07 |
jari |
449 |
setEnableMenu("Metrics", false); |
2 |
26 Feb 07 |
jari |
450 |
setEnableMenu("Utilities", false); |
2 |
26 Feb 07 |
jari |
451 |
break; |
2 |
26 Feb 07 |
jari |
452 |
case TMEV.DB_AVAILABLE: |
2 |
26 Feb 07 |
jari |
453 |
setEnableMenu("File", true); |
2 |
26 Feb 07 |
jari |
454 |
setEnableMenuItem("File", ActionManager.LOAD_DB_COMMAND, false); |
2 |
26 Feb 07 |
jari |
455 |
break; |
2 |
26 Feb 07 |
jari |
456 |
case TMEV.DB_LOGIN: |
2 |
26 Feb 07 |
jari |
457 |
setEnableMenu("File", true); |
2 |
26 Feb 07 |
jari |
458 |
setEnableMenuItem("File", ActionManager.LOAD_DB_COMMAND, false); |
2 |
26 Feb 07 |
jari |
459 |
break; |
2 |
26 Feb 07 |
jari |
460 |
} |
2 |
26 Feb 07 |
jari |
461 |
setEnableMenu("Analysis", false); |
2 |
26 Feb 07 |
jari |
462 |
setEnableMenu("Display", false); |
2 |
26 Feb 07 |
jari |
463 |
setEnableMenu("Sort", false); |
2 |
26 Feb 07 |
jari |
464 |
} |
2 |
26 Feb 07 |
jari |
465 |
|
2 |
26 Feb 07 |
jari |
466 |
|
2 |
26 Feb 07 |
jari |
467 |
public void enableNormalizationMenu(boolean enable) { |
2 |
26 Feb 07 |
jari |
468 |
normalizationMenu.setEnabled(enable); |
2 |
26 Feb 07 |
jari |
469 |
} |
2 |
26 Feb 07 |
jari |
470 |
|
2 |
26 Feb 07 |
jari |
471 |
/** |
2 |
26 Feb 07 |
jari |
* Adds label menu items. |
2 |
26 Feb 07 |
jari |
473 |
*/ |
2 |
26 Feb 07 |
jari |
474 |
private void addLabelMenuItems(JMenu menu, ActionManager manager, ButtonGroup buttonGroup) { |
2 |
26 Feb 07 |
jari |
475 |
int index = -1; |
2 |
26 Feb 07 |
jari |
476 |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
477 |
Action action; |
2 |
26 Feb 07 |
jari |
478 |
while ((action = manager.getAction(ActionManager.DISPLAY_LABEL_ACTION+String.valueOf(index)))!=null) { |
2 |
26 Feb 07 |
jari |
479 |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
480 |
buttonGroup.add(item); |
2 |
26 Feb 07 |
jari |
481 |
if (index < 1) { // try to select next item if exists |
2 |
26 Feb 07 |
jari |
482 |
item.setSelected(true); |
2 |
26 Feb 07 |
jari |
483 |
String indexStr = (String)action.getValue(ActionManager.PARAMETER); |
2 |
26 Feb 07 |
jari |
484 |
displayMenu.labelIndex = Integer.parseInt(indexStr); |
2 |
26 Feb 07 |
jari |
485 |
} |
2 |
26 Feb 07 |
jari |
486 |
menu.add(item); |
2 |
26 Feb 07 |
jari |
487 |
index++; |
2 |
26 Feb 07 |
jari |
488 |
} |
2 |
26 Feb 07 |
jari |
489 |
} |
2 |
26 Feb 07 |
jari |
490 |
public String[] getLabelMenuItems(){ |
2 |
26 Feb 07 |
jari |
//String[] temp = new String[labelGroup.getElements().]; |
2 |
26 Feb 07 |
jari |
492 |
Vector temp = new Vector(); |
2 |
26 Feb 07 |
jari |
493 |
Enumeration labels = labelGroup.getElements(); |
2 |
26 Feb 07 |
jari |
494 |
while(labels.hasMoreElements()){ |
2 |
26 Feb 07 |
jari |
495 |
JRadioButtonMenuItem aButton = (JRadioButtonMenuItem)labels.nextElement(); |
2 |
26 Feb 07 |
jari |
496 |
temp.add((String)aButton.getLabel()); |
2 |
26 Feb 07 |
jari |
497 |
} |
2 |
26 Feb 07 |
jari |
498 |
String[] temp2 = new String[temp.size()]; |
2 |
26 Feb 07 |
jari |
499 |
for(int i=0; i<temp.size();i++) |
2 |
26 Feb 07 |
jari |
500 |
temp2[i] = (String)temp.get(i); |
2 |
26 Feb 07 |
jari |
501 |
return temp2; |
2 |
26 Feb 07 |
jari |
502 |
} |
2 |
26 Feb 07 |
jari |
503 |
public void addLabelMenuItems(String [] fieldNames){ |
2 |
26 Feb 07 |
jari |
504 |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
505 |
ButtonGroup bg = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
506 |
DefaultAction action; |
2 |
26 Feb 07 |
jari |
507 |
for(int i = 0; i < fieldNames.length; i++){ |
2 |
26 Feb 07 |
jari |
508 |
action = new DefaultAction(actionManager, "Label by "+fieldNames[i], ActionManager.DISPLAY_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
509 |
action.putValue(ActionManager.PARAMETER, String.valueOf(i)); |
2 |
26 Feb 07 |
jari |
510 |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
511 |
labelGroup.add(item); |
2 |
26 Feb 07 |
jari |
512 |
if(i == 0) |
2 |
26 Feb 07 |
jari |
513 |
item.setSelected(true); |
2 |
26 Feb 07 |
jari |
514 |
this.labelMenu.add(item); |
2 |
26 Feb 07 |
jari |
515 |
} |
2 |
26 Feb 07 |
jari |
516 |
} |
2 |
26 Feb 07 |
jari |
517 |
|
2 |
26 Feb 07 |
jari |
518 |
|
2 |
26 Feb 07 |
jari |
519 |
public void addExperimentLabelMenuItems(Vector fieldNames){ |
2 |
26 Feb 07 |
jari |
520 |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
521 |
DefaultAction action; |
2 |
26 Feb 07 |
jari |
522 |
for(int i = 0; i < fieldNames.size(); i++){ |
2 |
26 Feb 07 |
jari |
523 |
action = new DefaultAction(actionManager, "Label by "+(String)fieldNames.elementAt(i), ActionManager.DISPLAY_EXPERIMENT_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
524 |
action.putValue(ActionManager.PARAMETER, (String)(fieldNames.elementAt(i))); |
2 |
26 Feb 07 |
jari |
525 |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
526 |
experimentLabelGroup.add(item); |
2 |
26 Feb 07 |
jari |
527 |
if(i == 0) |
2 |
26 Feb 07 |
jari |
528 |
item.setSelected(true); |
2 |
26 Feb 07 |
jari |
529 |
this.expLabelSelectionMenu.add(item); |
2 |
26 Feb 07 |
jari |
530 |
} |
2 |
26 Feb 07 |
jari |
531 |
} |
2 |
26 Feb 07 |
jari |
532 |
|
2 |
26 Feb 07 |
jari |
533 |
public void addNewExperimentLabelMenuItem(String label) { |
2 |
26 Feb 07 |
jari |
534 |
DefaultAction action = new DefaultAction(actionManager, "Label by "+label, ActionManager.DISPLAY_EXPERIMENT_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
535 |
action.putValue(ActionManager.PARAMETER, label); |
2 |
26 Feb 07 |
jari |
536 |
JRadioButtonMenuItem item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
537 |
experimentLabelGroup.add(item); |
2 |
26 Feb 07 |
jari |
538 |
expLabelSelectionMenu.add(item); |
2 |
26 Feb 07 |
jari |
539 |
} |
2 |
26 Feb 07 |
jari |
540 |
|
2 |
26 Feb 07 |
jari |
541 |
|
2 |
26 Feb 07 |
jari |
542 |
public void replaceExperimentLabelMenuItems(String [] fieldNames){ |
2 |
26 Feb 07 |
jari |
//remove all menu items |
2 |
26 Feb 07 |
jari |
544 |
|
2 |
26 Feb 07 |
jari |
//ButtonModel model = |
2 |
26 Feb 07 |
jari |
//String currentKey = (this.experimentLabelGroup.getSelection()).getActionCommand(); |
2 |
26 Feb 07 |
jari |
547 |
|
2 |
26 Feb 07 |
jari |
548 |
this.expLabelSelectionMenu.removeAll(); |
2 |
26 Feb 07 |
jari |
549 |
|
2 |
26 Feb 07 |
jari |
550 |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
551 |
ButtonGroup bg = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
552 |
DefaultAction action; |
2 |
26 Feb 07 |
jari |
553 |
String cmd; |
2 |
26 Feb 07 |
jari |
554 |
for(int i = 0; i < fieldNames.length; i++){ |
2 |
26 Feb 07 |
jari |
555 |
cmd = "Label by "+fieldNames[i]; |
2 |
26 Feb 07 |
jari |
556 |
action = new DefaultAction(actionManager, cmd, ActionManager.DISPLAY_EXPERIMENT_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
557 |
action.putValue(ActionManager.PARAMETER, fieldNames[i]); |
2 |
26 Feb 07 |
jari |
558 |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
559 |
experimentLabelGroup.add(item); |
2 |
26 Feb 07 |
jari |
560 |
this.expLabelSelectionMenu.add(item); |
2 |
26 Feb 07 |
jari |
561 |
item.setSelected(false); |
2 |
26 Feb 07 |
jari |
562 |
if(i == 0) |
2 |
26 Feb 07 |
jari |
563 |
item.setSelected(true); |
2 |
26 Feb 07 |
jari |
564 |
} |
2 |
26 Feb 07 |
jari |
565 |
} |
2 |
26 Feb 07 |
jari |
566 |
|
2 |
26 Feb 07 |
jari |
567 |
public void replaceLabelMenuItems(String [] fieldNames){ |
2 |
26 Feb 07 |
jari |
//remove all menu items |
2 |
26 Feb 07 |
jari |
569 |
this.labelMenu.removeAll(); |
2 |
26 Feb 07 |
jari |
570 |
|
2 |
26 Feb 07 |
jari |
571 |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
572 |
ButtonGroup bg = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
573 |
DefaultAction action; |
2 |
26 Feb 07 |
jari |
574 |
for(int i = 0; i < fieldNames.length; i++){ |
2 |
26 Feb 07 |
jari |
575 |
action = new DefaultAction(actionManager, "Label by "+fieldNames[i], ActionManager.DISPLAY_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
576 |
action.putValue(ActionManager.PARAMETER, String.valueOf(i)); |
2 |
26 Feb 07 |
jari |
577 |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
578 |
labelGroup.add(item); |
2 |
26 Feb 07 |
jari |
579 |
if(i == 0) |
2 |
26 Feb 07 |
jari |
580 |
item.setSelected(true); |
2 |
26 Feb 07 |
jari |
581 |
this.labelMenu.add(item); |
2 |
26 Feb 07 |
jari |
582 |
} |
2 |
26 Feb 07 |
jari |
583 |
} |
2 |
26 Feb 07 |
jari |
584 |
|
2 |
26 Feb 07 |
jari |
585 |
|
2 |
26 Feb 07 |
jari |
586 |
public void addAffyFilterMenuItems(){ |
2 |
26 Feb 07 |
jari |
587 |
filterMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
588 |
filterMenu.add(createJMenuItem("Set Detection Filter", ActionManager.SET_DETECTION_FILTER_CMD, listener)); |
2 |
26 Feb 07 |
jari |
589 |
filterMenu.add(createJCheckBoxMenuItem("Use Detection Filter", ActionManager.USE_DETECTION_FILTER_CMD, listener)); |
2 |
26 Feb 07 |
jari |
590 |
filterMenu.add(createJMenuItem("Set Fold Filter", ActionManager.SET_FOLD_FILTER_CMD, listener)); |
2 |
26 Feb 07 |
jari |
591 |
filterMenu.add(createJCheckBoxMenuItem("Use Fold Filter", ActionManager.USE_FOLD_FILTER_CMD, listener)); |
2 |
26 Feb 07 |
jari |
592 |
} |
2 |
26 Feb 07 |
jari |
593 |
|
2 |
26 Feb 07 |
jari |
594 |
|
2 |
26 Feb 07 |
jari |
595 |
public void addAffyNormMenuItems() { |
2 |
26 Feb 07 |
jari |
596 |
adjustMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
597 |
JMenu menu = new JMenu("Affymetrix Adjustments"); |
2 |
26 Feb 07 |
jari |
598 |
menu.add(createJMenuItem("Divide Genes by Median", ActionManager.DIVIDE_GENES_MEDIAN_CMD, listener)); |
2 |
26 Feb 07 |
jari |
599 |
menu.add(createJMenuItem("Divide Genes by Mean", ActionManager.DIVIDE_GENES_MEAN_CMD, listener)); |
2 |
26 Feb 07 |
jari |
600 |
adjustMenu.add(menu); |
2 |
26 Feb 07 |
jari |
601 |
this.set_affyNormAddded(true); |
2 |
26 Feb 07 |
jari |
602 |
} |
2 |
26 Feb 07 |
jari |
603 |
|
2 |
26 Feb 07 |
jari |
604 |
/** |
2 |
26 Feb 07 |
jari |
* Adds sort menu items. |
2 |
26 Feb 07 |
jari |
606 |
*/ |
2 |
26 Feb 07 |
jari |
607 |
private void addSortMenuItems(JMenu menu, ActionManager manager, ButtonGroup buttonGroup) { |
2 |
26 Feb 07 |
jari |
608 |
int index = 0; |
2 |
26 Feb 07 |
jari |
609 |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
610 |
Action action; |
2 |
26 Feb 07 |
jari |
611 |
while ((action = manager.getAction(ActionManager.SORT_LABEL_ACTION+String.valueOf(index)))!=null) { |
2 |
26 Feb 07 |
jari |
612 |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
613 |
buttonGroup.add(item); |
2 |
26 Feb 07 |
jari |
614 |
menu.add(item); |
2 |
26 Feb 07 |
jari |
615 |
index++; |
2 |
26 Feb 07 |
jari |
616 |
} |
2 |
26 Feb 07 |
jari |
617 |
} |
2 |
26 Feb 07 |
jari |
618 |
|
2 |
26 Feb 07 |
jari |
619 |
public void addSortMenuItems(String [] fieldNames){ |
2 |
26 Feb 07 |
jari |
/* JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
DefaultAction action; |
2 |
26 Feb 07 |
jari |
for(int i = 0; i < fieldNames.length; i++){ |
2 |
26 Feb 07 |
jari |
action = new DefaultAction(actionManager, "Sort by "+fieldNames[i], ActionManager.SORT_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
action.putValue(ActionManager.PARAMETER, String.valueOf(i)); |
2 |
26 Feb 07 |
jari |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
sortGroup.add(item); |
2 |
26 Feb 07 |
jari |
this.sortMenu.add(item); |
2 |
26 Feb 07 |
jari |
628 |
} |
2 |
26 Feb 07 |
jari |
629 |
*/ |
2 |
26 Feb 07 |
jari |
630 |
} |
2 |
26 Feb 07 |
jari |
631 |
|
2 |
26 Feb 07 |
jari |
632 |
public void replaceSortMenuItems(String [] fieldNames){ |
2 |
26 Feb 07 |
jari |
//Remove all items |
2 |
26 Feb 07 |
jari |
/* this.sortMenu.removeAll(); |
2 |
26 Feb 07 |
jari |
635 |
|
2 |
26 Feb 07 |
jari |
//Restore defaults |
2 |
26 Feb 07 |
jari |
sortMenu.add(createJRadioButtonMenuItem("Sort by Location", ActionManager.SORT_BY_LOCATION_CMD, listener, sortGroup, true)); |
2 |
26 Feb 07 |
jari |
sortMenu.add(createJRadioButtonMenuItem("Sort by Ratio", ActionManager.SORT_BY_RATIO_CMD, listener, sortGroup)); |
2 |
26 Feb 07 |
jari |
639 |
|
2 |
26 Feb 07 |
jari |
JRadioButtonMenuItem item; |
2 |
26 Feb 07 |
jari |
DefaultAction action; |
2 |
26 Feb 07 |
jari |
for(int i = 0; i < fieldNames.length; i++){ |
2 |
26 Feb 07 |
jari |
action = new DefaultAction(actionManager, "Sort by "+fieldNames[i], ActionManager.SORT_LABEL_CMD); |
2 |
26 Feb 07 |
jari |
action.putValue(ActionManager.PARAMETER, String.valueOf(i)); |
2 |
26 Feb 07 |
jari |
item = new JRadioButtonMenuItem(action); |
2 |
26 Feb 07 |
jari |
sortGroup.add(item); |
2 |
26 Feb 07 |
jari |
this.sortMenu.add(item); |
2 |
26 Feb 07 |
jari |
648 |
} |
2 |
26 Feb 07 |
jari |
649 |
*/ |
2 |
26 Feb 07 |
jari |
650 |
|
2 |
26 Feb 07 |
jari |
651 |
|
2 |
26 Feb 07 |
jari |
652 |
} |
2 |
26 Feb 07 |
jari |
653 |
|
2 |
26 Feb 07 |
jari |
654 |
/** |
2 |
26 Feb 07 |
jari |
* Adds analysis menu items. |
2 |
26 Feb 07 |
jari |
656 |
*/ |
2 |
26 Feb 07 |
jari |
657 |
private void addAnalysisMenu(JMenu menu, ActionManager manager) { |
2 |
26 Feb 07 |
jari |
658 |
|
2 |
26 Feb 07 |
jari |
659 |
int index = 0; |
2 |
26 Feb 07 |
jari |
660 |
Action action; |
2 |
26 Feb 07 |
jari |
661 |
String []category={"Clustering","Statistics","Classification","Data Reduction","Meta Analysis","Visualization","Miscellaneous"}; |
2 |
26 Feb 07 |
jari |
//System.out.print(manager.getAction(ActionManager.ANALYSIS_ACTION+String.valueOf(0))); |
2 |
26 Feb 07 |
jari |
//while ((action = manager.getAction("HCL"))!=null) { |
2 |
26 Feb 07 |
jari |
664 |
for(int i=0;i<category.length;i++){ |
2 |
26 Feb 07 |
jari |
//while ((action = manager.getAction(ActionManager.ANALYSIS_ACTION+String.valueOf(index)))!=null) { |
2 |
26 Feb 07 |
jari |
666 |
menu.add(createJMenuItem(category[i],manager)); |
2 |
26 Feb 07 |
jari |
//index++; |
2 |
26 Feb 07 |
jari |
668 |
} |
2 |
26 Feb 07 |
jari |
669 |
} |
2 |
26 Feb 07 |
jari |
670 |
|
2 |
26 Feb 07 |
jari |
671 |
|
2 |
26 Feb 07 |
jari |
672 |
|
2 |
26 Feb 07 |
jari |
673 |
|
2 |
26 Feb 07 |
jari |
674 |
/** |
2 |
26 Feb 07 |
jari |
* Returns an implementation of <code>IDisplayMenu</code> interface. |
2 |
26 Feb 07 |
jari |
676 |
*/ |
2 |
26 Feb 07 |
jari |
677 |
public IDisplayMenu getDisplayMenu() { |
2 |
26 Feb 07 |
jari |
678 |
return displayMenu; |
2 |
26 Feb 07 |
jari |
679 |
} |
2 |
26 Feb 07 |
jari |
680 |
|
2 |
26 Feb 07 |
jari |
681 |
/** |
2 |
26 Feb 07 |
jari |
* Returns an implementation of <code>IDistanceMenu</code> interface. |
2 |
26 Feb 07 |
jari |
683 |
*/ |
2 |
26 Feb 07 |
jari |
684 |
public IDistanceMenu getDistanceMenu() { |
2 |
26 Feb 07 |
jari |
685 |
return distanceMenu; |
2 |
26 Feb 07 |
jari |
686 |
} |
2 |
26 Feb 07 |
jari |
687 |
|
2 |
26 Feb 07 |
jari |
688 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a menu item from specified action. |
2 |
26 Feb 07 |
jari |
690 |
*/ |
2 |
26 Feb 07 |
jari |
691 |
private JMenuItem createJMenuItem(Action action) { |
2 |
26 Feb 07 |
jari |
692 |
JMenuItem item = new JMenuItem(action); |
2 |
26 Feb 07 |
jari |
693 |
item.setActionCommand((String)action.getValue(Action.ACTION_COMMAND_KEY)); |
2 |
26 Feb 07 |
jari |
694 |
return item; |
2 |
26 Feb 07 |
jari |
695 |
} |
2 |
26 Feb 07 |
jari |
696 |
|
2 |
26 Feb 07 |
jari |
697 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a menu item from specified action and category. |
2 |
26 Feb 07 |
jari |
* add by wwang |
2 |
26 Feb 07 |
jari |
700 |
*/ |
2 |
26 Feb 07 |
jari |
701 |
private JMenu createJMenuItem(String category,ActionManager manager) { |
2 |
26 Feb 07 |
jari |
702 |
/* |
2 |
26 Feb 07 |
jari |
JMenuItem item = new JMenuItem(action); |
2 |
26 Feb 07 |
jari |
item.setActionCommand((String)action.getValue(Action.ACTION_COMMAND_KEY)); |
2 |
26 Feb 07 |
jari |
705 |
*/ |
2 |
26 Feb 07 |
jari |
706 |
int index=0; |
2 |
26 Feb 07 |
jari |
707 |
Action action; |
2 |
26 Feb 07 |
jari |
708 |
JMenu item = new JMenu(category); |
2 |
26 Feb 07 |
jari |
709 |
while ((action = manager.getAction(ActionManager.ANALYSIS_ACTION+String.valueOf(index)))!=null) { |
2 |
26 Feb 07 |
jari |
710 |
if((action.getValue(ActionManager.CATEGORY)).equals(category)) |
2 |
26 Feb 07 |
jari |
711 |
item.add(createJMenuItem(action)); |
2 |
26 Feb 07 |
jari |
712 |
index++; |
2 |
26 Feb 07 |
jari |
713 |
} |
2 |
26 Feb 07 |
jari |
714 |
return item; |
2 |
26 Feb 07 |
jari |
715 |
} |
2 |
26 Feb 07 |
jari |
716 |
|
2 |
26 Feb 07 |
jari |
717 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a menu item with specified name and acton command. |
2 |
26 Feb 07 |
jari |
719 |
*/ |
2 |
26 Feb 07 |
jari |
720 |
private JMenuItem createJMenuItem(String name, String command, ActionListener listener) { |
2 |
26 Feb 07 |
jari |
721 |
JMenuItem item = new JMenuItem(name); |
2 |
26 Feb 07 |
jari |
722 |
item.setActionCommand(command); |
2 |
26 Feb 07 |
jari |
723 |
item.addActionListener(listener); |
2 |
26 Feb 07 |
jari |
724 |
return item; |
2 |
26 Feb 07 |
jari |
725 |
} |
2 |
26 Feb 07 |
jari |
726 |
|
2 |
26 Feb 07 |
jari |
727 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a check box menu item with specified name, acton command and state. |
2 |
26 Feb 07 |
jari |
729 |
*/ |
2 |
26 Feb 07 |
jari |
730 |
private JCheckBoxMenuItem createJCheckBoxMenuItem(String name, String command, ActionListener listener, boolean isSelected) { |
2 |
26 Feb 07 |
jari |
731 |
JCheckBoxMenuItem item = new JCheckBoxMenuItem(name); |
2 |
26 Feb 07 |
jari |
732 |
item.setActionCommand(command); |
2 |
26 Feb 07 |
jari |
733 |
item.addActionListener(listener); |
2 |
26 Feb 07 |
jari |
734 |
item.setSelected(isSelected); |
2 |
26 Feb 07 |
jari |
735 |
return item; |
2 |
26 Feb 07 |
jari |
736 |
} |
2 |
26 Feb 07 |
jari |
737 |
|
2 |
26 Feb 07 |
jari |
738 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a check box menu item with specified name and acton command. |
2 |
26 Feb 07 |
jari |
740 |
*/ |
2 |
26 Feb 07 |
jari |
741 |
private JCheckBoxMenuItem createJCheckBoxMenuItem(String name, String command, ActionListener listener) { |
2 |
26 Feb 07 |
jari |
742 |
return createJCheckBoxMenuItem(name, command, listener, false); |
2 |
26 Feb 07 |
jari |
743 |
} |
2 |
26 Feb 07 |
jari |
744 |
|
2 |
26 Feb 07 |
jari |
745 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a radio button menu item with specified name, acton command and state. |
2 |
26 Feb 07 |
jari |
747 |
*/ |
2 |
26 Feb 07 |
jari |
748 |
private JRadioButtonMenuItem createJRadioButtonMenuItem(String name, String command, ActionListener listener, ButtonGroup buttonGroup, boolean isSelected) { |
2 |
26 Feb 07 |
jari |
749 |
JRadioButtonMenuItem item = new JRadioButtonMenuItem(name); |
2 |
26 Feb 07 |
jari |
750 |
item.setActionCommand(command); |
2 |
26 Feb 07 |
jari |
751 |
item.addActionListener(listener); |
2 |
26 Feb 07 |
jari |
752 |
item.setSelected(isSelected); |
2 |
26 Feb 07 |
jari |
753 |
if (buttonGroup != null) { |
2 |
26 Feb 07 |
jari |
754 |
buttonGroup.add(item); |
2 |
26 Feb 07 |
jari |
755 |
} |
2 |
26 Feb 07 |
jari |
756 |
return item; |
2 |
26 Feb 07 |
jari |
757 |
} |
2 |
26 Feb 07 |
jari |
758 |
|
2 |
26 Feb 07 |
jari |
759 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a radio button menu item with specified name, acton command and button group. |
2 |
26 Feb 07 |
jari |
761 |
*/ |
2 |
26 Feb 07 |
jari |
762 |
private JRadioButtonMenuItem createJRadioButtonMenuItem(String name, String command, ActionListener listener, ButtonGroup buttonGroup) { |
2 |
26 Feb 07 |
jari |
763 |
return createJRadioButtonMenuItem(name, command, listener, buttonGroup, false); |
2 |
26 Feb 07 |
jari |
764 |
} |
2 |
26 Feb 07 |
jari |
765 |
|
2 |
26 Feb 07 |
jari |
766 |
/** |
2 |
26 Feb 07 |
jari |
* Returns a menu by it name. |
2 |
26 Feb 07 |
jari |
768 |
*/ |
2 |
26 Feb 07 |
jari |
769 |
private JMenu getJMenu(String name) { |
2 |
26 Feb 07 |
jari |
770 |
JMenu jmenu; |
2 |
26 Feb 07 |
jari |
771 |
for (int i = 0; i < getMenuCount(); i++) { |
2 |
26 Feb 07 |
jari |
772 |
jmenu = getMenu(i); |
2 |
26 Feb 07 |
jari |
773 |
if (jmenu != null && jmenu.getText().equals(name)) |
2 |
26 Feb 07 |
jari |
774 |
return jmenu; |
2 |
26 Feb 07 |
jari |
775 |
} |
2 |
26 Feb 07 |
jari |
776 |
return null; |
2 |
26 Feb 07 |
jari |
777 |
} |
2 |
26 Feb 07 |
jari |
778 |
|
2 |
26 Feb 07 |
jari |
779 |
/** |
2 |
26 Feb 07 |
jari |
* Returns a menu item from specified menu and item action command. |
2 |
26 Feb 07 |
jari |
781 |
*/ |
2 |
26 Feb 07 |
jari |
782 |
private JMenuItem getJMenuItem(String menu_name, String item_command) { |
2 |
26 Feb 07 |
jari |
783 |
JMenu menu = getJMenu(menu_name); |
2 |
26 Feb 07 |
jari |
784 |
if (menu == null) { |
2 |
26 Feb 07 |
jari |
785 |
return null; |
2 |
26 Feb 07 |
jari |
786 |
} |
2 |
26 Feb 07 |
jari |
787 |
JMenuItem item; |
2 |
26 Feb 07 |
jari |
788 |
for (int i=0; i<menu.getItemCount(); i++) { |
2 |
26 Feb 07 |
jari |
789 |
item = menu.getItem(i); |
2 |
26 Feb 07 |
jari |
790 |
if (item != null && item.getActionCommand().equals(item_command)) { |
2 |
26 Feb 07 |
jari |
791 |
return item; |
2 |
26 Feb 07 |
jari |
792 |
} |
2 |
26 Feb 07 |
jari |
793 |
} |
2 |
26 Feb 07 |
jari |
794 |
return null; |
2 |
26 Feb 07 |
jari |
795 |
} |
2 |
26 Feb 07 |
jari |
796 |
|
2 |
26 Feb 07 |
jari |
797 |
/** |
2 |
26 Feb 07 |
jari |
* Sets a menu state with specified name. |
2 |
26 Feb 07 |
jari |
799 |
*/ |
2 |
26 Feb 07 |
jari |
800 |
private void setEnableMenu(String name, boolean enable) { |
2 |
26 Feb 07 |
jari |
801 |
JMenu menu = getJMenu(name); |
2 |
26 Feb 07 |
jari |
802 |
if (menu == null) { |
2 |
26 Feb 07 |
jari |
803 |
return; |
2 |
26 Feb 07 |
jari |
804 |
} |
2 |
26 Feb 07 |
jari |
805 |
menu.setEnabled(enable); |
2 |
26 Feb 07 |
jari |
806 |
} |
2 |
26 Feb 07 |
jari |
807 |
|
2 |
26 Feb 07 |
jari |
808 |
/** |
2 |
26 Feb 07 |
jari |
* Sets a menu item state with specified name. |
2 |
26 Feb 07 |
jari |
810 |
*/ |
2 |
26 Feb 07 |
jari |
811 |
private void setEnableMenuItem(String menu_name, String item_command, boolean enable) { |
2 |
26 Feb 07 |
jari |
812 |
JMenuItem item = getJMenuItem(menu_name, item_command); |
2 |
26 Feb 07 |
jari |
813 |
if (item == null) { |
2 |
26 Feb 07 |
jari |
814 |
return; |
2 |
26 Feb 07 |
jari |
815 |
} |
2 |
26 Feb 07 |
jari |
816 |
item.setEnabled(enable); |
2 |
26 Feb 07 |
jari |
817 |
} |
2 |
26 Feb 07 |
jari |
818 |
|
2 |
26 Feb 07 |
jari |
// pcahan |
2 |
26 Feb 07 |
jari |
820 |
boolean get_affyNormAdded(){ |
2 |
26 Feb 07 |
jari |
821 |
return this.affyNormAdded; |
2 |
26 Feb 07 |
jari |
822 |
} |
2 |
26 Feb 07 |
jari |
823 |
|
2 |
26 Feb 07 |
jari |
824 |
void set_affyNormAddded(boolean set){ |
2 |
26 Feb 07 |
jari |
825 |
this.affyNormAdded = set; |
2 |
26 Feb 07 |
jari |
826 |
} |
2 |
26 Feb 07 |
jari |
827 |
|
2 |
26 Feb 07 |
jari |
828 |
/** |
2 |
26 Feb 07 |
jari |
* Sets current index of label menu. |
2 |
26 Feb 07 |
jari |
830 |
*/ |
2 |
26 Feb 07 |
jari |
831 |
void setLabelIndex(int index) { |
2 |
26 Feb 07 |
jari |
832 |
displayMenu.labelIndex = index; |
2 |
26 Feb 07 |
jari |
833 |
} |
2 |
26 Feb 07 |
jari |
834 |
|
2 |
26 Feb 07 |
jari |
835 |
/** |
2 |
26 Feb 07 |
jari |
* Sets element size attribute. |
2 |
26 Feb 07 |
jari |
837 |
*/ |
2 |
26 Feb 07 |
jari |
838 |
void setElementSize(int width, int height) { |
2 |
26 Feb 07 |
jari |
839 |
displayMenu.elementSize.setSize(width, height); |
2 |
26 Feb 07 |
jari |
840 |
} |
2 |
26 Feb 07 |
jari |
841 |
|
2 |
26 Feb 07 |
jari |
842 |
/** |
2 |
26 Feb 07 |
jari |
* Sets a palette style. |
2 |
26 Feb 07 |
jari |
844 |
*/ |
2 |
26 Feb 07 |
jari |
845 |
void setPaletteStyle(int style) { |
2 |
26 Feb 07 |
jari |
846 |
displayMenu.paletteStyle = style; |
2 |
26 Feb 07 |
jari |
847 |
} |
2 |
26 Feb 07 |
jari |
848 |
|
2 |
26 Feb 07 |
jari |
849 |
/** |
2 |
26 Feb 07 |
jari |
* Sets tracing attribute. |
2 |
26 Feb 07 |
jari |
851 |
*/ |
2 |
26 Feb 07 |
jari |
852 |
void setTracing(boolean tracing) { |
2 |
26 Feb 07 |
jari |
853 |
displayMenu.tracing = tracing; |
2 |
26 Feb 07 |
jari |
854 |
} |
2 |
26 Feb 07 |
jari |
855 |
|
2 |
26 Feb 07 |
jari |
856 |
/** |
2 |
26 Feb 07 |
jari |
* Sets draw borders attribute. |
2 |
26 Feb 07 |
jari |
858 |
*/ |
2 |
26 Feb 07 |
jari |
859 |
void setDrawBorders(boolean drawBorders) { |
2 |
26 Feb 07 |
jari |
860 |
displayMenu.drawBorders = drawBorders; |
2 |
26 Feb 07 |
jari |
861 |
} |
2 |
26 Feb 07 |
jari |
862 |
|
2 |
26 Feb 07 |
jari |
863 |
/** |
2 |
26 Feb 07 |
jari |
* Sets anti-aliasing attribute. |
2 |
26 Feb 07 |
jari |
865 |
*/ |
2 |
26 Feb 07 |
jari |
866 |
void setAntiAliasing(boolean antialiasing) { |
2 |
26 Feb 07 |
jari |
867 |
displayMenu.antialiasing = antialiasing; |
2 |
26 Feb 07 |
jari |
868 |
} |
2 |
26 Feb 07 |
jari |
869 |
|
2 |
26 Feb 07 |
jari |
870 |
/** |
2 |
26 Feb 07 |
jari |
* Sets GR scale attribute. |
2 |
26 Feb 07 |
jari |
872 |
*/ |
2 |
26 Feb 07 |
jari |
873 |
void setGRScale(boolean grscale) { |
2 |
26 Feb 07 |
jari |
874 |
displayMenu.grscale = grscale; |
2 |
26 Feb 07 |
jari |
875 |
} |
2 |
26 Feb 07 |
jari |
876 |
|
2 |
26 Feb 07 |
jari |
877 |
/** |
2 |
26 Feb 07 |
jari |
* Sets the absolute attribute value. |
2 |
26 Feb 07 |
jari |
879 |
*/ |
2 |
26 Feb 07 |
jari |
880 |
void setDistanceAbsolute(boolean absolute) { |
2 |
26 Feb 07 |
jari |
881 |
distanceMenu.absolute = absolute; |
2 |
26 Feb 07 |
jari |
882 |
} |
2 |
26 Feb 07 |
jari |
883 |
|
2 |
26 Feb 07 |
jari |
884 |
/** |
2 |
26 Feb 07 |
jari |
* Sets the distance function attribute. |
2 |
26 Feb 07 |
jari |
886 |
*/ |
2 |
26 Feb 07 |
jari |
887 |
void setDistanceFunction(int function) { |
2 |
26 Feb 07 |
jari |
888 |
distanceMenu.function = function; |
2 |
26 Feb 07 |
jari |
889 |
} |
2 |
26 Feb 07 |
jari |
890 |
|
2 |
26 Feb 07 |
jari |
891 |
/** |
2 |
26 Feb 07 |
jari |
* Sets min ratio scale value. |
2 |
26 Feb 07 |
jari |
893 |
*/ |
2 |
26 Feb 07 |
jari |
894 |
void setMinRatioScale(float scale) { |
2 |
26 Feb 07 |
jari |
895 |
displayMenu.minRatioScale = scale; |
2 |
26 Feb 07 |
jari |
896 |
} |
2 |
26 Feb 07 |
jari |
897 |
|
2 |
26 Feb 07 |
jari |
898 |
/** |
2 |
26 Feb 07 |
jari |
* Sets max ratio scale value. |
2 |
26 Feb 07 |
jari |
900 |
*/ |
2 |
26 Feb 07 |
jari |
901 |
void setMaxRatioScale(float scale) { |
2 |
26 Feb 07 |
jari |
902 |
displayMenu.maxRatioScale = scale; |
2 |
26 Feb 07 |
jari |
//displayMenu.maxRatioScale=200; |
2 |
26 Feb 07 |
jari |
904 |
} |
2 |
26 Feb 07 |
jari |
905 |
|
2 |
26 Feb 07 |
jari |
906 |
/** |
2 |
26 Feb 07 |
jari |
* Sets mid ratio scale value. |
2 |
26 Feb 07 |
jari |
908 |
*/ |
2 |
26 Feb 07 |
jari |
909 |
void setMidRatioValue(float value) { |
2 |
26 Feb 07 |
jari |
910 |
displayMenu.midRatioValue = value; |
2 |
26 Feb 07 |
jari |
911 |
} |
2 |
26 Feb 07 |
jari |
912 |
|
2 |
26 Feb 07 |
jari |
913 |
/** |
2 |
26 Feb 07 |
jari |
* Sets max CY3 scale value. |
2 |
26 Feb 07 |
jari |
915 |
*/ |
2 |
26 Feb 07 |
jari |
916 |
void setMaxCY3Scale(float scale) { |
2 |
26 Feb 07 |
jari |
917 |
displayMenu.maxCY3Scale = scale; |
2 |
26 Feb 07 |
jari |
918 |
} |
2 |
26 Feb 07 |
jari |
919 |
|
2 |
26 Feb 07 |
jari |
920 |
/** |
2 |
26 Feb 07 |
jari |
* Sets max CY5 scale value. |
2 |
26 Feb 07 |
jari |
922 |
*/ |
2 |
26 Feb 07 |
jari |
923 |
void setMaxCY5Scale(float scale) { |
2 |
26 Feb 07 |
jari |
924 |
displayMenu.maxCY5Scale = scale; |
2 |
26 Feb 07 |
jari |
925 |
} |
2 |
26 Feb 07 |
jari |
926 |
|
2 |
26 Feb 07 |
jari |
927 |
/** |
2 |
26 Feb 07 |
jari |
* Sets positive color image |
2 |
26 Feb 07 |
jari |
929 |
*/ |
2 |
26 Feb 07 |
jari |
930 |
void setPositiveCustomGradient(BufferedImage image){ |
2 |
26 Feb 07 |
jari |
931 |
displayMenu.posCustomColorImage = image; |
2 |
26 Feb 07 |
jari |
932 |
} |
2 |
26 Feb 07 |
jari |
933 |
|
2 |
26 Feb 07 |
jari |
934 |
/** |
2 |
26 Feb 07 |
jari |
* Sets negative color image |
2 |
26 Feb 07 |
jari |
936 |
*/ |
2 |
26 Feb 07 |
jari |
937 |
void setNegativeCustomGradient(BufferedImage image){ |
2 |
26 Feb 07 |
jari |
938 |
displayMenu.negCustomColorImage = image; |
2 |
26 Feb 07 |
jari |
939 |
} |
2 |
26 Feb 07 |
jari |
940 |
|
2 |
26 Feb 07 |
jari |
941 |
/** |
2 |
26 Feb 07 |
jari |
* Sets color scheme index |
2 |
26 Feb 07 |
jari |
943 |
*/ |
2 |
26 Feb 07 |
jari |
944 |
void setColorSchemeIndex(int index){ |
2 |
26 Feb 07 |
jari |
945 |
displayMenu.colorScheme = index; |
2 |
26 Feb 07 |
jari |
946 |
} |
2 |
26 Feb 07 |
jari |
947 |
|
2 |
26 Feb 07 |
jari |
948 |
int getColorScheme(){ |
2 |
26 Feb 07 |
jari |
949 |
return displayMenu.getColorScheme(); |
2 |
26 Feb 07 |
jari |
950 |
} |
2 |
26 Feb 07 |
jari |
951 |
|
2 |
26 Feb 07 |
jari |
952 |
|
2 |
26 Feb 07 |
jari |
953 |
/** |
2 |
26 Feb 07 |
jari |
* Return current positive gradient image |
2 |
26 Feb 07 |
jari |
955 |
*/ |
2 |
26 Feb 07 |
jari |
956 |
public BufferedImage getPositiveGradientImage() { |
2 |
26 Feb 07 |
jari |
957 |
return displayMenu.getPositiveGradientImage(); |
2 |
26 Feb 07 |
jari |
958 |
} |
2 |
26 Feb 07 |
jari |
959 |
|
2 |
26 Feb 07 |
jari |
960 |
|
2 |
26 Feb 07 |
jari |
961 |
/** |
2 |
26 Feb 07 |
jari |
* Return current negative gradient image |
2 |
26 Feb 07 |
jari |
963 |
*/ |
2 |
26 Feb 07 |
jari |
964 |
public BufferedImage getNegativeGradientImage() { |
2 |
26 Feb 07 |
jari |
965 |
return displayMenu.getNegativeGradientImage(); |
2 |
26 Feb 07 |
jari |
966 |
} |
2 |
26 Feb 07 |
jari |
967 |
|
2 |
26 Feb 07 |
jari |
968 |
public boolean getColorGradientState(){ |
2 |
26 Feb 07 |
jari |
969 |
return this.displayMenu.getColorGradientState(); |
2 |
26 Feb 07 |
jari |
970 |
} |
2 |
26 Feb 07 |
jari |
971 |
|
2 |
26 Feb 07 |
jari |
972 |
public void setColorGradientState(boolean state){ |
2 |
26 Feb 07 |
jari |
973 |
this.displayMenu.setColorGradientState(state); |
2 |
26 Feb 07 |
jari |
974 |
} |
2 |
26 Feb 07 |
jari |
975 |
|
2 |
26 Feb 07 |
jari |
976 |
public void setNormalizedButtonState(int index){ |
2 |
26 Feb 07 |
jari |
977 |
JRadioButtonMenuItem button = (JRadioButtonMenuItem)(this.normalizationMenu.getMenuComponent(index)); |
2 |
26 Feb 07 |
jari |
978 |
button.setSelected(true); |
2 |
26 Feb 07 |
jari |
979 |
} |
2 |
26 Feb 07 |
jari |
980 |
|
2 |
26 Feb 07 |
jari |
981 |
public void setUseDoubleGradient(boolean useDouble) { |
2 |
26 Feb 07 |
jari |
982 |
this.displayMenu.setUseDoubleGradient(useDouble); |
2 |
26 Feb 07 |
jari |
983 |
} |
2 |
26 Feb 07 |
jari |
984 |
|
2 |
26 Feb 07 |
jari |
985 |
/** |
2 |
26 Feb 07 |
jari |
* The class to present a state of the display menu. |
2 |
26 Feb 07 |
jari |
987 |
*/ |
2 |
26 Feb 07 |
jari |
988 |
private class DisplayMenu implements IDisplayMenu { |
2 |
26 Feb 07 |
jari |
989 |
|
2 |
26 Feb 07 |
jari |
990 |
private final Dimension elementSize = new Dimension(20, 5); |
2 |
26 Feb 07 |
jari |
991 |
private int labelIndex; |
2 |
26 Feb 07 |
jari |
992 |
private int paletteStyle = IDisplayMenu.RATIOSPLIT; |
2 |
26 Feb 07 |
jari |
993 |
private boolean tracing = false; |
2 |
26 Feb 07 |
jari |
994 |
private boolean drawBorders = false; |
2 |
26 Feb 07 |
jari |
995 |
private boolean antialiasing = true; |
2 |
26 Feb 07 |
jari |
996 |
private boolean grscale = true; |
2 |
26 Feb 07 |
jari |
997 |
private boolean useColorGradient = false; |
2 |
26 Feb 07 |
jari |
998 |
private float minRatioScale = -3f; |
2 |
26 Feb 07 |
jari |
999 |
private float maxRatioScale = 3f; |
2 |
26 Feb 07 |
jari |
1000 |
private float midRatioValue = 0f; |
2 |
26 Feb 07 |
jari |
1001 |
private float maxCY3Scale = 0f; |
2 |
26 Feb 07 |
jari |
1002 |
private float maxCY5Scale = 0f; |
2 |
26 Feb 07 |
jari |
1003 |
|
2 |
26 Feb 07 |
jari |
1004 |
private int colorScheme = IDisplayMenu.GREEN_RED_SCHEME; |
2 |
26 Feb 07 |
jari |
1005 |
private BufferedImage negGreenColorImage = createGradientImage(Color.green, Color.black); |
2 |
26 Feb 07 |
jari |
1006 |
private BufferedImage posRedColorImage = createGradientImage(Color.black, Color.red); |
2 |
26 Feb 07 |
jari |
1007 |
private BufferedImage negBlueColorImage = createGradientImage(Color.blue, Color.black); |
2 |
26 Feb 07 |
jari |
1008 |
private BufferedImage posYellowColorImage = createGradientImage(Color.black, Color.yellow); |
2 |
26 Feb 07 |
jari |
1009 |
private BufferedImage rainbowImage = createRainbowImage(); |
2 |
26 Feb 07 |
jari |
1010 |
private BufferedImage negCustomColorImage; |
2 |
26 Feb 07 |
jari |
1011 |
private BufferedImage posCustomColorImage; |
2 |
26 Feb 07 |
jari |
1012 |
private boolean useDoubleGradient = true; |
2 |
26 Feb 07 |
jari |
1013 |
|
2 |
26 Feb 07 |
jari |
1014 |
public int getPaletteStyle() { |
2 |
26 Feb 07 |
jari |
1015 |
return paletteStyle; |
2 |
26 Feb 07 |
jari |
1016 |
} |
2 |
26 Feb 07 |
jari |
1017 |
|
2 |
26 Feb 07 |
jari |
1018 |
public boolean isGRScale() { |
2 |
26 Feb 07 |
jari |
1019 |
return grscale; |
2 |
26 Feb 07 |
jari |
1020 |
} |
2 |
26 Feb 07 |
jari |
1021 |
|
2 |
26 Feb 07 |
jari |
1022 |
public Dimension getElementSize() { |
2 |
26 Feb 07 |
jari |
1023 |
return elementSize; |
2 |
26 Feb 07 |
jari |
1024 |
} |
2 |
26 Feb 07 |
jari |
1025 |
|
2 |
26 Feb 07 |
jari |
1026 |
public boolean getUseDoubleGradient() { |
2 |
26 Feb 07 |
jari |
1027 |
return useDoubleGradient; |
2 |
26 Feb 07 |
jari |
1028 |
} |
2 |
26 Feb 07 |
jari |
1029 |
|
2 |
26 Feb 07 |
jari |
1030 |
public void setUseDoubleGradient(boolean useDouble) { |
2 |
26 Feb 07 |
jari |
1031 |
useDoubleGradient = useDouble; |
2 |
26 Feb 07 |
jari |
1032 |
} |
2 |
26 Feb 07 |
jari |
1033 |
|
2 |
26 Feb 07 |
jari |
1034 |
public boolean isDrawingBorder() { |
2 |
26 Feb 07 |
jari |
1035 |
return drawBorders; |
2 |
26 Feb 07 |
jari |
1036 |
} |
2 |
26 Feb 07 |
jari |
1037 |
|
2 |
26 Feb 07 |
jari |
1038 |
public boolean isTracing() { |
2 |
26 Feb 07 |
jari |
1039 |
return tracing; |
2 |
26 Feb 07 |
jari |
1040 |
} |
2 |
26 Feb 07 |
jari |
1041 |
|
2 |
26 Feb 07 |
jari |
1042 |
public boolean isAntiAliasing() { |
2 |
26 Feb 07 |
jari |
1043 |
return antialiasing; |
2 |
26 Feb 07 |
jari |
1044 |
} |
2 |
26 Feb 07 |
jari |
1045 |
|
2 |
26 Feb 07 |
jari |
1046 |
public int getLabelIndex() { |
2 |
26 Feb 07 |
jari |
1047 |
return labelIndex; |
2 |
26 Feb 07 |
jari |
1048 |
} |
2 |
26 Feb 07 |
jari |
1049 |
|
2 |
26 Feb 07 |
jari |
1050 |
public float getMaxRatioScale() { |
2 |
26 Feb 07 |
jari |
1051 |
return maxRatioScale; |
2 |
26 Feb 07 |
jari |
1052 |
} |
2 |
26 Feb 07 |
jari |
1053 |
|
2 |
26 Feb 07 |
jari |
1054 |
public float getMinRatioScale() { |
2 |
26 Feb 07 |
jari |
1055 |
return minRatioScale; |
2 |
26 Feb 07 |
jari |
1056 |
} |
2 |
26 Feb 07 |
jari |
1057 |
|
2 |
26 Feb 07 |
jari |
1058 |
public float getMidRatioValue() { |
2 |
26 Feb 07 |
jari |
1059 |
return midRatioValue; |
2 |
26 Feb 07 |
jari |
1060 |
} |
2 |
26 Feb 07 |
jari |
1061 |
|
2 |
26 Feb 07 |
jari |
1062 |
public float getMaxCY3Scale() { |
2 |
26 Feb 07 |
jari |
1063 |
return maxCY3Scale; |
2 |
26 Feb 07 |
jari |
1064 |
} |
2 |
26 Feb 07 |
jari |
1065 |
|
2 |
26 Feb 07 |
jari |
1066 |
public float getMaxCY5Scale() { |
2 |
26 Feb 07 |
jari |
1067 |
return maxCY5Scale; |
2 |
26 Feb 07 |
jari |
1068 |
} |
2 |
26 Feb 07 |
jari |
1069 |
|
2 |
26 Feb 07 |
jari |
1070 |
public int getColorScheme() { |
2 |
26 Feb 07 |
jari |
1071 |
return colorScheme; |
2 |
26 Feb 07 |
jari |
1072 |
} |
2 |
26 Feb 07 |
jari |
1073 |
|
2 |
26 Feb 07 |
jari |
1074 |
/** |
2 |
26 Feb 07 |
jari |
* Return current positive gradient image |
2 |
26 Feb 07 |
jari |
1076 |
*/ |
2 |
26 Feb 07 |
jari |
1077 |
public BufferedImage getPositiveGradientImage() { |
2 |
26 Feb 07 |
jari |
1078 |
BufferedImage image = this.posRedColorImage; |
2 |
26 Feb 07 |
jari |
1079 |
switch (this.colorScheme){ |
2 |
26 Feb 07 |
jari |
1080 |
case IDisplayMenu.GREEN_RED_SCHEME: |
2 |
26 Feb 07 |
jari |
1081 |
break; |
2 |
26 Feb 07 |
jari |
1082 |
case IDisplayMenu.BLUE_YELLOW_SCHEME: |
2 |
26 Feb 07 |
jari |
1083 |
image = this.posYellowColorImage; |
2 |
26 Feb 07 |
jari |
1084 |
break; |
2 |
26 Feb 07 |
jari |
1085 |
case IDisplayMenu.CUSTOM_COLOR_SCHEME: |
2 |
26 Feb 07 |
jari |
1086 |
if(this.posCustomColorImage != null) |
2 |
26 Feb 07 |
jari |
1087 |
image = this.posCustomColorImage; |
2 |
26 Feb 07 |
jari |
1088 |
break; |
2 |
26 Feb 07 |
jari |
1089 |
case IDisplayMenu.RAINBOW_COLOR_SCHEME: |
2 |
26 Feb 07 |
jari |
1090 |
image = this.rainbowImage; |
2 |
26 Feb 07 |
jari |
1091 |
} |
2 |
26 Feb 07 |
jari |
1092 |
return image; |
2 |
26 Feb 07 |
jari |
1093 |
} |
2 |
26 Feb 07 |
jari |
1094 |
|
2 |
26 Feb 07 |
jari |
1095 |
|
2 |
26 Feb 07 |
jari |
1096 |
/** |
2 |
26 Feb 07 |
jari |
* Return current negative gradient image |
2 |
26 Feb 07 |
jari |
1098 |
*/ |
2 |
26 Feb 07 |
jari |
1099 |
public BufferedImage getNegativeGradientImage() { |
2 |
26 Feb 07 |
jari |
1100 |
BufferedImage image = this.negGreenColorImage; |
2 |
26 Feb 07 |
jari |
1101 |
switch (this.colorScheme){ |
2 |
26 Feb 07 |
jari |
1102 |
case IDisplayMenu.GREEN_RED_SCHEME: |
2 |
26 Feb 07 |
jari |
1103 |
break; |
2 |
26 Feb 07 |
jari |
1104 |
case IDisplayMenu.BLUE_YELLOW_SCHEME: |
2 |
26 Feb 07 |
jari |
1105 |
image = this.negBlueColorImage; |
2 |
26 Feb 07 |
jari |
1106 |
break; |
2 |
26 Feb 07 |
jari |
1107 |
case IDisplayMenu.CUSTOM_COLOR_SCHEME: |
2 |
26 Feb 07 |
jari |
1108 |
if(this.negCustomColorImage != null) |
2 |
26 Feb 07 |
jari |
1109 |
image = this.negCustomColorImage; |
2 |
26 Feb 07 |
jari |
1110 |
} |
2 |
26 Feb 07 |
jari |
1111 |
return image; |
2 |
26 Feb 07 |
jari |
1112 |
} |
2 |
26 Feb 07 |
jari |
1113 |
|
2 |
26 Feb 07 |
jari |
1114 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a gradient image given specifiedColors |
2 |
26 Feb 07 |
jari |
1116 |
*/ |
2 |
26 Feb 07 |
jari |
1117 |
public BufferedImage createGradientImage(Color color1, Color color2) { |
2 |
26 Feb 07 |
jari |
// BufferedImage image = (BufferedImage)createCompatibleImage(256,1); |
2 |
26 Feb 07 |
jari |
1119 |
|
2 |
26 Feb 07 |
jari |
1120 |
BufferedImage image = (BufferedImage)java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().createCompatibleImage(256,1); |
2 |
26 Feb 07 |
jari |
1121 |
Graphics2D graphics = image.createGraphics(); |
2 |
26 Feb 07 |
jari |
1122 |
GradientPaint gp = new GradientPaint(0, 0, color1, 255, 0, color2); |
2 |
26 Feb 07 |
jari |
1123 |
graphics.setPaint(gp); |
2 |
26 Feb 07 |
jari |
1124 |
graphics.drawRect(0, 0, 255, 1); |
2 |
26 Feb 07 |
jari |
1125 |
return image; |
2 |
26 Feb 07 |
jari |
1126 |
} |
2 |
26 Feb 07 |
jari |
1127 |
|
2 |
26 Feb 07 |
jari |
1128 |
/** |
2 |
26 Feb 07 |
jari |
* Returns true if the use gradient color box is selected |
2 |
26 Feb 07 |
jari |
1130 |
*/ |
2 |
26 Feb 07 |
jari |
1131 |
public boolean getColorGradientState(){ |
2 |
26 Feb 07 |
jari |
1132 |
return useColorGradient; |
2 |
26 Feb 07 |
jari |
1133 |
} |
2 |
26 Feb 07 |
jari |
1134 |
|
2 |
26 Feb 07 |
jari |
1135 |
public void setColorGradientState(boolean state){ |
2 |
26 Feb 07 |
jari |
1136 |
useColorGradient = state; |
2 |
26 Feb 07 |
jari |
1137 |
} |
2 |
26 Feb 07 |
jari |
1138 |
|
2 |
26 Feb 07 |
jari |
1139 |
private BufferedImage createRainbowImage() { |
2 |
26 Feb 07 |
jari |
1140 |
Vector palette = buildPalette(); |
2 |
26 Feb 07 |
jari |
1141 |
|
2 |
26 Feb 07 |
jari |
1142 |
BufferedImage image = (BufferedImage)java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().createCompatibleImage(256,1); |
2 |
26 Feb 07 |
jari |
1143 |
Graphics2D graphics = image.createGraphics(); |
2 |
26 Feb 07 |
jari |
1144 |
|
2 |
26 Feb 07 |
jari |
1145 |
drawScale((Graphics2D)graphics, palette); |
2 |
26 Feb 07 |
jari |
1146 |
|
2 |
26 Feb 07 |
jari |
1147 |
return image; |
2 |
26 Feb 07 |
jari |
1148 |
} |
2 |
26 Feb 07 |
jari |
1149 |
|
2 |
26 Feb 07 |
jari |
1150 |
private void drawScale(Graphics2D g, Vector palette) { |
2 |
26 Feb 07 |
jari |
1151 |
for (int i = 0; i < palette.size(); i++) { |
2 |
26 Feb 07 |
jari |
1152 |
g.setColor((Color) palette.elementAt(i)); |
2 |
26 Feb 07 |
jari |
1153 |
g.fillRect(i, 0, 1, 1); |
2 |
26 Feb 07 |
jari |
1154 |
} |
2 |
26 Feb 07 |
jari |
1155 |
} |
2 |
26 Feb 07 |
jari |
1156 |
|
2 |
26 Feb 07 |
jari |
1157 |
private Vector buildPalette() { |
2 |
26 Feb 07 |
jari |
1158 |
Vector palette = new Vector(256); |
2 |
26 Feb 07 |
jari |
1159 |
Color newColor; |
2 |
26 Feb 07 |
jari |
1160 |
double r, g, b; |
2 |
26 Feb 07 |
jari |
1161 |
|
2 |
26 Feb 07 |
jari |
1162 |
newColor = new Color(0, 0, 0); |
2 |
26 Feb 07 |
jari |
1163 |
palette.addElement(newColor); |
2 |
26 Feb 07 |
jari |
1164 |
|
2 |
26 Feb 07 |
jari |
1165 |
for (int i = 1; i < 256; i++) { |
2 |
26 Feb 07 |
jari |
1166 |
i = 255 - i; |
2 |
26 Feb 07 |
jari |
1167 |
|
2 |
26 Feb 07 |
jari |
1168 |
r = 0; g = 0; b = 0; |
2 |
26 Feb 07 |
jari |
1169 |
|
2 |
26 Feb 07 |
jari |
1170 |
if (i < 33) r = 255; |
2 |
26 Feb 07 |
jari |
1171 |
else if (i > 32 && i < 108) r = Math.abs( 255 * Math.cos((i - 32) * Math.PI / 151)); |
2 |
26 Feb 07 |
jari |
1172 |
else if (i > 107) r = 0; |
2 |
26 Feb 07 |
jari |
1173 |
|
2 |
26 Feb 07 |
jari |
1174 |
if (i < 5) g = 0; |
2 |
26 Feb 07 |
jari |
1175 |
else if (i > 4 && i < 101) g = Math.abs((255 * Math.cos((i - 100) * Math.PI / 189))); |
2 |
26 Feb 07 |
jari |
1176 |
else if (i > 100 && i < 229) g = Math.abs((255 * Math.cos((i - 100) * Math.PI / 294))); |
2 |
26 Feb 07 |
jari |
1177 |
else if (i > 230) g = 0; |
2 |
26 Feb 07 |
jari |
1178 |
|
2 |
26 Feb 07 |
jari |
1179 |
if (i < 72) b = 0; |
2 |
26 Feb 07 |
jari |
1180 |
else if (i > 71 && i < 200) b = Math.abs((255 * Math.cos((i - 199) * Math.PI / 256))); |
2 |
26 Feb 07 |
jari |
1181 |
else if (i > 199) b = Math.abs((255 * Math.cos((i - 199) * Math.PI / 175))); |
2 |
26 Feb 07 |
jari |
1182 |
|
2 |
26 Feb 07 |
jari |
1183 |
newColor = new Color((float) r / 255, (float) g / 255, (float) b / 255); |
2 |
26 Feb 07 |
jari |
1184 |
palette.addElement(newColor); |
2 |
26 Feb 07 |
jari |
1185 |
|
2 |
26 Feb 07 |
jari |
1186 |
i = 255 - i; |
2 |
26 Feb 07 |
jari |
1187 |
} |
2 |
26 Feb 07 |
jari |
1188 |
|
2 |
26 Feb 07 |
jari |
1189 |
return palette; |
2 |
26 Feb 07 |
jari |
1190 |
} |
2 |
26 Feb 07 |
jari |
1191 |
|
2 |
26 Feb 07 |
jari |
1192 |
|
2 |
26 Feb 07 |
jari |
1193 |
|
2 |
26 Feb 07 |
jari |
1194 |
} |
2 |
26 Feb 07 |
jari |
1195 |
|
2 |
26 Feb 07 |
jari |
1196 |
/** |
2 |
26 Feb 07 |
jari |
* The class to present a state of the distance menu. |
2 |
26 Feb 07 |
jari |
1198 |
*/ |
2 |
26 Feb 07 |
jari |
1199 |
private class DistanceMenu implements IDistanceMenu { |
2 |
26 Feb 07 |
jari |
1200 |
private boolean absolute = false; |
2 |
26 Feb 07 |
jari |
1201 |
private int function = Algorithm.DEFAULT; |
2 |
26 Feb 07 |
jari |
1202 |
|
2 |
26 Feb 07 |
jari |
1203 |
public boolean isAbsoluteDistance() { |
2 |
26 Feb 07 |
jari |
1204 |
return absolute; |
2 |
26 Feb 07 |
jari |
1205 |
} |
2 |
26 Feb 07 |
jari |
1206 |
|
2 |
26 Feb 07 |
jari |
1207 |
public int getDistanceFunction() { |
2 |
26 Feb 07 |
jari |
1208 |
return function; |
2 |
26 Feb 07 |
jari |
1209 |
} |
2 |
26 Feb 07 |
jari |
1210 |
|
2 |
26 Feb 07 |
jari |
1211 |
public String getFunctionName(int function) { |
2 |
26 Feb 07 |
jari |
1212 |
String name; |
2 |
26 Feb 07 |
jari |
1213 |
switch (function) { |
2 |
26 Feb 07 |
jari |
1214 |
case Algorithm.PEARSON: name="Pearson Correlation"; break; |
2 |
26 Feb 07 |
jari |
1215 |
case Algorithm.COSINE: name="Cosine Correlation"; break; |
2 |
26 Feb 07 |
jari |
1216 |
case Algorithm.COVARIANCE: name="Covariance"; break; |
2 |
26 Feb 07 |
jari |
1217 |
case Algorithm.EUCLIDEAN: name="Euclidean Distance"; break; |
2 |
26 Feb 07 |
jari |
1218 |
case Algorithm.DOTPRODUCT: name="Average Dot Product"; break; |
2 |
26 Feb 07 |
jari |
1219 |
case Algorithm.PEARSONUNCENTERED: name="Pearson Uncentered"; break; |
2 |
26 Feb 07 |
jari |
1220 |
case Algorithm.PEARSONSQARED: name="Pearson Squared"; break; |
2 |
26 Feb 07 |
jari |
1221 |
case Algorithm.MANHATTAN: name="Manhattan Distance"; break; |
2 |
26 Feb 07 |
jari |
1222 |
case Algorithm.SPEARMANRANK: name="Spearman Rank Correlation"; break; |
2 |
26 Feb 07 |
jari |
1223 |
case Algorithm.KENDALLSTAU: name="Kendall's Tau"; break; |
2 |
26 Feb 07 |
jari |
1224 |
case Algorithm.MUTUALINFORMATION: name="Mutual Information"; break; |
2 |
26 Feb 07 |
jari |
1225 |
default: { name="not defined";} |
2 |
26 Feb 07 |
jari |
1226 |
} |
2 |
26 Feb 07 |
jari |
1227 |
return name; |
2 |
26 Feb 07 |
jari |
1228 |
} |
2 |
26 Feb 07 |
jari |
1229 |
} |
2 |
26 Feb 07 |
jari |
1230 |
|
2 |
26 Feb 07 |
jari |
1231 |
static { |
2 |
26 Feb 07 |
jari |
1232 |
JPopupMenu.setDefaultLightWeightPopupEnabled(false); |
2 |
26 Feb 07 |
jari |
1233 |
} |
2 |
26 Feb 07 |
jari |
1234 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim CGH Menus |
2 |
26 Feb 07 |
jari |
* NOT USED |
2 |
26 Feb 07 |
jari |
1237 |
*/ |
2 |
26 Feb 07 |
jari |
1238 |
public void addCGHMenus2() { |
2 |
26 Feb 07 |
jari |
1239 |
System.out.println("In addCGHMenus2()"); |
2 |
26 Feb 07 |
jari |
1240 |
cloneValuesMenu = new JMenu("CloneValues"); |
2 |
26 Feb 07 |
jari |
1241 |
add(cloneValuesMenu); |
2 |
26 Feb 07 |
jari |
//Add conditional ClonesMenu |
2 |
26 Feb 07 |
jari |
//initCloneValuesMenu(cloneValuesMenu, manager, boolean hasDyeSwap, int cloneValueType, int flankingRegionType); |
2 |
26 Feb 07 |
jari |
1244 |
setCloneValueType(TMEV.defaultCloneValue); |
2 |
26 Feb 07 |
jari |
1245 |
setFlankingRegionType(TMEV.defaultFlankingRegionValue); |
2 |
26 Feb 07 |
jari |
1246 |
initCloneValuesMenu(cloneValuesMenu, listener, false, cghCloneValueMenu.getCloneValueType(), cghCloneValueMenu.getFlankingRegionType()); |
2 |
26 Feb 07 |
jari |
//cghCloneValueMenu.setCloneValueType(ICGHCloneValueMenu.CLONE_VALUE_DISCRETE_DETERMINATION); |
2 |
26 Feb 07 |
jari |
//cghCloneValueMenu.setFlankingRegionType(ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD); |
2 |
26 Feb 07 |
jari |
1249 |
cghDispMenu = new JMenu("CGH Display"); |
2 |
26 Feb 07 |
jari |
1250 |
cghDispMenu.add(createJCheckBoxMenuItem("Flanking Regions", ActionManager.SHOW_FLANKING_REGIONS, listener, false)); |
2 |
26 Feb 07 |
jari |
1251 |
cghDispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1252 |
JMenu cghSizeMenu = new JMenu("Element Length"); |
2 |
26 Feb 07 |
jari |
1253 |
ButtonGroup buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1254 |
cghSizeMenu.add(createJRadioButtonMenuItem("5", ActionManager.CGH_ELEMENT_LENGTH_5, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1255 |
cghSizeMenu.add(createJRadioButtonMenuItem("10", ActionManager.CGH_ELEMENT_LENGTH_10, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1256 |
cghSizeMenu.add(createJRadioButtonMenuItem("20", ActionManager.CGH_ELEMENT_LENGTH_20, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1257 |
cghSizeMenu.add(createJRadioButtonMenuItem("50", ActionManager.CGH_ELEMENT_LENGTH_50, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1258 |
cghSizeMenu.add(createJRadioButtonMenuItem("100", ActionManager.CGH_ELEMENT_LENGTH_100, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1259 |
cghSizeMenu.add(createJRadioButtonMenuItem("Other", ActionManager.CGH_ELEMENT_LENGTH_OTHER, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1260 |
cghSizeMenu.add(createJRadioButtonMenuItem("Fit", ActionManager.CGH_ELEMENT_LENGTH_FIT, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
1261 |
cghDispMenu.add(cghSizeMenu); |
2 |
26 Feb 07 |
jari |
1262 |
JMenu widthMenu = new JMenu("Element Width"); |
2 |
26 Feb 07 |
jari |
1263 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1264 |
widthMenu.add(createJRadioButtonMenuItem("5", ActionManager.CGH_ELEMENT_WIDTH_5, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1265 |
widthMenu.add(createJRadioButtonMenuItem("10", ActionManager.CGH_ELEMENT_WIDTH_10, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1266 |
widthMenu.add(createJRadioButtonMenuItem("20", ActionManager.CGH_ELEMENT_WIDTH_20, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1267 |
widthMenu.add(createJRadioButtonMenuItem("50", ActionManager.CGH_ELEMENT_WIDTH_50, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1268 |
widthMenu.add(createJRadioButtonMenuItem("100", ActionManager.CGH_ELEMENT_WIDTH_100, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1269 |
widthMenu.add(createJRadioButtonMenuItem("Other", ActionManager.CGH_ELEMENT_WIDTH_OTHER, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1270 |
widthMenu.add(createJRadioButtonMenuItem("Fit", ActionManager.CGH_ELEMENT_WIDTH_FIT, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
1271 |
cghDispMenu.add(widthMenu); |
2 |
26 Feb 07 |
jari |
1272 |
cghDispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1273 |
JMenu displayTypeMenu = new JMenu("Display Type"); |
2 |
26 Feb 07 |
jari |
1274 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1275 |
displayTypeMenu.add(createJRadioButtonMenuItem("Mixed", ActionManager.CGH_DISPLAY_TYPE_COMBINED, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
1276 |
displayTypeMenu.add(createJRadioButtonMenuItem("Separated", ActionManager.CGH_DISPLAY_TYPE_SEPARATED, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1277 |
cghDispMenu.add(displayTypeMenu); |
2 |
26 Feb 07 |
jari |
1278 |
cghDispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1279 |
cghDispMenu.add(createJMenuItem("Display Order", ActionManager.CGH_DISPLAY_ORDER, listener)); |
2 |
26 Feb 07 |
jari |
//cghDisplayMenu.add(createJMenuItem("Circle Viewer Background", CGHActionManager.CIRCLE_VIEWER_BACKGROUND, listener)); |
2 |
26 Feb 07 |
jari |
1281 |
cghDispMenu.add(createJCheckBoxMenuItem("Show Header", ActionManager.SHOW_HEADER, listener, true)); |
2 |
26 Feb 07 |
jari |
1282 |
cghDispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1283 |
cghDispMenu.add(createJMenuItem("Clear Annotations", ActionManager.CGH_CLEAR_ANNOTATIONS, listener)); |
2 |
26 Feb 07 |
jari |
1284 |
add(cghDispMenu); |
2 |
26 Feb 07 |
jari |
1285 |
cghAnalysisMenu = new JMenu("CGH Analysis"); |
2 |
26 Feb 07 |
jari |
1286 |
addCghAnalysisMenu(cghAnalysisMenu, /*manager*/ actionManager); |
2 |
26 Feb 07 |
jari |
1287 |
cghAnalysisMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1288 |
cghAnalysisMenu.add(createJMenuItem("Find Gene", ActionManager.FIND_GENE, listener)); |
2 |
26 Feb 07 |
jari |
1289 |
/* |
2 |
26 Feb 07 |
jari |
cghAnalysisMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
cghAnalysisMenu.add(createJMenuItem("Compare Experiments", ActionManager.COMPARE_EXPERIMENTS, listener)); |
2 |
26 Feb 07 |
jari |
1292 |
*/ |
2 |
26 Feb 07 |
jari |
1293 |
add(cghAnalysisMenu); |
2 |
26 Feb 07 |
jari |
1294 |
helpMenu = new JMenu("Help"); |
2 |
26 Feb 07 |
jari |
1295 |
helpMenu.add(createJMenuItem("Default Distances", ActionManager.DEFAULT_DISTANCES_CMD, listener)); |
2 |
26 Feb 07 |
jari |
1296 |
helpMenu.add(createJMenuItem("Support Tree Legend", ActionManager.SHOW_SUPPORTTREE_LEGEND_COMMAND, listener)); |
2 |
26 Feb 07 |
jari |
1297 |
add(helpMenu); |
2 |
26 Feb 07 |
jari |
1298 |
setDefaultValues(); |
2 |
26 Feb 07 |
jari |
//enableCloneDistributions(false); |
2 |
26 Feb 07 |
jari |
1300 |
} |
2 |
26 Feb 07 |
jari |
1301 |
public void addCGHMenus() { |
2 |
26 Feb 07 |
jari |
1302 |
System.out.println("In addCGHMenus()"); |
2 |
26 Feb 07 |
jari |
1303 |
cloneValuesMenu = new JMenu("CloneValues"); |
2 |
26 Feb 07 |
jari |
1304 |
add(cloneValuesMenu); |
2 |
26 Feb 07 |
jari |
//Add conditional ClonesMenu |
2 |
26 Feb 07 |
jari |
//initCloneValuesMenu(cloneValuesMenu, manager, boolean hasDyeSwap, int cloneValueType, int flankingRegionType); |
2 |
26 Feb 07 |
jari |
1307 |
setCloneValueType(TMEV.defaultCloneValue); |
2 |
26 Feb 07 |
jari |
1308 |
setFlankingRegionType(TMEV.defaultFlankingRegionValue); |
2 |
26 Feb 07 |
jari |
1309 |
initCloneValuesMenu(cloneValuesMenu, listener, false, cghCloneValueMenu.getCloneValueType(), cghCloneValueMenu.getFlankingRegionType()); |
2 |
26 Feb 07 |
jari |
//cghCloneValueMenu.setCloneValueType(ICGHCloneValueMenu.CLONE_VALUE_DISCRETE_DETERMINATION); |
2 |
26 Feb 07 |
jari |
//cghCloneValueMenu.setFlankingRegionType(ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD); |
2 |
26 Feb 07 |
jari |
1312 |
JMenu dispMenu = getJMenu("Display"); |
2 |
26 Feb 07 |
jari |
1313 |
dispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1314 |
dispMenu.add(createJCheckBoxMenuItem("Flanking Regions", ActionManager.SHOW_FLANKING_REGIONS, listener, false)); |
2 |
26 Feb 07 |
jari |
1315 |
dispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1316 |
JMenu cghSizeMenu = new JMenu("Element Length"); |
2 |
26 Feb 07 |
jari |
1317 |
ButtonGroup buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1318 |
cghSizeMenu.add(createJRadioButtonMenuItem("5", ActionManager.CGH_ELEMENT_LENGTH_5, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1319 |
cghSizeMenu.add(createJRadioButtonMenuItem("10", ActionManager.CGH_ELEMENT_LENGTH_10, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1320 |
cghSizeMenu.add(createJRadioButtonMenuItem("20", ActionManager.CGH_ELEMENT_LENGTH_20, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1321 |
cghSizeMenu.add(createJRadioButtonMenuItem("50", ActionManager.CGH_ELEMENT_LENGTH_50, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1322 |
cghSizeMenu.add(createJRadioButtonMenuItem("100", ActionManager.CGH_ELEMENT_LENGTH_100, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1323 |
cghSizeMenu.add(createJRadioButtonMenuItem("Other", ActionManager.CGH_ELEMENT_LENGTH_OTHER, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1324 |
cghSizeMenu.add(createJRadioButtonMenuItem("Fit", ActionManager.CGH_ELEMENT_LENGTH_FIT, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
1325 |
dispMenu.add(cghSizeMenu); |
2 |
26 Feb 07 |
jari |
1326 |
JMenu widthMenu = new JMenu("Element Width"); |
2 |
26 Feb 07 |
jari |
1327 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1328 |
widthMenu.add(createJRadioButtonMenuItem("5", ActionManager.CGH_ELEMENT_WIDTH_5, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1329 |
widthMenu.add(createJRadioButtonMenuItem("10", ActionManager.CGH_ELEMENT_WIDTH_10, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1330 |
widthMenu.add(createJRadioButtonMenuItem("20", ActionManager.CGH_ELEMENT_WIDTH_20, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1331 |
widthMenu.add(createJRadioButtonMenuItem("50", ActionManager.CGH_ELEMENT_WIDTH_50, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1332 |
widthMenu.add(createJRadioButtonMenuItem("100", ActionManager.CGH_ELEMENT_WIDTH_100, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1333 |
widthMenu.add(createJRadioButtonMenuItem("Other", ActionManager.CGH_ELEMENT_WIDTH_OTHER, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1334 |
widthMenu.add(createJRadioButtonMenuItem("Fit", ActionManager.CGH_ELEMENT_WIDTH_FIT, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
1335 |
dispMenu.add(widthMenu); |
2 |
26 Feb 07 |
jari |
1336 |
dispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1337 |
JMenu displayTypeMenu = new JMenu("Display Type"); |
2 |
26 Feb 07 |
jari |
1338 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1339 |
displayTypeMenu.add(createJRadioButtonMenuItem("Mixed", ActionManager.CGH_DISPLAY_TYPE_COMBINED, listener, buttonGroup, true)); |
2 |
26 Feb 07 |
jari |
1340 |
displayTypeMenu.add(createJRadioButtonMenuItem("Separated", ActionManager.CGH_DISPLAY_TYPE_SEPARATED, listener, buttonGroup)); |
2 |
26 Feb 07 |
jari |
1341 |
dispMenu.add(displayTypeMenu); |
2 |
26 Feb 07 |
jari |
1342 |
dispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1343 |
dispMenu.add(createJMenuItem("Display Order", ActionManager.CGH_DISPLAY_ORDER, listener)); |
2 |
26 Feb 07 |
jari |
//cghDisplayMenu.add(createJMenuItem("Circle Viewer Background", CGHActionManager.CIRCLE_VIEWER_BACKGROUND, listener)); |
2 |
26 Feb 07 |
jari |
1345 |
dispMenu.add(createJCheckBoxMenuItem("Show Header", ActionManager.SHOW_HEADER, listener, true)); |
2 |
26 Feb 07 |
jari |
1346 |
dispMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1347 |
dispMenu.add(createJMenuItem("Clear Annotations", ActionManager.CGH_CLEAR_ANNOTATIONS, listener)); |
2 |
26 Feb 07 |
jari |
1348 |
cghAnalysisMenu = new JMenu("CGH Analysis"); |
2 |
26 Feb 07 |
jari |
1349 |
addCghAnalysisMenu(cghAnalysisMenu, /*manager*/ actionManager); |
2 |
26 Feb 07 |
jari |
1350 |
cghAnalysisMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1351 |
cghAnalysisMenu.add(createJMenuItem("Find Gene", ActionManager.FIND_GENE, listener)); |
2 |
26 Feb 07 |
jari |
1352 |
/* |
2 |
26 Feb 07 |
jari |
cghAnalysisMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
cghAnalysisMenu.add(createJMenuItem("Compare Experiments", ActionManager.COMPARE_EXPERIMENTS, listener)); |
2 |
26 Feb 07 |
jari |
1355 |
*/ |
2 |
26 Feb 07 |
jari |
1356 |
add(cghAnalysisMenu); |
2 |
26 Feb 07 |
jari |
1357 |
helpMenu = new JMenu("Help"); |
2 |
26 Feb 07 |
jari |
1358 |
helpMenu.add(createJMenuItem("Default Distances", ActionManager.DEFAULT_DISTANCES_CMD, listener)); |
2 |
26 Feb 07 |
jari |
1359 |
helpMenu.add(createJMenuItem("Support Tree Legend", ActionManager.SHOW_SUPPORTTREE_LEGEND_COMMAND, listener)); |
2 |
26 Feb 07 |
jari |
1360 |
add(helpMenu); |
2 |
26 Feb 07 |
jari |
1361 |
setDefaultValues(); |
2 |
26 Feb 07 |
jari |
//enableCloneDistributions(false); |
2 |
26 Feb 07 |
jari |
// End Raktim CGH Menus |
2 |
26 Feb 07 |
jari |
1364 |
} |
2 |
26 Feb 07 |
jari |
1365 |
/** |
2 |
26 Feb 07 |
jari |
* Adds CGH analysis menu items. |
2 |
26 Feb 07 |
jari |
1367 |
*/ |
2 |
26 Feb 07 |
jari |
1368 |
protected void addCghAnalysisMenu(JMenu menu, ActionManager manager) { |
2 |
26 Feb 07 |
jari |
1369 |
int index = 0; |
2 |
26 Feb 07 |
jari |
1370 |
Action action; |
2 |
26 Feb 07 |
jari |
1371 |
while ((action = manager.getAction(ActionManager.CGH_ANALYSIS_ACTION+String.valueOf(index)))!=null) { |
2 |
26 Feb 07 |
jari |
1372 |
menu.add(createJMenuItem(action)); |
2 |
26 Feb 07 |
jari |
1373 |
index++; |
2 |
26 Feb 07 |
jari |
1374 |
} |
2 |
26 Feb 07 |
jari |
1375 |
} |
2 |
26 Feb 07 |
jari |
1376 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim |
2 |
26 Feb 07 |
jari |
* CGH SetDefaultValues() |
2 |
26 Feb 07 |
jari |
1379 |
* |
2 |
26 Feb 07 |
jari |
1380 |
*/ |
2 |
26 Feb 07 |
jari |
1381 |
protected void setDefaultValues(){ |
2 |
26 Feb 07 |
jari |
1382 |
setMinRatioScale(-1f); |
2 |
26 Feb 07 |
jari |
1383 |
setMaxRatioScale(1f); |
2 |
26 Feb 07 |
jari |
1384 |
} |
2 |
26 Feb 07 |
jari |
1385 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim CGH |
2 |
26 Feb 07 |
jari |
* If CGH data is Ratio only, and/or Log2 transformed, Clone distribution |
2 |
26 Feb 07 |
jari |
* is not avialable. Enable/Diasble ClonesMenu based on those. |
2 |
26 Feb 07 |
jari |
1389 |
*/ |
2 |
26 Feb 07 |
jari |
1390 |
public void enableCloneDistributions(boolean CloneDistState, boolean log2state){ |
2 |
26 Feb 07 |
jari |
1391 |
setEnableMenuItem("CloneValues", ActionManager.CLONE_VALUE_DISCRETE_DETERMINATION, !log2state); |
2 |
26 Feb 07 |
jari |
1392 |
setEnableMenuItem("CloneValues", ActionManager.CLONE_VALUE_LOG_CLONE_DISTRIBUTION, CloneDistState); |
2 |
26 Feb 07 |
jari |
1393 |
setEnableMenuItem("CloneValues", ActionManager.CLONE_VALUE_THRESHOLD_OR_CLONE_DISTRIBUTION, CloneDistState); |
2 |
26 Feb 07 |
jari |
1394 |
setEnableMenuItem("CloneValues", ActionManager.FLANKING_REGIONS_BY_LOG_CLONE_DISTRIBUTION, CloneDistState); |
2 |
26 Feb 07 |
jari |
1395 |
setEnableMenuItem("CloneValues", ActionManager.FLANKING_REGIONS_BY_THRESHOLD_OR_CLONE_DISTRIBUTION, CloneDistState); |
2 |
26 Feb 07 |
jari |
1396 |
setEnableMenuItem("CloneValues", ActionManager.CLONE_P_THRESH, CloneDistState); |
2 |
26 Feb 07 |
jari |
1397 |
} |
2 |
26 Feb 07 |
jari |
1398 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim CGH Dsiplay Menu |
2 |
26 Feb 07 |
jari |
* A class to maintain state for CGH Display Menu |
2 |
26 Feb 07 |
jari |
1401 |
*/ |
2 |
26 Feb 07 |
jari |
1402 |
private class CGHDisplayMenu implements ICGHDisplayMenu { |
2 |
26 Feb 07 |
jari |
1403 |
private boolean showFlankingRegions = false; |
2 |
26 Feb 07 |
jari |
1404 |
private double unitLength = ICGHDisplayMenu.FIT_SIZE; |
2 |
26 Feb 07 |
jari |
1405 |
private int elementWidth = (int)ICGHDisplayMenu.FIT_SIZE; |
2 |
26 Feb 07 |
jari |
1406 |
private int displayType; |
2 |
26 Feb 07 |
jari |
1407 |
private int displayLabelType = ICGHDisplayMenu.DISPLAY_WSL_ID; |
2 |
26 Feb 07 |
jari |
1408 |
Color circleViewerBackgroundColor = Color.black; |
2 |
26 Feb 07 |
jari |
/** Getter for property showFlankingRegions. |
2 |
26 Feb 07 |
jari |
* @return Value of property showFlankingRegions. |
2 |
26 Feb 07 |
jari |
1411 |
*/ |
2 |
26 Feb 07 |
jari |
1412 |
public boolean isShowFlankingRegions() { |
2 |
26 Feb 07 |
jari |
1413 |
return showFlankingRegions; |
2 |
26 Feb 07 |
jari |
1414 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property showFlankingRegions. |
2 |
26 Feb 07 |
jari |
* @param showFlankingRegions New value of property showFlankingRegions. |
2 |
26 Feb 07 |
jari |
1417 |
*/ |
2 |
26 Feb 07 |
jari |
1418 |
public void setShowFlankingRegions(boolean showFlankingRegions) { |
2 |
26 Feb 07 |
jari |
1419 |
this.showFlankingRegions = showFlankingRegions; |
2 |
26 Feb 07 |
jari |
1420 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property unitLength. |
2 |
26 Feb 07 |
jari |
* @return Value of property unitLength. |
2 |
26 Feb 07 |
jari |
1423 |
*/ |
2 |
26 Feb 07 |
jari |
1424 |
public double getUnitLength() { |
2 |
26 Feb 07 |
jari |
1425 |
return unitLength; |
2 |
26 Feb 07 |
jari |
1426 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property unitLength. |
2 |
26 Feb 07 |
jari |
* @param unitLength New value of property unitLength. |
2 |
26 Feb 07 |
jari |
1429 |
*/ |
2 |
26 Feb 07 |
jari |
1430 |
public void setUnitLength(double unitLength) { |
2 |
26 Feb 07 |
jari |
1431 |
if(unitLength == ICGHDisplayMenu.FIT_SIZE){ |
2 |
26 Feb 07 |
jari |
1432 |
this.unitLength = unitLength; |
2 |
26 Feb 07 |
jari |
1433 |
}else{ |
2 |
26 Feb 07 |
jari |
1434 |
this.unitLength = unitLength / 1000000; |
2 |
26 Feb 07 |
jari |
1435 |
} |
2 |
26 Feb 07 |
jari |
1436 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property elementWidth. |
2 |
26 Feb 07 |
jari |
* @return Value of property elementWidth. |
2 |
26 Feb 07 |
jari |
1439 |
*/ |
2 |
26 Feb 07 |
jari |
1440 |
public int getElementWidth() { |
2 |
26 Feb 07 |
jari |
1441 |
return elementWidth; |
2 |
26 Feb 07 |
jari |
1442 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property elementWidth. |
2 |
26 Feb 07 |
jari |
* @param elementWidth New value of property elementWidth. |
2 |
26 Feb 07 |
jari |
1445 |
*/ |
2 |
26 Feb 07 |
jari |
1446 |
public void setElementWidth(int elementWidth) { |
2 |
26 Feb 07 |
jari |
1447 |
this.elementWidth = elementWidth; |
2 |
26 Feb 07 |
jari |
1448 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property displayType. |
2 |
26 Feb 07 |
jari |
* @return Value of property displayType. |
2 |
26 Feb 07 |
jari |
1451 |
*/ |
2 |
26 Feb 07 |
jari |
1452 |
public int getDisplayType() { |
2 |
26 Feb 07 |
jari |
1453 |
return displayType; |
2 |
26 Feb 07 |
jari |
1454 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property displayType. |
2 |
26 Feb 07 |
jari |
* @param displayType New value of property displayType. |
2 |
26 Feb 07 |
jari |
1457 |
*/ |
2 |
26 Feb 07 |
jari |
1458 |
public void setDisplayType(int displayType) { |
2 |
26 Feb 07 |
jari |
1459 |
this.displayType = displayType; |
2 |
26 Feb 07 |
jari |
1460 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property circleViewerBackgroundColor. |
2 |
26 Feb 07 |
jari |
* @return Value of property circleViewerBackgroundColor. |
2 |
26 Feb 07 |
jari |
1463 |
*/ |
2 |
26 Feb 07 |
jari |
1464 |
public Color getCircleViewerBackgroundColor() { |
2 |
26 Feb 07 |
jari |
1465 |
return circleViewerBackgroundColor; |
2 |
26 Feb 07 |
jari |
1466 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property circleViewerBackgroundColor. |
2 |
26 Feb 07 |
jari |
* @param circleViewerBackgroundColor New value of property circleViewerBackgroundColor. |
2 |
26 Feb 07 |
jari |
1469 |
*/ |
2 |
26 Feb 07 |
jari |
1470 |
public void setCircleViewerBackgroundColor(java.awt.Color circleViewerBackgroundColor) { |
2 |
26 Feb 07 |
jari |
1471 |
this.circleViewerBackgroundColor = circleViewerBackgroundColor; |
2 |
26 Feb 07 |
jari |
1472 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property displayLabel. |
2 |
26 Feb 07 |
jari |
* @return Value of property displayLabel. |
2 |
26 Feb 07 |
jari |
1475 |
*/ |
2 |
26 Feb 07 |
jari |
1476 |
public int getDisplayLabelType() { |
2 |
26 Feb 07 |
jari |
1477 |
return displayLabelType; |
2 |
26 Feb 07 |
jari |
1478 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property displayLabel. |
2 |
26 Feb 07 |
jari |
* @param displayLabel New value of property displayLabel. |
2 |
26 Feb 07 |
jari |
1481 |
*/ |
2 |
26 Feb 07 |
jari |
1482 |
public void setDisplayLabelType(int displayLabelType) { |
2 |
26 Feb 07 |
jari |
1483 |
this.displayLabelType = displayLabelType; |
2 |
26 Feb 07 |
jari |
1484 |
} |
2 |
26 Feb 07 |
jari |
1485 |
} |
2 |
26 Feb 07 |
jari |
1486 |
/** |
2 |
26 Feb 07 |
jari |
* Toggles the view of flanking regions |
2 |
26 Feb 07 |
jari |
* @param show |
2 |
26 Feb 07 |
jari |
1489 |
*/ |
2 |
26 Feb 07 |
jari |
1490 |
public void setShowFlankingRegions(boolean show){ |
2 |
26 Feb 07 |
jari |
1491 |
cghDisplayMenu.setShowFlankingRegions(show); |
2 |
26 Feb 07 |
jari |
1492 |
} |
2 |
26 Feb 07 |
jari |
1493 |
/** |
2 |
26 Feb 07 |
jari |
* @param elementLength |
2 |
26 Feb 07 |
jari |
1495 |
*/ |
2 |
26 Feb 07 |
jari |
1496 |
public void setCghElementLength(double elementLength){ |
2 |
26 Feb 07 |
jari |
1497 |
cghDisplayMenu.setUnitLength(elementLength); |
2 |
26 Feb 07 |
jari |
1498 |
} |
2 |
26 Feb 07 |
jari |
1499 |
/** |
2 |
26 Feb 07 |
jari |
* @param elementWidth |
2 |
26 Feb 07 |
jari |
1501 |
*/ |
2 |
26 Feb 07 |
jari |
1502 |
public void setCghElementWidth(int elementWidth){ |
2 |
26 Feb 07 |
jari |
1503 |
cghDisplayMenu.setElementWidth(elementWidth); |
2 |
26 Feb 07 |
jari |
1504 |
} |
2 |
26 Feb 07 |
jari |
1505 |
/** |
2 |
26 Feb 07 |
jari |
* @param displayType |
2 |
26 Feb 07 |
jari |
1507 |
*/ |
2 |
26 Feb 07 |
jari |
1508 |
public void setCghDisplayType(int displayType){ |
2 |
26 Feb 07 |
jari |
1509 |
cghDisplayMenu.setDisplayType(displayType); |
2 |
26 Feb 07 |
jari |
1510 |
} |
2 |
26 Feb 07 |
jari |
1511 |
/** |
2 |
26 Feb 07 |
jari |
* Getter for property cghDisplayMenu. |
2 |
26 Feb 07 |
jari |
* @return Value of property cghDisplayMenu. |
2 |
26 Feb 07 |
jari |
1514 |
*/ |
2 |
26 Feb 07 |
jari |
1515 |
public ICGHDisplayMenu getCghDisplayMenu() { |
2 |
26 Feb 07 |
jari |
1516 |
return cghDisplayMenu; |
2 |
26 Feb 07 |
jari |
1517 |
} |
2 |
26 Feb 07 |
jari |
1518 |
/** |
2 |
26 Feb 07 |
jari |
* @param thresh |
2 |
26 Feb 07 |
jari |
1520 |
*/ |
2 |
26 Feb 07 |
jari |
1521 |
public void setAmpThresh(float thresh){ |
2 |
26 Feb 07 |
jari |
1522 |
cghCloneValueMenu.setAmpThresh(thresh); |
2 |
26 Feb 07 |
jari |
1523 |
} |
2 |
26 Feb 07 |
jari |
1524 |
/** |
2 |
26 Feb 07 |
jari |
* @param thresh |
2 |
26 Feb 07 |
jari |
1526 |
*/ |
2 |
26 Feb 07 |
jari |
1527 |
public void setDelThresh(float thresh){ |
2 |
26 Feb 07 |
jari |
1528 |
cghCloneValueMenu.setDelThresh(thresh); |
2 |
26 Feb 07 |
jari |
1529 |
} |
2 |
26 Feb 07 |
jari |
1530 |
/** |
2 |
26 Feb 07 |
jari |
* @param thresh |
2 |
26 Feb 07 |
jari |
1532 |
*/ |
2 |
26 Feb 07 |
jari |
1533 |
public void setAmpThresh2Copy(float thresh){ |
2 |
26 Feb 07 |
jari |
1534 |
cghCloneValueMenu.setAmpThresh2Copy(thresh); |
2 |
26 Feb 07 |
jari |
1535 |
} |
2 |
26 Feb 07 |
jari |
1536 |
/** |
2 |
26 Feb 07 |
jari |
* @param thresh |
2 |
26 Feb 07 |
jari |
1538 |
*/ |
2 |
26 Feb 07 |
jari |
1539 |
public void setDelThresh2Copy(float thresh){ |
2 |
26 Feb 07 |
jari |
1540 |
cghCloneValueMenu.setDelThresh2Copy(thresh); |
2 |
26 Feb 07 |
jari |
1541 |
} |
2 |
26 Feb 07 |
jari |
1542 |
public void setCircleViewerBackgroundColor(java.awt.Color circleViewerBackgroundColor) { |
2 |
26 Feb 07 |
jari |
1543 |
cghDisplayMenu.circleViewerBackgroundColor = circleViewerBackgroundColor; |
2 |
26 Feb 07 |
jari |
1544 |
} |
2 |
26 Feb 07 |
jari |
1545 |
/** |
2 |
26 Feb 07 |
jari |
* @return |
2 |
26 Feb 07 |
jari |
1547 |
*/ |
2 |
26 Feb 07 |
jari |
1548 |
public ICGHCloneValueMenu getCloneValueMenu(){ |
2 |
26 Feb 07 |
jari |
1549 |
return cghCloneValueMenu; |
2 |
26 Feb 07 |
jari |
1550 |
} |
2 |
26 Feb 07 |
jari |
/** sets the threshold to consider a probe as aberrant is probe |
2 |
26 Feb 07 |
jari |
* distributions are used as the copy determination type |
2 |
26 Feb 07 |
jari |
* @param clonePThresh |
2 |
26 Feb 07 |
jari |
1554 |
*/ |
2 |
26 Feb 07 |
jari |
1555 |
public void setClonePThresh(float clonePThresh){ |
2 |
26 Feb 07 |
jari |
1556 |
this.cghCloneValueMenu.setClonePThresh(clonePThresh); |
2 |
26 Feb 07 |
jari |
1557 |
} |
2 |
26 Feb 07 |
jari |
/** Sets the method by which to calculate flanking regions |
2 |
26 Feb 07 |
jari |
* @param flankingRegionsType |
2 |
26 Feb 07 |
jari |
1560 |
*/ |
2 |
26 Feb 07 |
jari |
1561 |
public void setFlankingRegionType(int flankingRegionsType){ |
2 |
26 Feb 07 |
jari |
1562 |
this.cghCloneValueMenu.setFlankingRegionType(flankingRegionsType); |
2 |
26 Feb 07 |
jari |
1563 |
} |
2 |
26 Feb 07 |
jari |
1564 |
/** |
2 |
26 Feb 07 |
jari |
* @param cloneValueType */ |
2 |
26 Feb 07 |
jari |
1566 |
public void setCloneValueType(int cloneValueType){ |
2 |
26 Feb 07 |
jari |
1567 |
this.cghCloneValueMenu.setCloneValueType(cloneValueType); |
2 |
26 Feb 07 |
jari |
1568 |
} |
2 |
26 Feb 07 |
jari |
1569 |
public void setCghDisplayLabelType(int displayLabelType){ |
2 |
26 Feb 07 |
jari |
1570 |
this.cghDisplayMenu.setDisplayLabelType(displayLabelType); |
2 |
26 Feb 07 |
jari |
1571 |
} |
2 |
26 Feb 07 |
jari |
1572 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim CGH CGH Clones Value Menu Init |
2 |
26 Feb 07 |
jari |
* Oct 3, 2005 |
2 |
26 Feb 07 |
jari |
* Make separate methods in case we want to give different |
2 |
26 Feb 07 |
jari |
* options for determining clone values under different circumstances |
2 |
26 Feb 07 |
jari |
1577 |
*/ |
2 |
26 Feb 07 |
jari |
1578 |
public void initCloneValuesMenu(/*JMenu cloneValuesMenu, ActionListener listener,*/ boolean hasDyeSwap /*, int cloneValueType, int flankingRegionType*/){ |
2 |
26 Feb 07 |
jari |
//cloneValuesMenu.removeAll(); |
2 |
26 Feb 07 |
jari |
1580 |
JMenu cloneMenu = getJMenu("CloneValues"); |
2 |
26 Feb 07 |
jari |
1581 |
cloneMenu.removeAll(); |
2 |
26 Feb 07 |
jari |
1582 |
ICGHCloneValueMenu cloneValuesMenu = getCloneValueMenu(); |
2 |
26 Feb 07 |
jari |
1583 |
setCloneValueType(TMEV.defaultCloneValue); |
2 |
26 Feb 07 |
jari |
1584 |
setFlankingRegionType(TMEV.defaultFlankingRegionValue); |
2 |
26 Feb 07 |
jari |
1585 |
if(hasDyeSwap){ |
2 |
26 Feb 07 |
jari |
1586 |
initCloneValuesMenuDyeSwap(cloneMenu, listener, cloneValuesMenu.getCloneValueType(), cloneValuesMenu.getFlankingRegionType()); |
2 |
26 Feb 07 |
jari |
1587 |
}else{ |
2 |
26 Feb 07 |
jari |
1588 |
initCloneValuesMenuNoDyeSwap(cloneMenu, listener, cloneValuesMenu.getCloneValueType(), cloneValuesMenu.getFlankingRegionType()); |
2 |
26 Feb 07 |
jari |
1589 |
} |
2 |
26 Feb 07 |
jari |
1590 |
} |
2 |
26 Feb 07 |
jari |
1591 |
public void initCloneValuesMenu(JMenu cloneValuesMenu, ActionListener listener, boolean hasDyeSwap, int cloneValueType, int flankingRegionType){ |
2 |
26 Feb 07 |
jari |
1592 |
cloneValuesMenu.removeAll(); |
2 |
26 Feb 07 |
jari |
1593 |
if(hasDyeSwap){ |
2 |
26 Feb 07 |
jari |
1594 |
initCloneValuesMenuDyeSwap(cloneValuesMenu, listener, cloneValueType, flankingRegionType); |
2 |
26 Feb 07 |
jari |
1595 |
}else{ |
2 |
26 Feb 07 |
jari |
1596 |
initCloneValuesMenuNoDyeSwap(cloneValuesMenu, listener, cloneValueType, flankingRegionType); |
2 |
26 Feb 07 |
jari |
1597 |
} |
2 |
26 Feb 07 |
jari |
1598 |
} |
2 |
26 Feb 07 |
jari |
1599 |
/** |
2 |
26 Feb 07 |
jari |
* boolean isRatioOnly, boolean log2RatioOnly, boolean cloneDist |
2 |
26 Feb 07 |
jari |
1601 |
*/ |
2 |
26 Feb 07 |
jari |
1602 |
public void initCloneValuesMenuDyeSwap(JMenu cloneValuesMenu, ActionListener listener, int cloneValueType, int flankingRegionType){ |
2 |
26 Feb 07 |
jari |
1603 |
ButtonGroup buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1604 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Clone Ratio Threshold", ActionManager.CLONE_VALUE_DISCRETE_DETERMINATION, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_DISCRETE_DETERMINATION)); |
2 |
26 Feb 07 |
jari |
1605 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Log Invert Average", ActionManager.CLONE_VALUE_LOG_AVERAGE_INVERTED, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_LOG_AVERAGE_INVERTED)); |
2 |
26 Feb 07 |
jari |
1606 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Log Clone Distribution", ActionManager.CLONE_VALUE_LOG_CLONE_DISTRIBUTION, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_LOG_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1607 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Ratio Threshold or Clone Distribution", ActionManager.CLONE_VALUE_THRESHOLD_OR_CLONE_DISTRIBUTION, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_THRESHOLD_OR_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1608 |
cloneValuesMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1609 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1610 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Flanking Regions By Threshold", ActionManager.FLANKING_REGIONS_BY_THRESHOLD, listener, buttonGroup, flankingRegionType == ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD)); |
2 |
26 Feb 07 |
jari |
1611 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Flanking Regions By Clone Distribution", ActionManager.FLANKING_REGIONS_BY_LOG_CLONE_DISTRIBUTION, listener, buttonGroup, flankingRegionType == ICGHCloneValueMenu.FLANKING_REGIONS_BY_LOG_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1612 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Threshold or Clone Distribution", ActionManager.FLANKING_REGIONS_BY_THRESHOLD_OR_CLONE_DISTRIBUTION, listener, buttonGroup, flankingRegionType == ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD_OR_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1613 |
cloneValuesMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1614 |
cloneValuesMenu.add(createJMenuItem("Clone P Threshold", ActionManager.CLONE_P_THRESH, listener)); |
2 |
26 Feb 07 |
jari |
1615 |
cloneValuesMenu.add(createJMenuItem("Set Thresholds", ActionManager.CGH_SET_THRESHOLDS, listener)); |
2 |
26 Feb 07 |
jari |
1616 |
} |
2 |
26 Feb 07 |
jari |
1617 |
public void initCloneValuesMenuNoDyeSwap(JMenu cloneValuesMenu, ActionListener listener, int cloneValueType, int flankingRegionType){ |
2 |
26 Feb 07 |
jari |
1618 |
ButtonGroup buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1619 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Clone Ratio Threshold", ActionManager.CLONE_VALUE_DISCRETE_DETERMINATION, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_DISCRETE_DETERMINATION)); |
2 |
26 Feb 07 |
jari |
1620 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Log Value", ActionManager.CLONE_VALUE_LOG_AVERAGE_INVERTED, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_LOG_AVERAGE_INVERTED)); |
2 |
26 Feb 07 |
jari |
1621 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Log Clone Distribution", ActionManager.CLONE_VALUE_LOG_CLONE_DISTRIBUTION, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_LOG_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1622 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Ratio Threshold or Clone Distribution", ActionManager.CLONE_VALUE_THRESHOLD_OR_CLONE_DISTRIBUTION, listener, buttonGroup, cloneValueType == ICGHCloneValueMenu.CLONE_VALUE_THRESHOLD_OR_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1623 |
cloneValuesMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1624 |
buttonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
1625 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Flanking Regions By Threshold", ActionManager.FLANKING_REGIONS_BY_THRESHOLD, listener, buttonGroup, flankingRegionType == ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD)); |
2 |
26 Feb 07 |
jari |
1626 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Flanking Regions By Clone Distribution", ActionManager.FLANKING_REGIONS_BY_LOG_CLONE_DISTRIBUTION, listener, buttonGroup, flankingRegionType == ICGHCloneValueMenu.FLANKING_REGIONS_BY_LOG_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1627 |
cloneValuesMenu.add(createJRadioButtonMenuItem("Threshold or Clone Distribution", ActionManager.FLANKING_REGIONS_BY_THRESHOLD_OR_CLONE_DISTRIBUTION, listener, buttonGroup, flankingRegionType == ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD_OR_CLONE_DISTRIBUTION)); |
2 |
26 Feb 07 |
jari |
1628 |
cloneValuesMenu.addSeparator(); |
2 |
26 Feb 07 |
jari |
1629 |
cloneValuesMenu.add(createJMenuItem("Clone P Threshold", ActionManager.CLONE_P_THRESH, listener)); |
2 |
26 Feb 07 |
jari |
1630 |
cloneValuesMenu.add(createJMenuItem("Set Thresholds", ActionManager.CGH_SET_THRESHOLDS, listener)); |
2 |
26 Feb 07 |
jari |
1631 |
} |
2 |
26 Feb 07 |
jari |
1632 |
/** |
2 |
26 Feb 07 |
jari |
* Raktim CGH Dsiplay Menu |
2 |
26 Feb 07 |
jari |
* A class to maintain state for CGH Clones Menu |
2 |
26 Feb 07 |
jari |
1635 |
*/ |
2 |
26 Feb 07 |
jari |
1636 |
protected class CGHCloneValueMenu implements ICGHCloneValueMenu { |
2 |
26 Feb 07 |
jari |
//private int cloneValueType = ICGHCloneValueMenu.CLONE_VALUE_DISCRETE_DETERMINATION; |
2 |
26 Feb 07 |
jari |
//private int flankingRegionType = ICGHCloneValueMenu.FLANKING_REGIONS_BY_THRESHOLD; |
2 |
26 Feb 07 |
jari |
1639 |
/** |
2 |
26 Feb 07 |
jari |
* The following 2 statements needs to be revisited |
2 |
26 Feb 07 |
jari |
1641 |
*/ |
2 |
26 Feb 07 |
jari |
1642 |
private int cloneValueType = TMEV.defaultCloneValue; |
2 |
26 Feb 07 |
jari |
1643 |
private int flankingRegionType = TMEV.defaultFlankingRegionValue; |
2 |
26 Feb 07 |
jari |
1644 |
/** |
2 |
26 Feb 07 |
jari |
* Old thresold defaults based on unlogged ratio |
2 |
26 Feb 07 |
jari |
private float ampThresh = 1.2f; |
2 |
26 Feb 07 |
jari |
private float delThresh = .8f; |
2 |
26 Feb 07 |
jari |
private float ampThresh2Copy = 2.0f; |
2 |
26 Feb 07 |
jari |
private float delThresh2Copy = .3f; |
2 |
26 Feb 07 |
jari |
1650 |
*/ |
2 |
26 Feb 07 |
jari |
1651 |
/** |
2 |
26 Feb 07 |
jari |
* New CGH threshold based on log2 ratio cuttoffs |
2 |
26 Feb 07 |
jari |
* Raktim Nov 21, 2005 |
2 |
26 Feb 07 |
jari |
1654 |
*/ |
2 |
26 Feb 07 |
jari |
1655 |
private float ampThresh = 0.8f; |
2 |
26 Feb 07 |
jari |
1656 |
private float delThresh = -0.8f; |
2 |
26 Feb 07 |
jari |
1657 |
private float ampThresh2Copy = 1.0f; |
2 |
26 Feb 07 |
jari |
1658 |
private float delThresh2Copy = -1.0f; |
2 |
26 Feb 07 |
jari |
1659 |
private float clonePThresh = .85f; |
2 |
26 Feb 07 |
jari |
1660 |
public CGHCloneValueMenu(){ } |
2 |
26 Feb 07 |
jari |
1661 |
/** |
2 |
26 Feb 07 |
jari |
* @return */ |
2 |
26 Feb 07 |
jari |
1663 |
public int getCloneValueType() { |
2 |
26 Feb 07 |
jari |
1664 |
return this.cloneValueType; |
2 |
26 Feb 07 |
jari |
1665 |
} |
2 |
26 Feb 07 |
jari |
1666 |
/** |
2 |
26 Feb 07 |
jari |
* @param cloneValueType */ |
2 |
26 Feb 07 |
jari |
1668 |
public void setCloneValueType(int cloneValueType) { |
2 |
26 Feb 07 |
jari |
1669 |
this.cloneValueType = cloneValueType; |
2 |
26 Feb 07 |
jari |
1670 |
} |
2 |
26 Feb 07 |
jari |
1671 |
/** |
2 |
26 Feb 07 |
jari |
* @return */ |
2 |
26 Feb 07 |
jari |
1673 |
public float getClonePThresh() { |
2 |
26 Feb 07 |
jari |
1674 |
return this.clonePThresh; |
2 |
26 Feb 07 |
jari |
1675 |
} |
2 |
26 Feb 07 |
jari |
1676 |
/** |
2 |
26 Feb 07 |
jari |
* @param clonePThresh */ |
2 |
26 Feb 07 |
jari |
1678 |
public void setClonePThresh(float clonePThresh){ |
2 |
26 Feb 07 |
jari |
1679 |
this.clonePThresh = clonePThresh; |
2 |
26 Feb 07 |
jari |
1680 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property ampThresh. |
2 |
26 Feb 07 |
jari |
* @return Value of property ampThresh. |
2 |
26 Feb 07 |
jari |
1683 |
*/ |
2 |
26 Feb 07 |
jari |
1684 |
public float getAmpThresh() { |
2 |
26 Feb 07 |
jari |
1685 |
return ampThresh; |
2 |
26 Feb 07 |
jari |
1686 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property ampThresh. |
2 |
26 Feb 07 |
jari |
* @param ampThresh New value of property ampThresh. |
2 |
26 Feb 07 |
jari |
1689 |
*/ |
2 |
26 Feb 07 |
jari |
1690 |
public void setAmpThresh(float ampThresh) { |
2 |
26 Feb 07 |
jari |
1691 |
this.ampThresh = ampThresh; |
2 |
26 Feb 07 |
jari |
1692 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property delThresh. |
2 |
26 Feb 07 |
jari |
* @return Value of property delThresh. |
2 |
26 Feb 07 |
jari |
1695 |
*/ |
2 |
26 Feb 07 |
jari |
1696 |
public float getDelThresh() { |
2 |
26 Feb 07 |
jari |
1697 |
return delThresh; |
2 |
26 Feb 07 |
jari |
1698 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property delThresh. |
2 |
26 Feb 07 |
jari |
* @param delThresh New value of property delThresh. |
2 |
26 Feb 07 |
jari |
1701 |
*/ |
2 |
26 Feb 07 |
jari |
1702 |
public void setDelThresh(float delThresh) { |
2 |
26 Feb 07 |
jari |
1703 |
this.delThresh = delThresh; |
2 |
26 Feb 07 |
jari |
1704 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property ampThresh2Copy. |
2 |
26 Feb 07 |
jari |
* @return Value of property ampThresh2Copy. |
2 |
26 Feb 07 |
jari |
1707 |
*/ |
2 |
26 Feb 07 |
jari |
1708 |
public float getAmpThresh2Copy() { |
2 |
26 Feb 07 |
jari |
1709 |
return ampThresh2Copy; |
2 |
26 Feb 07 |
jari |
1710 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property ampThresh2Copy. |
2 |
26 Feb 07 |
jari |
* @param ampThresh2Copy New value of property ampThresh2Copy. |
2 |
26 Feb 07 |
jari |
1713 |
*/ |
2 |
26 Feb 07 |
jari |
1714 |
public void setAmpThresh2Copy(float ampThresh2Copy) { |
2 |
26 Feb 07 |
jari |
1715 |
this.ampThresh2Copy = ampThresh2Copy; |
2 |
26 Feb 07 |
jari |
1716 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property delThresh2Copy. |
2 |
26 Feb 07 |
jari |
* @return Value of property delThresh2Copy. |
2 |
26 Feb 07 |
jari |
1719 |
*/ |
2 |
26 Feb 07 |
jari |
1720 |
public float getDelThresh2Copy() { |
2 |
26 Feb 07 |
jari |
1721 |
return delThresh2Copy; |
2 |
26 Feb 07 |
jari |
1722 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property delThresh2Copy. |
2 |
26 Feb 07 |
jari |
* @param delThresh2Copy New value of property delThresh2Copy. |
2 |
26 Feb 07 |
jari |
1725 |
*/ |
2 |
26 Feb 07 |
jari |
1726 |
public void setDelThresh2Copy(float delThresh2Copy) { |
2 |
26 Feb 07 |
jari |
1727 |
this.delThresh2Copy = delThresh2Copy; |
2 |
26 Feb 07 |
jari |
1728 |
} |
2 |
26 Feb 07 |
jari |
/** Getter for property flankingRegionType. |
2 |
26 Feb 07 |
jari |
* @return Value of property flankingRegionType. |
2 |
26 Feb 07 |
jari |
1731 |
*/ |
2 |
26 Feb 07 |
jari |
1732 |
public int getFlankingRegionType() { |
2 |
26 Feb 07 |
jari |
1733 |
return flankingRegionType; |
2 |
26 Feb 07 |
jari |
1734 |
} |
2 |
26 Feb 07 |
jari |
/** Setter for property flankingRegionType. |
2 |
26 Feb 07 |
jari |
* @param flankingRegionType New value of property flankingRegionType. |
2 |
26 Feb 07 |
jari |
1737 |
*/ |
2 |
26 Feb 07 |
jari |
1738 |
public void setFlankingRegionType(int flankingRegionType) { |
2 |
26 Feb 07 |
jari |
1739 |
this.flankingRegionType = flankingRegionType; |
2 |
26 Feb 07 |
jari |
1740 |
} |
2 |
26 Feb 07 |
jari |
1741 |
} |
2 |
26 Feb 07 |
jari |
1742 |
} |