KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > verifier > gui > ControlPanel


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.verifier.gui;
24
25
26 import javax.help.CSH;
27 import javax.help.HelpBroker;
28 import javax.help.HelpSet;
29 import javax.swing.BorderFactory JavaDoc;
30 import javax.swing.Box JavaDoc;
31 import javax.swing.BoxLayout JavaDoc;
32 import javax.swing.ButtonGroup JavaDoc;
33 import javax.swing.DefaultListModel JavaDoc;
34 import javax.swing.JButton JavaDoc;
35 import javax.swing.JFileChooser JavaDoc;
36 import javax.swing.JFrame JavaDoc;
37 import javax.swing.JLabel JavaDoc;
38 import javax.swing.JList JavaDoc;
39 import javax.swing.JOptionPane JavaDoc;
40 import javax.swing.JPanel JavaDoc;
41 import javax.swing.JRadioButton JavaDoc;
42 import javax.swing.JScrollPane JavaDoc;
43 import javax.swing.ListSelectionModel JavaDoc;
44 import javax.swing.SwingConstants JavaDoc;
45
46 import java.awt.BorderLayout JavaDoc;
47 import java.awt.Color JavaDoc;
48 import java.awt.Dimension JavaDoc;
49 import java.awt.GridLayout JavaDoc;
50 import java.awt.event.ActionEvent JavaDoc;
51 import java.awt.event.ActionListener JavaDoc;
52 import java.awt.event.KeyEvent JavaDoc;
53 import java.io.File JavaDoc;
54 import java.net.URL JavaDoc;
55 import java.util.logging.Level JavaDoc;
56 import java.util.logging.Logger JavaDoc;
57
58 import com.sun.enterprise.logging.LogDomains;
59 import com.sun.enterprise.tools.verifier.StringManagerHelper;
60 import com.sun.enterprise.tools.verifier.util.VerifierConstants;
61
62 public class ControlPanel extends JPanel JavaDoc {
63
64     static com.sun.enterprise.util.LocalStringManagerImpl smh =
65             StringManagerHelper.getLocalStringsManager();
66     static String JavaDoc allString =
67             (smh.getLocalString
68             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
69
".AllRadioButton", // NOI18N
70
"All Results")); // NOI18N
71
static String JavaDoc failString =
72             (smh.getLocalString
73             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
74
".FailuresOnlyRadioButton", // NOI18N
75
"Failures Only")); // NOI18N
76
static String JavaDoc warnString =
77             (smh.getLocalString
78             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
79
".FailuresWarningRadioButton", // NOI18N
80
"Failures and Warnings only")); // NOI18N
81

82     // Strings used for 508 compliance
83
static String JavaDoc buttonName =
84             (smh.getLocalString
85             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
86
".buttonName", // NOI18N
87
"Button")); // NOI18N
88
static String JavaDoc buttonDesc =
89             (smh.getLocalString
90             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
91
".buttonDesc", // NOI18N
92
"This is a button used to select an action")); // NOI18N
93
static String JavaDoc radioButtonName =
94             (smh.getLocalString
95             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
96
".radioButtonName", // NOI18N
97
"Radio Button")); // NOI18N
98
static String JavaDoc radioButtonDesc =
99             (smh.getLocalString
100             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
101
".radioButtonDesc", // NOI18N
102
"This is a radio button used to select one from option from many choices")); // NOI18N
103
static String JavaDoc panelName =
104             (smh.getLocalString
105             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
106
".panelName", // NOI18N
107
"Panel")); // NOI18N
108
static String JavaDoc panelDesc =
109             (smh.getLocalString
110             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
111
".panelDesc", // NOI18N
112
"This is a panel in the verifier window")); // NOI18N
113

114     static JRadioButton JavaDoc allButton = new JRadioButton JavaDoc(allString);
115     static JRadioButton JavaDoc failButton = new JRadioButton JavaDoc(failString);
116     static JRadioButton JavaDoc warnButton = new JRadioButton JavaDoc(warnString);
117     static final String JavaDoc helpsetName = "Help"; // NOI18N
118

119
120     // Logger to log messages
121
private static Logger JavaDoc logger = LogDomains.getLogger(LogDomains.AVK_VERIFIER_LOGGER);
122
123     // Main HelpSet & Broker
124
private static HelpBroker mainHB = null;
125
126     // Defaults for Main Help, - don't i18n, must be called this
127
private static int reportLevel = VerifierConstants.ALL;
128
129     final DefaultListModel JavaDoc listModel; // the list of files to verify
130

