2 |
26 Feb 07 |
jari |
1 |
/* |
2 |
26 Feb 07 |
jari |
Copyright @ 1999-2005, 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 |
* DAMSearchDialog.java |
2 |
26 Feb 07 |
jari |
7 |
* |
2 |
26 Feb 07 |
jari |
8 |
*/ |
2 |
26 Feb 07 |
jari |
9 |
|
2 |
26 Feb 07 |
jari |
10 |
package org.tigr.microarray.mev.cluster.gui.impl.dam; |
2 |
26 Feb 07 |
jari |
11 |
|
2 |
26 Feb 07 |
jari |
12 |
import java.awt.event.ActionEvent; |
2 |
26 Feb 07 |
jari |
13 |
import java.awt.event.ActionListener; |
2 |
26 Feb 07 |
jari |
14 |
import java.awt.event.FocusEvent; |
2 |
26 Feb 07 |
jari |
15 |
import java.awt.event.FocusListener; |
2 |
26 Feb 07 |
jari |
16 |
import java.util.Vector; |
2 |
26 Feb 07 |
jari |
17 |
|
2 |
26 Feb 07 |
jari |
18 |
import javax.swing.ButtonGroup; |
2 |
26 Feb 07 |
jari |
19 |
import javax.swing.JTable; |
2 |
26 Feb 07 |
jari |
20 |
import javax.swing.ListSelectionModel; |
2 |
26 Feb 07 |
jari |
21 |
|
2 |
26 Feb 07 |
jari |
22 |
import org.tigr.microarray.mev.cluster.gui.impl.GUIFactory; |
2 |
26 Feb 07 |
jari |
23 |
|
2 |
26 Feb 07 |
jari |
24 |
|
2 |
26 Feb 07 |
jari |
25 |
public class DAMSearchDialog extends javax.swing.JDialog { |
2 |
26 Feb 07 |
jari |
26 |
|
2 |
26 Feb 07 |
jari |
27 |
JTable table; |
2 |
26 Feb 07 |
jari |
28 |
String searchStr; |
2 |
26 Feb 07 |
jari |
29 |
int numSearchCols; |
2 |
26 Feb 07 |
jari |
30 |
int numRows; |
2 |
26 Feb 07 |
jari |
31 |
int numCols; |
2 |
26 Feb 07 |
jari |
32 |
int numClasses; |
2 |
26 Feb 07 |
jari |
33 |
Vector foundRowIndices; |
2 |
26 Feb 07 |
jari |
34 |
ButtonGroup searchButtonGroup; |
2 |
26 Feb 07 |
jari |
35 |
|
2 |
26 Feb 07 |
jari |
/** Creates new form DAMSearchDialog |
2 |
26 Feb 07 |
jari |
* @param parent parent frame |
2 |
26 Feb 07 |
jari |
* @param table parent table |
2 |
26 Feb 07 |
jari |
* @param modal modal selection |
2 |
26 Feb 07 |
jari |
40 |
*/ |
2 |
26 Feb 07 |
jari |
41 |
public DAMSearchDialog(java.awt.Frame parent, JTable table, int numClasses, boolean modal) { |
2 |
26 Feb 07 |
jari |
42 |
super(parent, modal); |
2 |
26 Feb 07 |
jari |
43 |
this.table = table; |
2 |
26 Feb 07 |
jari |
44 |
this.numClasses = numClasses; |
2 |
26 Feb 07 |
jari |
45 |
numRows = table.getRowCount(); |
2 |
26 Feb 07 |
jari |
46 |
numCols = table.getColumnCount(); |
2 |
26 Feb 07 |
jari |
47 |
numSearchCols = numCols - (numClasses + 2); |
2 |
26 Feb 07 |
jari |
48 |
foundRowIndices = new Vector(); |
2 |
26 Feb 07 |
jari |
49 |
|
2 |
26 Feb 07 |
jari |
50 |
initComponents(); |
2 |
26 Feb 07 |
jari |
51 |
this.geneBarContainerLabel.setIcon(GUIFactory.getIcon("dialog_banner2.gif")); |
2 |
26 Feb 07 |
jari |
52 |
|
2 |
26 Feb 07 |
jari |
53 |
searchButtonGroup = new ButtonGroup(); |
2 |
26 Feb 07 |
jari |
54 |
searchButtonGroup.add(this.selectAllButton); |
2 |
26 Feb 07 |
jari |
55 |
searchButtonGroup.add(this.selectIncrButton); |
2 |
26 Feb 07 |
jari |
56 |
|
2 |
26 Feb 07 |
jari |
57 |
this.setSize( 250, 200 ); |
2 |
26 Feb 07 |
jari |
58 |
this.pack(); |
2 |
26 Feb 07 |
jari |
59 |
|
2 |
26 Feb 07 |
jari |
60 |
this.jComboBox1.setMaximumRowCount(10); |
2 |
26 Feb 07 |
jari |
61 |
|
2 |
26 Feb 07 |
jari |
62 |
searchStr = null; |
2 |
26 Feb 07 |
jari |
63 |
|
2 |
26 Feb 07 |
jari |
64 |
this.jComboBox1.setEditable(true); |
2 |
26 Feb 07 |
jari |
65 |
this.jComboBox1.insertItemAt(new String(""), 0); |
2 |
26 Feb 07 |
jari |
66 |
|
2 |
26 Feb 07 |
jari |
67 |
this.findButton.addActionListener(new ActionListener(){ |
2 |
26 Feb 07 |
jari |
68 |
public void actionPerformed( ActionEvent ae){ |
2 |
26 Feb 07 |
jari |
69 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
70 |
runSearch(); |
2 |
26 Feb 07 |
jari |
71 |
if(foundRowIndices.size() > 0 && selectIncrButton.isSelected()) |
2 |
26 Feb 07 |
jari |
72 |
findNextButton.setEnabled(true); |
2 |
26 Feb 07 |
jari |
73 |
else |
2 |
26 Feb 07 |
jari |
74 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
75 |
} |
2 |
26 Feb 07 |
jari |
76 |
}); |
2 |
26 Feb 07 |
jari |
77 |
|
2 |
26 Feb 07 |
jari |
78 |
this.findNextButton.addActionListener(new ActionListener(){ |
2 |
26 Feb 07 |
jari |
79 |
public void actionPerformed(ActionEvent ae){ |
2 |
26 Feb 07 |
jari |
80 |
findNext(); |
2 |
26 Feb 07 |
jari |
81 |
} |
2 |
26 Feb 07 |
jari |
82 |
}); |
2 |
26 Feb 07 |
jari |
83 |
|
2 |
26 Feb 07 |
jari |
84 |
this.closeButton.addActionListener(new ActionListener(){ |
2 |
26 Feb 07 |
jari |
85 |
public void actionPerformed( ActionEvent ae){ |
2 |
26 Feb 07 |
jari |
86 |
foundRowIndices.removeAllElements(); |
2 |
26 Feb 07 |
jari |
87 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
88 |
selectAllButton.setSelected(true); |
2 |
26 Feb 07 |
jari |
89 |
matchCaseChkBox.setSelected(true); |
2 |
26 Feb 07 |
jari |
90 |
setVisible(false); |
2 |
26 Feb 07 |
jari |
91 |
} |
2 |
26 Feb 07 |
jari |
92 |
}); |
2 |
26 Feb 07 |
jari |
93 |
|
2 |
26 Feb 07 |
jari |
94 |
this.jComboBox1.addFocusListener(new FocusListener(){ |
2 |
26 Feb 07 |
jari |
95 |
public void focusGained(FocusEvent fe){ |
2 |
26 Feb 07 |
jari |
96 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
97 |
findNextButton.repaint(); |
2 |
26 Feb 07 |
jari |
98 |
foundRowIndices.removeAllElements(); |
2 |
26 Feb 07 |
jari |
99 |
} |
2 |
26 Feb 07 |
jari |
100 |
|
2 |
26 Feb 07 |
jari |
101 |
public void focusLost(FocusEvent fe){ |
2 |
26 Feb 07 |
jari |
102 |
|
2 |
26 Feb 07 |
jari |
103 |
} |
2 |
26 Feb 07 |
jari |
104 |
}); |
2 |
26 Feb 07 |
jari |
105 |
|
2 |
26 Feb 07 |
jari |
106 |
} |
2 |
26 Feb 07 |
jari |
107 |
|
2 |
26 Feb 07 |
jari |
108 |
|
2 |
26 Feb 07 |
jari |
109 |
/** |
2 |
26 Feb 07 |
jari |
* Runs search within table |
2 |
26 Feb 07 |
jari |
* @return Returns true if found |
2 |
26 Feb 07 |
jari |
112 |
*/ |
2 |
26 Feb 07 |
jari |
113 |
private boolean runSearch(){ |
2 |
26 Feb 07 |
jari |
114 |
|
2 |
26 Feb 07 |
jari |
115 |
ListSelectionModel lsm = table.getSelectionModel(); |
2 |
26 Feb 07 |
jari |
116 |
foundRowIndices = new Vector(); |
2 |
26 Feb 07 |
jari |
117 |
boolean selectAll = this.selectAllButton.isSelected(); |
2 |
26 Feb 07 |
jari |
118 |
boolean found = false; |
2 |
26 Feb 07 |
jari |
119 |
|
2 |
26 Feb 07 |
jari |
120 |
searchStr = (String)this.jComboBox1.getSelectedItem(); |
2 |
26 Feb 07 |
jari |
121 |
if(searchStr == null || numSearchCols == 0 || searchStr.equals("")) |
2 |
26 Feb 07 |
jari |
122 |
return found; |
2 |
26 Feb 07 |
jari |
123 |
|
2 |
26 Feb 07 |
jari |
124 |
table.clearSelection(); |
2 |
26 Feb 07 |
jari |
125 |
this.jComboBox1.insertItemAt(searchStr, 0); |
2 |
26 Feb 07 |
jari |
126 |
|
2 |
26 Feb 07 |
jari |
127 |
if( this.matchCaseChkBox.isSelected() ){ |
2 |
26 Feb 07 |
jari |
128 |
for(int row = 0; row < numRows; row++){ |
2 |
26 Feb 07 |
jari |
129 |
|
2 |
26 Feb 07 |
jari |
130 |
for(int col = (numClasses + 2); col < numCols; col++){ |
2 |
26 Feb 07 |
jari |
131 |
if( ((String)table.getValueAt(row, col)).indexOf( searchStr ) != -1){ |
2 |
26 Feb 07 |
jari |
//select row; |
2 |
26 Feb 07 |
jari |
133 |
if(selectAll || !found){ |
2 |
26 Feb 07 |
jari |
134 |
table.addRowSelectionInterval(row, row); |
2 |
26 Feb 07 |
jari |
//first occurance |
2 |
26 Feb 07 |
jari |
136 |
if(!found){ |
2 |
26 Feb 07 |
jari |
137 |
table.scrollRectToVisible(table.getCellRect(row, 0, true)); |
2 |
26 Feb 07 |
jari |
138 |
found = true; |
2 |
26 Feb 07 |
jari |
139 |
} |
2 |
26 Feb 07 |
jari |
140 |
} |
2 |
26 Feb 07 |
jari |
141 |
else |
2 |
26 Feb 07 |
jari |
142 |
foundRowIndices.add(new Integer(row)); |
2 |
26 Feb 07 |
jari |
143 |
break; |
2 |
26 Feb 07 |
jari |
144 |
} |
2 |
26 Feb 07 |
jari |
145 |
} |
2 |
26 Feb 07 |
jari |
146 |
} |
2 |
26 Feb 07 |
jari |
147 |
} |
2 |
26 Feb 07 |
jari |
148 |
|
2 |
26 Feb 07 |
jari |
149 |
else{ |
2 |
26 Feb 07 |
jari |
150 |
|
2 |
26 Feb 07 |
jari |
151 |
String upperCaseStr = searchStr.toUpperCase(); |
2 |
26 Feb 07 |
jari |
152 |
|
2 |
26 Feb 07 |
jari |
153 |
for(int row = 0; row < numRows; row++){ |
2 |
26 Feb 07 |
jari |
154 |
|
2 |
26 Feb 07 |
jari |
155 |
for(int col = (numClasses + 2); col < numCols; col++){ |
2 |
26 Feb 07 |
jari |
156 |
if( (((String)table.getValueAt(row, col)).toUpperCase()).indexOf( upperCaseStr ) != -1){ |
2 |
26 Feb 07 |
jari |
//select row; |
2 |
26 Feb 07 |
jari |
158 |
if(selectAll || !found){ |
2 |
26 Feb 07 |
jari |
159 |
table.addRowSelectionInterval(row, row); |
2 |
26 Feb 07 |
jari |
//first occurance |
2 |
26 Feb 07 |
jari |
161 |
if(!found){ |
2 |
26 Feb 07 |
jari |
162 |
table.scrollRectToVisible(table.getCellRect(row, 0, true)); |
2 |
26 Feb 07 |
jari |
163 |
found = true; |
2 |
26 Feb 07 |
jari |
164 |
} |
2 |
26 Feb 07 |
jari |
165 |
} |
2 |
26 Feb 07 |
jari |
166 |
else |
2 |
26 Feb 07 |
jari |
167 |
foundRowIndices.add(new Integer(row)); |
2 |
26 Feb 07 |
jari |
168 |
break; |
2 |
26 Feb 07 |
jari |
169 |
} |
2 |
26 Feb 07 |
jari |
170 |
} |
2 |
26 Feb 07 |
jari |
171 |
} |
2 |
26 Feb 07 |
jari |
172 |
} |
2 |
26 Feb 07 |
jari |
173 |
|
2 |
26 Feb 07 |
jari |
174 |
return found; |
2 |
26 Feb 07 |
jari |
175 |
} |
2 |
26 Feb 07 |
jari |
176 |
|
2 |
26 Feb 07 |
jari |
177 |
|
2 |
26 Feb 07 |
jari |
178 |
|
2 |
26 Feb 07 |
jari |
179 |
/** |
2 |
26 Feb 07 |
jari |
* Selects next row in table |
2 |
26 Feb 07 |
jari |
181 |
*/ |
2 |
26 Feb 07 |
jari |
182 |
public void findNext(){ |
2 |
26 Feb 07 |
jari |
183 |
|
2 |
26 Feb 07 |
jari |
184 |
if(foundRowIndices.isEmpty()) |
2 |
26 Feb 07 |
jari |
185 |
return; |
2 |
26 Feb 07 |
jari |
186 |
|
2 |
26 Feb 07 |
jari |
187 |
int row = ((Integer)foundRowIndices.remove(0)).intValue(); //take off first element |
2 |
26 Feb 07 |
jari |
188 |
table.clearSelection(); |
2 |
26 Feb 07 |
jari |
189 |
table.addRowSelectionInterval(row,row); |
2 |
26 Feb 07 |
jari |
190 |
table.scrollRectToVisible(table.getCellRect(row, 0, true)); |
2 |
26 Feb 07 |
jari |
191 |
if(foundRowIndices.size() == 0) |
2 |
26 Feb 07 |
jari |
192 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
193 |
|
2 |
26 Feb 07 |
jari |
194 |
} |
2 |
26 Feb 07 |
jari |
195 |
|
2 |
26 Feb 07 |
jari |
196 |
|
2 |
26 Feb 07 |
jari |
197 |
|
2 |
26 Feb 07 |
jari |
/** This method is called from within the constructor to |
2 |
26 Feb 07 |
jari |
* initialize the dialog. |
2 |
26 Feb 07 |
jari |
200 |
*/ |
2 |
26 Feb 07 |
jari |
201 |
private void initComponents() { |
2 |
26 Feb 07 |
jari |
202 |
buttonGroup1 = new javax.swing.ButtonGroup(); |
2 |
26 Feb 07 |
jari |
203 |
jComboBox1 = new javax.swing.JComboBox(); |
2 |
26 Feb 07 |
jari |
204 |
jLabel2 = new javax.swing.JLabel(); |
2 |
26 Feb 07 |
jari |
205 |
matchCaseChkBox = new javax.swing.JCheckBox(); |
2 |
26 Feb 07 |
jari |
206 |
selectAllButton = new javax.swing.JRadioButton(); |
2 |
26 Feb 07 |
jari |
207 |
selectIncrButton = new javax.swing.JRadioButton(); |
2 |
26 Feb 07 |
jari |
208 |
buttonPanel = new javax.swing.JPanel(); |
2 |
26 Feb 07 |
jari |
209 |
findButton = new javax.swing.JButton(); |
2 |
26 Feb 07 |
jari |
210 |
findNextButton = new javax.swing.JButton(); |
2 |
26 Feb 07 |
jari |
211 |
closeButton = new javax.swing.JButton(); |
2 |
26 Feb 07 |
jari |
212 |
geneBarPanel = new javax.swing.JPanel(); |
2 |
26 Feb 07 |
jari |
213 |
geneBarContainerLabel = new javax.swing.JLabel(); |
2 |
26 Feb 07 |
jari |
214 |
|
2 |
26 Feb 07 |
jari |
215 |
|
2 |
26 Feb 07 |
jari |
216 |
getContentPane().setLayout(new java.awt.GridBagLayout()); |
2 |
26 Feb 07 |
jari |
217 |
java.awt.GridBagConstraints gridBagConstraints1; |
2 |
26 Feb 07 |
jari |
218 |
|
2 |
26 Feb 07 |
jari |
219 |
setTitle("Search"); |
2 |
26 Feb 07 |
jari |
220 |
setName("Search"); |
2 |
26 Feb 07 |
jari |
221 |
setResizable(false); |
2 |
26 Feb 07 |
jari |
222 |
addWindowListener(new java.awt.event.WindowAdapter() { |
2 |
26 Feb 07 |
jari |
223 |
public void windowClosing(java.awt.event.WindowEvent evt) { |
2 |
26 Feb 07 |
jari |
224 |
closeDialog(evt); |
2 |
26 Feb 07 |
jari |
225 |
} |
2 |
26 Feb 07 |
jari |
226 |
}); |
2 |
26 Feb 07 |
jari |
227 |
|
2 |
26 Feb 07 |
jari |
228 |
jComboBox1.addActionListener(new java.awt.event.ActionListener() { |
2 |
26 Feb 07 |
jari |
229 |
public void actionPerformed(java.awt.event.ActionEvent evt) { |
2 |
26 Feb 07 |
jari |
230 |
jComboBox1ActionPerformed(evt); |
2 |
26 Feb 07 |
jari |
231 |
} |
2 |
26 Feb 07 |
jari |
232 |
}); |
2 |
26 Feb 07 |
jari |
233 |
|
2 |
26 Feb 07 |
jari |
234 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
235 |
gridBagConstraints1.gridx = 1; |
2 |
26 Feb 07 |
jari |
236 |
gridBagConstraints1.gridy = 1; |
2 |
26 Feb 07 |
jari |
237 |
gridBagConstraints1.gridwidth = 2; |
2 |
26 Feb 07 |
jari |
238 |
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; |
2 |
26 Feb 07 |
jari |
239 |
gridBagConstraints1.insets = new java.awt.Insets(10, 10, 10, 10); |
2 |
26 Feb 07 |
jari |
240 |
getContentPane().add(jComboBox1, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
241 |
|
2 |
26 Feb 07 |
jari |
242 |
jLabel2.setText("Find what:"); |
2 |
26 Feb 07 |
jari |
243 |
jLabel2.setForeground(java.awt.Color.black); |
2 |
26 Feb 07 |
jari |
244 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
245 |
gridBagConstraints1.gridx = 0; |
2 |
26 Feb 07 |
jari |
246 |
gridBagConstraints1.gridy = 1; |
2 |
26 Feb 07 |
jari |
247 |
gridBagConstraints1.insets = new java.awt.Insets(10, 10, 10, 10); |
2 |
26 Feb 07 |
jari |
248 |
gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST; |
2 |
26 Feb 07 |
jari |
249 |
getContentPane().add(jLabel2, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
250 |
|
2 |
26 Feb 07 |
jari |
251 |
matchCaseChkBox.setText("Match Case"); |
2 |
26 Feb 07 |
jari |
252 |
matchCaseChkBox.setFocusPainted(false); |
2 |
26 Feb 07 |
jari |
253 |
matchCaseChkBox.addActionListener(new java.awt.event.ActionListener() { |
2 |
26 Feb 07 |
jari |
254 |
public void actionPerformed(java.awt.event.ActionEvent evt) { |
2 |
26 Feb 07 |
jari |
255 |
matchCaseChkBoxActionPerformed(evt); |
2 |
26 Feb 07 |
jari |
256 |
} |
2 |
26 Feb 07 |
jari |
257 |
}); |
2 |
26 Feb 07 |
jari |
258 |
|
2 |
26 Feb 07 |
jari |
259 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
260 |
gridBagConstraints1.gridx = 1; |
2 |
26 Feb 07 |
jari |
261 |
gridBagConstraints1.gridy = 3; |
2 |
26 Feb 07 |
jari |
262 |
gridBagConstraints1.insets = new java.awt.Insets(0, 0, 0, 10); |
2 |
26 Feb 07 |
jari |
263 |
getContentPane().add(matchCaseChkBox, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
264 |
|
2 |
26 Feb 07 |
jari |
265 |
selectAllButton.setToolTipText("Select all finds at once."); |
2 |
26 Feb 07 |
jari |
266 |
selectAllButton.setSelected(true); |
2 |
26 Feb 07 |
jari |
267 |
selectAllButton.setText("Select All Rows Found"); |
2 |
26 Feb 07 |
jari |
268 |
selectAllButton.setFocusPainted(false); |
2 |
26 Feb 07 |
jari |
269 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
270 |
gridBagConstraints1.gridx = 2; |
2 |
26 Feb 07 |
jari |
271 |
gridBagConstraints1.gridy = 2; |
2 |
26 Feb 07 |
jari |
272 |
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; |
2 |
26 Feb 07 |
jari |
273 |
getContentPane().add(selectAllButton, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
274 |
|
2 |
26 Feb 07 |
jari |
275 |
selectIncrButton.setToolTipText("Move throgh finds sequentially."); |
2 |
26 Feb 07 |
jari |
276 |
selectIncrButton.setText("Select Incrementally"); |
2 |
26 Feb 07 |
jari |
277 |
selectIncrButton.setFocusPainted(false); |
2 |
26 Feb 07 |
jari |
278 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
279 |
gridBagConstraints1.gridx = 2; |
2 |
26 Feb 07 |
jari |
280 |
gridBagConstraints1.gridy = 3; |
2 |
26 Feb 07 |
jari |
281 |
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; |
2 |
26 Feb 07 |
jari |
282 |
getContentPane().add(selectIncrButton, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
283 |
|
2 |
26 Feb 07 |
jari |
284 |
findButton.setText("Find"); |
2 |
26 Feb 07 |
jari |
285 |
buttonPanel.add(findButton); |
2 |
26 Feb 07 |
jari |
286 |
|
2 |
26 Feb 07 |
jari |
287 |
findNextButton.setText("Find Next"); |
2 |
26 Feb 07 |
jari |
288 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
289 |
buttonPanel.add(findNextButton); |
2 |
26 Feb 07 |
jari |
290 |
|
2 |
26 Feb 07 |
jari |
291 |
closeButton.setText("Close"); |
2 |
26 Feb 07 |
jari |
292 |
buttonPanel.add(closeButton); |
2 |
26 Feb 07 |
jari |
293 |
|
2 |
26 Feb 07 |
jari |
294 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
295 |
gridBagConstraints1.gridx = 1; |
2 |
26 Feb 07 |
jari |
296 |
gridBagConstraints1.gridy = 4; |
2 |
26 Feb 07 |
jari |
297 |
gridBagConstraints1.gridwidth = 2; |
2 |
26 Feb 07 |
jari |
298 |
gridBagConstraints1.insets = new java.awt.Insets(10, 0, 0, 0); |
2 |
26 Feb 07 |
jari |
299 |
getContentPane().add(buttonPanel, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
300 |
|
2 |
26 Feb 07 |
jari |
301 |
geneBarContainerLabel.setToolTipText("The Institute for Genomic Research"); |
2 |
26 Feb 07 |
jari |
302 |
geneBarContainerLabel.setIconTextGap(0); |
2 |
26 Feb 07 |
jari |
303 |
this.geneBarContainerLabel.setIcon(GUIFactory.getIcon("genebar2.gif")); |
2 |
26 Feb 07 |
jari |
304 |
|
2 |
26 Feb 07 |
jari |
305 |
geneBarPanel.add(geneBarContainerLabel); |
2 |
26 Feb 07 |
jari |
306 |
|
2 |
26 Feb 07 |
jari |
307 |
gridBagConstraints1 = new java.awt.GridBagConstraints(); |
2 |
26 Feb 07 |
jari |
308 |
gridBagConstraints1.gridx = 0; |
2 |
26 Feb 07 |
jari |
309 |
gridBagConstraints1.gridy = 0; |
2 |
26 Feb 07 |
jari |
310 |
gridBagConstraints1.gridwidth = 3; |
2 |
26 Feb 07 |
jari |
311 |
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; |
2 |
26 Feb 07 |
jari |
312 |
gridBagConstraints1.anchor = java.awt.GridBagConstraints.NORTH; |
2 |
26 Feb 07 |
jari |
313 |
gridBagConstraints1.weightx = 1.0; |
2 |
26 Feb 07 |
jari |
314 |
getContentPane().add(geneBarPanel, gridBagConstraints1); |
2 |
26 Feb 07 |
jari |
315 |
|
2 |
26 Feb 07 |
jari |
316 |
pack(); |
2 |
26 Feb 07 |
jari |
317 |
} |
2 |
26 Feb 07 |
jari |
318 |
|
2 |
26 Feb 07 |
jari |
319 |
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) { |
2 |
26 Feb 07 |
jari |
320 |
foundRowIndices.removeAllElements(); |
2 |
26 Feb 07 |
jari |
321 |
findNextButton.setEnabled(false); |
2 |
26 Feb 07 |
jari |
322 |
} |
2 |
26 Feb 07 |
jari |
323 |
|
2 |
26 Feb 07 |
jari |
/** Handles checkbox event |
2 |
26 Feb 07 |
jari |
325 |
*/ |
2 |
26 Feb 07 |
jari |
326 |
private void matchCaseChkBoxActionPerformed(java.awt.event.ActionEvent evt) { |
2 |
26 Feb 07 |
jari |
// Add your handling code here: |
2 |
26 Feb 07 |
jari |
328 |
} |
2 |
26 Feb 07 |
jari |
329 |
|
2 |
26 Feb 07 |
jari |
/** Closes the dialog */ |
2 |
26 Feb 07 |
jari |
331 |
private void closeDialog(java.awt.event.WindowEvent evt) { |
2 |
26 Feb 07 |
jari |
332 |
setVisible(false); |
2 |
26 Feb 07 |
jari |
333 |
} |
2 |
26 Feb 07 |
jari |
334 |
|
2 |
26 Feb 07 |
jari |
335 |
|
2 |
26 Feb 07 |
jari |
336 |
|
2 |
26 Feb 07 |
jari |
// Variables declaration - do not modify |
2 |
26 Feb 07 |
jari |
338 |
private javax.swing.ButtonGroup buttonGroup1; |
2 |
26 Feb 07 |
jari |
339 |
private javax.swing.JComboBox jComboBox1; |
2 |
26 Feb 07 |
jari |
340 |
private javax.swing.JLabel jLabel2; |
2 |
26 Feb 07 |
jari |
341 |
private javax.swing.JCheckBox matchCaseChkBox; |
2 |
26 Feb 07 |
jari |
342 |
private javax.swing.JRadioButton selectAllButton; |
2 |
26 Feb 07 |
jari |
343 |
private javax.swing.JRadioButton selectIncrButton; |
2 |
26 Feb 07 |
jari |
344 |
private javax.swing.JPanel buttonPanel; |
2 |
26 Feb 07 |
jari |
345 |
private javax.swing.JButton findButton; |
2 |
26 Feb 07 |
jari |
346 |
private javax.swing.JButton findNextButton; |
2 |
26 Feb 07 |
jari |
347 |
private javax.swing.JButton closeButton; |
2 |
26 Feb 07 |
jari |
348 |
private javax.swing.JPanel geneBarPanel; |
2 |
26 Feb 07 |
jari |
349 |
private javax.swing.JLabel geneBarContainerLabel; |
2 |
26 Feb 07 |
jari |
// End of variables declaration |
2 |
26 Feb 07 |
jari |
351 |
|
2 |
26 Feb 07 |
jari |
352 |
public static void main(String [] args){ |
2 |
26 Feb 07 |
jari |
//DAMSearchDialog dialog = new DAMSearchDialog(new java.awt.Frame(), new JTable(), numClasses, false); |
2 |
26 Feb 07 |
jari |
//dialog.show(); |
2 |
26 Feb 07 |
jari |
355 |
} |
2 |
26 Feb 07 |
jari |
356 |
|
2 |
26 Feb 07 |
jari |
357 |
} |
2 |
26 Feb 07 |
jari |
358 |
|