131     JButton JavaDoc okButton;
132     JButton JavaDoc closeButton;
133     JButton JavaDoc helpButton;
134
135     JFrame JavaDoc parent;
136     HelpSet mainHS = null;
137
138    /**
139      * This is the control panel of the Verifier GUI
140      */

141     public ControlPanel(JFrame JavaDoc p) {
142         parent = p;
143
144         // 508 for this panel
145
this.getAccessibleContext().setAccessibleName(panelName);
146         this.getAccessibleContext().setAccessibleDescription(panelDesc);
147         allButton.getAccessibleContext().setAccessibleName(radioButtonName);
148         allButton.getAccessibleContext().setAccessibleDescription(radioButtonDesc);
149         failButton.getAccessibleContext().setAccessibleName(radioButtonName);
150         failButton.getAccessibleContext().setAccessibleDescription(radioButtonDesc);
151         warnButton.getAccessibleContext().setAccessibleName(radioButtonName);
152         warnButton.getAccessibleContext().setAccessibleDescription(radioButtonDesc);
153
154         // set up title border
155
setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.black),
156                 (smh.getLocalString("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
157
".ItemsToBeVerifierPanelLabel", // NOI18N
158
"Items to be Verified")))); // NOI18N
159
setLayout(new BoxLayout JavaDoc(this, BoxLayout.X_AXIS));
160
161         //Create the verification list U
162

163         //buttons
164
JButton JavaDoc addButton = new JButton JavaDoc((smh.getLocalString
165                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
166
".AddButton", // NOI18N
167
"Add..."))); // NOI18N
168
JButton JavaDoc deleteButton = new JButton JavaDoc((smh.getLocalString
169                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
170
".DeleteButton", // NOI18N
171
"Delete"))); // NOI18N
172

173         // 508 compliance for the above buttons
174
addButton.getAccessibleContext().setAccessibleName(buttonName);
175         addButton.getAccessibleContext().setAccessibleDescription(buttonDesc);
176         addButton.setMnemonic('A');
177         deleteButton.getAccessibleContext().setAccessibleName(buttonName);
178         deleteButton.getAccessibleContext().setAccessibleDescription(buttonDesc);
179         deleteButton.setMnemonic('D');
180
181         //main part of the dialog
182
listModel = new DefaultListModel JavaDoc();
183         final JList JavaDoc list = new JList JavaDoc(listModel);
184         // 508 for JList
185
list.getAccessibleContext().setAccessibleName(smh.getLocalString
186                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
187
".listName", // NOI18N
188
"List")); // NOI18N
189
list.getAccessibleContext().setAccessibleDescription(smh.getLocalString
190                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
191
".listDesc", // NOI18N
192
"This is a list")); // NOI18N
193

194         list.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
195
196         JScrollPane JavaDoc listScroller = new JScrollPane JavaDoc(list);
197         // 508 for JScrollPane
198
listScroller.getAccessibleContext().setAccessibleName(smh.getLocalString
199                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
200
".scrName", // NOI18N
201
"Scroll Pane")); // NOI18N
202
listScroller.getAccessibleContext().setAccessibleDescription
203                 (smh.getLocalString("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
204
".scrDesc", // NOI18N
205
"This is a scroll pane that helps to scroll the list")); // NOI18N
206
listScroller.setPreferredSize(new Dimension JavaDoc(250, 80));
207         //XXX: Must do the following, too, or else the scroller thinks
208
//XXX: it's taller than it is:
209
listScroller.setMinimumSize(new Dimension JavaDoc(250, 80));
210         listScroller.setAlignmentX(LEFT_ALIGNMENT);
211
212         //Create a container so that we can add a title around
213
//the scroll pane. Can't add a title directly to the
214
//scroll pane because its background would be white.
215
//Lay out the label and scroll pane from top to button.
216
JPanel JavaDoc listPane = new JPanel JavaDoc();
217         // 508 for this panel
218
listPane.getAccessibleContext().setAccessibleName(panelName);
219         listPane.getAccessibleContext().setAccessibleDescription(panelDesc);
220         listPane.setLayout(new BoxLayout JavaDoc(listPane, BoxLayout.Y_AXIS));
221         //JLabel label = new JLabel("Selected Items");
222
//label.setLabelFor(list);
223
//listPane.add(label);
224
listPane.add(Box.createRigidArea(new Dimension JavaDoc(0, 5)));
225         listPane.add(listScroller);
226         listPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
227
228         //Lay out the buttons from left to right.
229
JPanel JavaDoc buttonPane = new JPanel JavaDoc();
230         // 508 for this panel
231
buttonPane.getAccessibleContext().setAccessibleName(panelName);
232         buttonPane.getAccessibleContext().setAccessibleDescription(panelDesc);
233         buttonPane.setLayout(new BoxLayout JavaDoc(buttonPane, BoxLayout.X_AXIS));
234         buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
235         buttonPane.add(Box.createHorizontalGlue());
236         buttonPane.add(addButton);
237         buttonPane.add(Box.createRigidArea(new Dimension JavaDoc(10, 0)));
238         buttonPane.add(deleteButton);
239
240         //Put everything together, using the content pane's BorderLayout.
241
JPanel JavaDoc listPanel = new JPanel JavaDoc();
242         // 508 for this panel
243
listPanel.getAccessibleContext().setAccessibleName(panelName);
244         listPanel.getAccessibleContext().setAccessibleDescription(panelDesc);
245         listPanel.setLayout(new BorderLayout JavaDoc());
246         listPanel.add(listPane, BorderLayout.CENTER);
247         listPanel.add(buttonPane, BorderLayout.SOUTH);
248
249         // create the file chooser
250
final JFileChooser JavaDoc fileChooser = new JFileChooser JavaDoc();
251
252         // Add 508 compliance
253
fileChooser.getAccessibleContext().setAccessibleName(smh.getLocalString
254                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
255
".fcName", // NOI18N
256
"FileChooser")); // NOI18N
257
fileChooser.getAccessibleContext().setAccessibleDescription(smh.getLocalString
258                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
259
".fcDesc", // NOI18N
260
"This dialog box enables selection of files")); // NOI18N
261
fileChooser.setApproveButtonMnemonic('O');
262
263         fileChooser.setMultiSelectionEnabled(true);
264         fileChooser.addActionListener(new ActionListener JavaDoc() {
265             public void actionPerformed(ActionEvent JavaDoc e) {
266                 if (e.getActionCommand().equals("ApproveSelection")) { // NOI18N
267
File JavaDoc[] files = fileChooser.getSelectedFiles();
268                     for (int i = 0; i < files.length; i++) {
269                         if (!listModel.contains(files[i])) {//don't allow duplicates
270
listModel.addElement(files[i]);
271                         }
272                     }
273                     //select the last one selected for verification.
274
list.setSelectedIndex(listModel.getSize() - 1);
275                 }
276             }
277         });
278
279         // set up file chooser button listeners
280
addButton.addActionListener(new ActionListener JavaDoc() {
281             public void actionPerformed(ActionEvent JavaDoc e) {
282                 fileChooser.rescanCurrentDirectory();
283                 fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
284                 fileChooser.showOpenDialog(null);
285             }
286         });
287
288         deleteButton.addActionListener(new ActionListener JavaDoc() {
289             public void actionPerformed(ActionEvent JavaDoc e) {
290                 if (!list.isSelectionEmpty()) {
291                     Object JavaDoc[] selections = list.getSelectedValues();
292                     for (int i = 0; i < selections.length; i++) {
293                         listModel.removeElement(selections[i]);
294                     }
295                 } else {
296                     JOptionPane.showMessageDialog(parent,
297                             (smh.getLocalString
298                             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
299
".optionPane.deleteButtonNoFiles", // NOI18N
300
"You must first select file to delete.")) + // NOI18N
301
"\n" + // NOI18N
302
(smh.getLocalString
303                             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
304
".optionPane.deleteButtonNoFiles2", // NOI18N
305
"Then click on the Delete button, to delete " + // NOI18N
306
"file from list of files to be verified.")), // NOI18N
307
(smh.getLocalString
308                             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
309
".optionPane.deleteTitle", // NOI18N
310
"ERROR")), // NOI18N
311
JOptionPane.ERROR_MESSAGE);
312                 }
313             }
314         });
315
316         // set-up the radio buttons.
317
allButton.setMnemonic(KeyEvent.VK_L);
318         allButton.setActionCommand(allString);
319         allButton.setSelected(getReportLevel() == VerifierConstants.ALL);
320
321         failButton.setMnemonic(KeyEvent.VK_F);
322         failButton.setActionCommand(failString);
323         failButton.setSelected(getReportLevel() == VerifierConstants.FAIL);
324
325         warnButton.setMnemonic(KeyEvent.VK_W);
326         warnButton.setActionCommand(warnString);
327         warnButton.setSelected(getReportLevel() == VerifierConstants.WARN);
328
329         // Group the radio buttons.
330
ButtonGroup JavaDoc group = new ButtonGroup JavaDoc();
331         group.add(allButton);
332         group.add(failButton);
333         group.add(warnButton);
334
335
336         // Put the radio buttons in a column in a panel
337
JPanel JavaDoc radioPanel = new JPanel JavaDoc();
338         // 508 for this panel
339
radioPanel.getAccessibleContext().setAccessibleName(panelName);
340         radioPanel.getAccessibleContext().setAccessibleDescription(panelDesc);
341         radioPanel.setLayout(new BoxLayout JavaDoc(radioPanel, BoxLayout.Y_AXIS));
342         JLabel JavaDoc d = new JLabel JavaDoc((smh.getLocalString
343                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
344
".RadioButtonLabel", // NOI18N
345
"Display:"))); // NOI18N
346
d.setVerticalAlignment(SwingConstants.BOTTOM);
347         // 508 compliance for the JLabel
348
d.getAccessibleContext().setAccessibleName(smh.getLocalString
349                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
350
".labelName", // NOI18N
351
"Label")); // NOI18N
352
d.getAccessibleContext().setAccessibleDescription(smh.getLocalString
353                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
354
".labelDesc", // NOI18N
355
"This is a label")); // NOI18N
356
radioPanel.add(d);
357         radioPanel.add(allButton);
358         radioPanel.add(failButton);
359         radioPanel.add(warnButton);
360
361         // create the control buttons
362
okButton =
363                 new JButton JavaDoc((smh.getLocalString
364                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
365
".OKButton", // NOI18N
366
"OK"))); // NOI18N
367
closeButton =
368                 new JButton JavaDoc((smh.getLocalString
369                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
370
".CloseButton", // NOI18N
371
"Close"))); // NOI18N
372
helpButton =
373                 new JButton JavaDoc((smh.getLocalString
374                 ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
375
".HelpButton", // NOI18N
376
"Help"))); // NOI18N
377

378         // 508 compliance for the above buttons
379
okButton.getAccessibleContext().setAccessibleName(buttonName);
380         okButton.getAccessibleContext().setAccessibleDescription(buttonDesc);
381         okButton.setMnemonic('O');
382         closeButton.getAccessibleContext().setAccessibleName(buttonName);
383         closeButton.getAccessibleContext().setAccessibleDescription(buttonDesc);
384         closeButton.setMnemonic('C');
385         helpButton.getAccessibleContext().setAccessibleName(buttonName);
386         helpButton.getAccessibleContext().setAccessibleDescription(buttonDesc);
387         helpButton.setMnemonic('H');
388
389
390         boolean mainHelpSetWoes = false;
391         boolean usingDeployTool = false;
392
393         if (!usingDeployTool) {
394             // Create the main HelpBroker
395
try {
396                 ClassLoader JavaDoc cl = ControlPanel.class.getClassLoader();
397                 URL JavaDoc url = HelpSet.findHelpSet(cl, helpsetName);
398                 mainHS = new HelpSet(cl, url);
399             } catch (Exception JavaDoc ee) {
400                 logger.log(Level.WARNING,
401                         "com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
402
".debug.helpSetMissing", // NOI18N
403
new Object JavaDoc[]{helpsetName});
404                 JOptionPane.showMessageDialog(this,
405                         (smh.getLocalString
406                         ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
407
".optionPane.helpSetMissing1", // NOI18N
408
"Could not find Help Set for {0}.", // NOI18N
409
new Object JavaDoc[]{helpsetName})) +
410                         "\n" + // NOI18N
411
(smh.getLocalString
412                         ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
413
".optionPane.helpSetMissing2", // NOI18N
414
"Please consult your host administrator. " + // NOI18N
415
"Starting Verifier with JavaHelp disabled."))); // NOI18N
416
mainHelpSetWoes = true;
417             } catch (ExceptionInInitializerError JavaDoc ex) {
418                 logger.log(Level.WARNING,
419                         "com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
420
".debug.ExceptionInInitializerError"); // NOI18N
421
JOptionPane.showMessageDialog(this,
422                         (smh.getLocalString
423                         ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
424
".optionPane.helpSetMissing1", // NOI18N
425
"Could not find Help Set for {0}.", // NOI18N
426
new Object JavaDoc[]{helpsetName})) +
427                         "\n" + // NOI18N
428
(smh.getLocalString
429                         ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
430
".optionPane.helpSetMissing2", // NOI18N
431
"Please consult your host administrator. " + // NOI18N
432
"Starting Verifier with JavaHelp disabled."))); // NOI18N
433
mainHelpSetWoes = true;
434             }
435
436             if (!mainHelpSetWoes) {
437                 mainHB = mainHS.createHelpBroker();
438                 setMainHelpBroker(mainHB);
439
440                 // hook this into "top" equivalent for verifier
441
mainHB.enableHelpKey(this, "Verifier", null); // NOI18N
442

443                 CSH.setHelpIDString(helpButton, "Verifier"); // NOI18N
444

445                 // set up help button listener
446
helpButton.addActionListener(new CSH.DisplayHelpFromSource(mainHB));
447             } else {
448                 // grey out help button since there was woes...
449
helpButton.setEnabled(false);
450             }
451         } else {
452             // using deploytool, turn off javahelp button.
453
helpButton.addActionListener(new ActionListener JavaDoc() {
454                 public void actionPerformed(ActionEvent JavaDoc e) {
455                     JOptionPane.showMessageDialog(parent,
456                             (smh.getLocalString
457                             ("com.sun.enterprise.tools.verifier.gui.ControlPanel" + // NOI18N
458
".optionPane.helpDisabled", // NOI18N
459
"Verifier online help disabled."))); // NOI18N
460
}
461             });
462         }
463
464
465         // put the control buttons on a panel
466
JPanel JavaDoc buttonPanel = new JPanel JavaDoc();
467         // 508 for this panel
468
buttonPanel.getAccessibleContext().setAccessibleName(panelName);
469         buttonPanel.getAccessibleContext().setAccessibleDescription(panelDesc);
470         GridLayout JavaDoc gl = new GridLayout JavaDoc(0, 1);
471         gl.setVgap(10);
472         gl.setHgap(5);
473         buttonPanel.setLayout(gl);
474         buttonPanel.add(okButton);
475         buttonPanel.add(closeButton);
476         buttonPanel.add(helpButton);
477         buttonPanel.add(new JLabel JavaDoc(""));
478
479         // Add the controls to the Panel
480
add(listPanel);
481         add(radioPanel);
482         add(buttonPanel);
483
484         // Register a listener for the report level radio buttons.
485
RadioListener myListener = new RadioListener();
486         addRadioButtonListener((ActionListener JavaDoc) myListener);
487     }
488
489     public static void setMainHelpBroker(HelpBroker hb) {
490         mainHB = hb;
491         Thread JavaDoc t = new Thread JavaDoc() {
492             public void run() {
493                 if (mainHB != null) {
494                     mainHB.initPresentation();//reduce help first time startup
495
}
496             }
497         };
498         t.setPriority(Thread.MIN_PRIORITY);
499         t.start();
500     }
501
502     private static void setReportLevel(int rl) {
503         reportLevel = rl;
504     }
505
506     static int getReportLevel() {
507         return reportLevel;
508     }
509
510     class RadioListener implements ActionListener JavaDoc {
511         public void actionPerformed(ActionEvent JavaDoc e) {
512             if (e.getSource() == allButton) {
513                 setReportLevel(VerifierConstants.ALL);
514             }
515             if (e.getSource() == failButton) {
516                 setReportLevel(VerifierConstants.FAIL);
517             }
518             if (e.getSource() == warnButton) {
519                 setReportLevel(VerifierConstants.WARN);
520             }
521         }
522     }
523
524     // add a listener to the three radio buttons
525
public static void addRadioButtonListener(ActionListener JavaDoc r) {
526         allButton.addActionListener(r);
527         failButton.addActionListener(r);
528         warnButton.addActionListener(r);
529     }
530
531     // add a Jar file to the items to verify list
532
public void addJarFile(File JavaDoc jarFile) {
533         listModel.addElement(jarFile);
534     }
535
536     // remove all Jar files from the items to verify list
537
public void removeAllJarFiles() {
538         listModel.clear();
539     }
540 }
541
542
Popular Tags