KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > FileTypes


1 /*
2  * Copyright (C) 2004 Sun Microsystems, Inc. All rights reserved. Use is
3  * subject to license terms.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the Lesser GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  */

20
21 import javax.swing.*;
22 import java.awt.*;
23 import java.awt.event.*;
24 import javax.swing.border.*;
25 import java.util.Iterator JavaDoc;
26
27 import org.jdesktop.jdic.filetypes.Action;
28 import org.jdesktop.jdic.filetypes.Association;
29 import org.jdesktop.jdic.filetypes.AssociationService;
30 import org.jdesktop.jdic.filetypes.AssociationAlreadyRegisteredException;
31 import org.jdesktop.jdic.filetypes.AssociationNotRegisteredException;
32 import org.jdesktop.jdic.filetypes.RegisterFailedException;
33
34
35 /**
36  * JDIC API demo main class.
37  * <p>
38  * The <code>FileTypes</code> class creates a dialog to retrieve/register/unregister
39  * file type associations in user level or system level.
40  */

41
42 public class FileTypes extends JDialog {
43     final static int SELECT_REGISTER_SYSTEM = 1;
44     final static int SELECT_REGISTER_USER = 2;
45     final static int SELECT_UNREGISTER_SYSTEM = 3;
46     final static int SELECT_UNREGISTER_USER = 4;
47     final static int SELECT_GET_EXT = 5;
48     final static int SELECT_GET_MIME = 6;
49     final static int SELECT_NONE = 0;
50     int selectOption = SELECT_NONE;
51
52     ButtonGroup buttonOperationGroup = new ButtonGroup();
53     DefaultListModel actionsListModel = new DefaultListModel();
54     JPanel jAssociationContentPanel = new JPanel();
55     JPanel jAssociationButtonPanel = new JPanel();
56     JPanel jFieldsPanel = new JPanel();
57     JPanel jOptionsPanel = new JPanel();
58     JPanel jNoActionsFieldPanel = new JPanel();
59     JPanel jActionsFieldPanel = new JPanel();
60     JPanel jNewActionPanel = new JPanel();
61
62     JLabel jDescriptionLabel = new JLabel();
63     JLabel jNameLabel = new JLabel();
64     JLabel jMimeTypeLabel = new JLabel();
65     JLabel jFileExtensionListLabel = new JLabel();
66     JLabel jIconFileLabel = new JLabel();
67
68     JTextField jDescriptionTextField = new JTextField();
69     JTextField jNameTextField = new JTextField();
70     JTextField jMimeTypeTextField = new JTextField();
71     JTextField jFileExtensionListTextField = new JTextField();
72     JTextField jIconFileTextField = new JTextField();
73
74     JLabel jActionsLabel = new JLabel();
75     JTextField jNewActionTextField = new JTextField();
76     JButton jAddNewActionButton = new JButton();
77     JList jActionsList = new JList(actionsListModel);
78
79     JRadioButton jRadioButtonUnregisterUser = new JRadioButton();
80     JRadioButton jRadioButtonRegisterUser = new JRadioButton();
81     JRadioButton jRadioButtonRegisterSys = new JRadioButton();
82     JRadioButton jRadioButtonUnregisterSys = new JRadioButton();
83
84     JButton jCancelButton = new JButton();
85     JButton jApplyButton = new JButton();
86
87     TitledBorder titledBorderOptions;
88     TitledBorder titledBorderFields;
89
90     JPanel jPanelGetByExt = new JPanel();
91     JRadioButton jRadioButtonGetExt = new JRadioButton();
92     JTextField jTextFieldGetExt = new JTextField();
93     JPanel jPanelGetByMime = new JPanel();
94     JRadioButton jRadioButtonGetMime = new JRadioButton();
95     JTextField jTextFieldGetMime = new JTextField();
96     JPanel jPanelGetExt = new JPanel();
97     JPanel jPanelGetMime = new JPanel();
98
99     public FileTypes() throws HeadlessException {
100         try {
101             jbInit();
102         } catch (Exception JavaDoc e) {
103             e.printStackTrace();
104         }
105     }
106
107     public static void main(String JavaDoc[] args) throws HeadlessException {
108         try {
109             UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
110         } catch (Exception JavaDoc e) {}
111
112         FileTypes FileTypes = new FileTypes();
113
114         FileTypes.addWindowListener(new WindowAdapter() {
115             public void windowClosing(WindowEvent e) {
116                 System.exit(0);
117             }
118         });
119
120         FileTypes.setVisible(true);
121     }
122
123     private void jbInit() throws Exception JavaDoc {
124         this.setResizable(false);
125         this.setTitle("JDIC API Demo - File Associations");
126         this.setSize(800, 600);
127
128         // Center the dialog.
129
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
130         Dimension dlgSize = this.getSize();
131
132         if (dlgSize.height > screenSize.height) {
133             dlgSize.height = screenSize.height;
134         }
135         if (dlgSize.width > screenSize.width) {
136             dlgSize.width = screenSize.width;
137         }
138         this.setLocation((screenSize.width - dlgSize.width) / 2,
139                 (screenSize.height - dlgSize.height) / 2);
140
141         this.getContentPane().setLayout(new BorderLayout());
142         titledBorderOptions = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,
143                 new Color(148, 145, 140)),
144                 "Association Operations:");
145         titledBorderFields = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,
146                 new Color(148, 145, 140)),
147                 "Association Fields:");
148
149         jOptionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
150         jOptionsPanel.setLayout(new GridLayout(10, 1));
151         jOptionsPanel.setBorder(titledBorderOptions);
152         jRadioButtonRegisterSys.setText("Register System-level Association");
153         jRadioButtonRegisterUser.setText("Register User-level Association");
154         jRadioButtonUnregisterSys.setText("Unregister System-level Association");
155         jRadioButtonUnregisterUser.setText("Unregister User-level Association");
156         jDescriptionLabel.setText("Description:");
157         jNameLabel.setText("MIME File Name:");
158         jFileExtensionListLabel.setText("File Extension List:");
159         jMimeTypeLabel.setText("Mime Type:");
160         jIconFileLabel.setText("Icon File:");
161         jNoActionsFieldPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
162         jNoActionsFieldPanel.setLayout(new GridLayout(10, 1));
163         jRadioButtonGetExt.setText("Get Association by File Extension");
164         jRadioButtonGetExt.addItemListener(new FileTypes_jRadioButtonGetExt_itemAdapter(this));
165         jTextFieldGetExt.setPreferredSize(new Dimension(40, 22));
166         jTextFieldGetExt.setText("");
167         jTextFieldGetExt.setEnabled(false);
168         jTextFieldGetExt.setHorizontalAlignment(SwingConstants.LEADING);
169         jRadioButtonGetMime.setText("Get Association by Mime Type");
170         jRadioButtonGetMime.addItemListener(new FileTypes_jRadioButtonGetMime_itemAdapter(this));
171         jTextFieldGetMime.setText("");
172         jTextFieldGetMime.setEnabled(false);
173         jNoActionsFieldPanel.add(jDescriptionLabel, null);
174         jNoActionsFieldPanel.add(jDescriptionTextField, null);
175         jNoActionsFieldPanel.add(jNameLabel, null);
176         jNoActionsFieldPanel.add(jNameTextField, null);
177         jNoActionsFieldPanel.add(jMimeTypeLabel, null);
178         jNoActionsFieldPanel.add(jMimeTypeTextField, null);
179         jNoActionsFieldPanel.add(jFileExtensionListLabel, null);
180         jNoActionsFieldPanel.add(jFileExtensionListTextField, null);
181         jNoActionsFieldPanel.add(jIconFileLabel, null);
182         jNoActionsFieldPanel.add(jIconFileTextField, null);
183
184         jActionsLabel.setText("Actions:");
185         jAddNewActionButton.setText("Add");
186         jAddNewActionButton.addActionListener(
187             new FileTypes_jAddNewActionButton_actionAdapter(this));
188         jNewActionPanel.setLayout(new BorderLayout());
189         jNewActionTextField.setText("");
190         jNewActionPanel.add(jNewActionTextField, BorderLayout.CENTER);
191         jNewActionPanel.add(jAddNewActionButton, BorderLayout.EAST);
192         jActionsFieldPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
193         jActionsFieldPanel.setLayout(new BorderLayout());
194         jActionsFieldPanel.add(jActionsLabel, BorderLayout.NORTH);
195         jActionsFieldPanel.add(jNewActionPanel, BorderLayout.CENTER);
196         jActionsFieldPanel.add(new JScrollPane(jActionsList), BorderLayout.SOUTH);
197
198         jFieldsPanel.setBorder(titledBorderFields);
199         jFieldsPanel.setLayout(new BorderLayout());
200         jFieldsPanel.add(jNoActionsFieldPanel, BorderLayout.CENTER);
201         jFieldsPanel.add(jActionsFieldPanel, BorderLayout.SOUTH);
202         jRadioButtonRegisterSys.addActionListener(
203             new FileTypes_jRadioButtonRegisterSys_actionAdapter(this));
204         jRadioButtonRegisterUser.addActionListener(
205             new FileTypes_jRadioButtonRegisterUser_actionAdapter(this));
206         jRadioButtonUnregisterSys.addActionListener(
207             new FileTypes_jRadioButtonUnregisterSys_actionAdapter(this));
208         jRadioButtonUnregisterUser.addActionListener(
209             new FileTypes_jRadioButtonUnregisterUser_actionAdapter(this));
210         buttonOperationGroup.add(jRadioButtonUnregisterUser);
211         buttonOperationGroup.add(jRadioButtonUnregisterSys);
212         buttonOperationGroup.add(jRadioButtonRegisterUser);
213         buttonOperationGroup.add(jRadioButtonRegisterSys);
214
215         jOptionsPanel.add(jRadioButtonRegisterSys, null);
216         jOptionsPanel.add(jRadioButtonRegisterUser, null);
217         jOptionsPanel.add(jRadioButtonUnregisterSys, null);
218         jOptionsPanel.add(jRadioButtonUnregisterUser, null);
219         jOptionsPanel.add(jPanelGetByExt, null);
220         jOptionsPanel.add(jPanelGetByMime, null);
221         jPanelGetByExt.setLayout(new BorderLayout());
222         jPanelGetByExt.add(jRadioButtonGetExt, BorderLayout.NORTH);
223         jPanelGetByExt.add(jPanelGetExt, BorderLayout.CENTER);
224         jPanelGetExt.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
225         jPanelGetExt.setLayout(new BorderLayout());
226         jPanelGetExt.add(jTextFieldGetExt, BorderLayout.CENTER);
227
228         jPanelGetByMime.setLayout(new BorderLayout());
229         jPanelGetByMime.add(jRadioButtonGetMime, BorderLayout.NORTH);
230         jPanelGetByMime.add(jPanelGetMime, BorderLayout.CENTER);
231         jPanelGetMime.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
232         jPanelGetMime.setLayout(new BorderLayout());
233         jPanelGetMime.add(jTextFieldGetMime, BorderLayout.CENTER);
234
235         jAssociationContentPanel.setBorder(BorderFactory.createEmptyBorder(5, 5,
236             0, 5));
237         jAssociationContentPanel.setLayout(new BorderLayout());
238         jAssociationContentPanel.add(jOptionsPanel, BorderLayout.WEST);
239         jAssociationContentPanel.add(jFieldsPanel, BorderLayout.CENTER);
240
241         jCancelButton.setText("Cancel");
242         jCancelButton.addActionListener(new FileTypes_jCancelButton_actionAdapter(this));
243         jApplyButton.setText("Apply");
244         jApplyButton.addActionListener(new FileTypes_jApplyButton_actionAdapter(this));
245         jAssociationButtonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5,
246             5, 5));
247         jAssociationButtonPanel.add(jApplyButton, null);
248         jAssociationButtonPanel.add(jCancelButton, null);
249
250         this.getContentPane().add(jAssociationContentPanel, BorderLayout.CENTER);
251         this.getContentPane().add(jAssociationButtonPanel, BorderLayout.SOUTH);
252
253         buttonOperationGroup.add(jRadioButtonGetExt);
254         buttonOperationGroup.add(jRadioButtonGetMime);
255     }
256
257     /**
258      * Get the association fields specified by the user in the right panel.
259      * And fill into the constructed Association object.
260      */

261     private Association getAssociationFields() {
262         Association assoc = new Association();
263
264         String JavaDoc description = jDescriptionTextField.getText();
265         if ((description != null) && (description.length() != 0)) {
266             assoc.setDescription(description);
267         }
268
269         String JavaDoc name = jNameTextField.getText();
270         if ((name != null) && (name.length() != 0)) {
271             assoc.setName(name);
272         }
273
274         String JavaDoc mimeType = jMimeTypeTextField.getText();
275         if ((mimeType != null) && (mimeType.length() != 0)) {
276             assoc.setMimeType(mimeType);
277         }
278
279         String JavaDoc fileExtensionListString = jFileExtensionListTextField.getText().trim();
280         if ((fileExtensionListString != null)
281                 && (fileExtensionListString.length() != 0)) {
282             String JavaDoc leftExtString = fileExtensionListString;
283             int startIndex = 0;
284             int nextSpacePos = fileExtensionListString.indexOf(' ');
285
286             while (nextSpacePos != -1) {
287                 String JavaDoc oneExt = leftExtString.substring(startIndex, nextSpacePos);
288
289                 assoc.addFileExtension(oneExt);
290
291                 String JavaDoc tempString = leftExtString.substring(nextSpacePos,
292                         leftExtString.length());
293
294                 leftExtString = tempString.trim();
295                 nextSpacePos = leftExtString.indexOf(' ');
296             }
297
298             if ((leftExtString != null) && (leftExtString.length()) != 0) {
299                 // one last file extension.
300
assoc.addFileExtension(leftExtString);
301             }
302         }
303
304         String JavaDoc iconFile = jIconFileTextField.getText();
305         if ((iconFile != null) && (iconFile.length() != 0)) {
306             assoc.setIconFileName(iconFile);
307         }
308
309         int actionNum = actionsListModel.getSize();
310         if (actionNum != 0) {
311             for (int i = 0; i < actionNum; i++) {
312                 String JavaDoc oneActionString = (String JavaDoc) actionsListModel.getElementAt(i);
313                 int firstSpacePos = oneActionString.indexOf(' ');
314                 String JavaDoc verb = oneActionString.substring(0, firstSpacePos);
315                 String JavaDoc leftStr = oneActionString.substring(firstSpacePos,
316                         oneActionString.length());
317                 String JavaDoc command = leftStr.trim();
318                 Action oneAction = new Action(verb, command);
319
320                 assoc.addAction(oneAction);
321             }
322         }
323
324         return assoc;
325     }
326
327     /**
328      * Put the given association into the association fields in the right panel.
329      */

330     private void putAssociationFields(Association assoc) {
331         jDescriptionTextField.setText(assoc.getDescription());
332
333         jNameTextField.setText(assoc.getName());
334
335         jMimeTypeTextField.setText(assoc.getMimeType());
336
337         if (assoc.getFileExtList() == null) {
338             jFileExtensionListTextField.setText(null);
339         } else {
340             Iterator JavaDoc extentionIter = assoc.getFileExtList().iterator();
341             String JavaDoc fileExtensionListString = (String JavaDoc) extentionIter.next();
342
343             while (extentionIter.hasNext()) {
344                 fileExtensionListString += ' ' + (String JavaDoc) extentionIter.next();
345             }
346             jFileExtensionListTextField.setText(fileExtensionListString);
347
348         }
349
350         jIconFileTextField.setText(assoc.getIconFileName());
351
352         // Clear the old action list first before adding new actions.
353
actionsListModel.removeAllElements();
354         if (assoc.getActionList() != null) {
355             Iterator JavaDoc actionIter = assoc.getActionList().iterator();
356
357             while (actionIter.hasNext()) {
358                 Action oneAction = (Action) actionIter.next();
359                 String JavaDoc oneVerb = oneAction.getVerb();
360                 String JavaDoc oneCommand = oneAction.getCommand();
361
362                 String JavaDoc oneActionString = oneVerb + ' ' + oneCommand;
363
364                 actionsListModel.addElement(oneActionString);
365             }
366         }
367     }
368
369     void jAddNewActionButton_actionPerformed(ActionEvent e) {
370         String JavaDoc newActionString = jNewActionTextField.getText();
371
372         if ((newActionString != null) && (newActionString.length() != 0)
373                 && (newActionString.indexOf(' ') != -1)) {
374             int firstSpacePos = newActionString.indexOf(' ');
375             String JavaDoc verb = newActionString.substring(0, firstSpacePos);
376             String JavaDoc command = newActionString.substring(firstSpacePos, newActionString.length()).trim();
377
378             actionsListModel.insertElementAt (verb + ' ' + command, 0);
379         } else {
380             JOptionPane.showMessageDialog(this,
381                     "A valid action string should be like: open C:\\temp\\notepad.exe.",
382                     "Warning", JOptionPane.WARNING_MESSAGE);
383         }
384     }
385
386     void jApplyButton_actionPerformed(ActionEvent e) {
387         if (selectOption == SELECT_NONE) {
388             JOptionPane.showMessageDialog(this,
389                     "Please select an association operation in the left panel.",
390                     "Warning", JOptionPane.WARNING_MESSAGE);
391         } else {
392             AssociationService assocService = new AssociationService();
393
394             try {
395                 switch (selectOption) {
396                     case SELECT_REGISTER_SYSTEM: {
397                             // Get specified association fields, and fill in the constructed Association object.
398
Association assoc = getAssociationFields();
399                             assocService.registerSystemAssociation(assoc);
400                         }
401                         break;
402     
403                     case SELECT_REGISTER_USER: {
404                             Association assoc = getAssociationFields();
405                             assocService.registerUserAssociation(assoc);
406                         }
407                         break;
408     
409                     case SELECT_UNREGISTER_SYSTEM: {
410                             Association assoc = getAssociationFields();
411                             assocService.unregisterSystemAssociation(assoc);
412                         }
413                         break;
414     
415                     case SELECT_UNREGISTER_USER: {
416                             Association assoc = getAssociationFields();
417                             assocService.unregisterUserAssociation(assoc);
418                         }
419                         break;
420     
421                     case SELECT_GET_EXT: {
422                             String JavaDoc inputFileExt = jTextFieldGetExt.getText();
423                             Association assoc = null;
424                             if ((inputFileExt != null) && (inputFileExt.length() != 0)) {
425                                 assoc = assocService.getFileExtensionAssociation(inputFileExt);
426                             }
427     
428                             if (assoc == null) {
429                                 JOptionPane.showMessageDialog(this,
430                                         "No association with the given file extension: "
431                                         + inputFileExt,
432                                         "Warning",
433                                         JOptionPane.WARNING_MESSAGE);
434                             } else {
435                                 putAssociationFields(assoc);
436                             }
437                         }
438                         break;
439     
440                     case SELECT_GET_MIME: {
441                             String JavaDoc inputMimeType = jTextFieldGetMime.getText();
442                             Association assoc = null;
443                             if ((inputMimeType != null) && (inputMimeType.length() != 0)) {
444                                 assoc = assocService.getMimeTypeAssociation(inputMimeType);
445                             }
446     
447                             if (assoc == null) {
448                                 JOptionPane.showMessageDialog(this,
449                                         "No association with the given MIME type: "
450                                         + inputMimeType,
451                                         "Warning",
452                                         JOptionPane.WARNING_MESSAGE);
453                             } else {
454                                 putAssociationFields(assoc);
455                             }
456                         }
457                         break;
458     
459                     default: {
460                             // The switch should never come here.
461
JOptionPane.showMessageDialog(this,
462                                     "Demo bug: the demo should NEVER get here.",
463                                     "Error", JOptionPane.ERROR_MESSAGE);
464                         }
465                         break;
466                 } // end of switch
467
} catch (AssociationAlreadyRegisteredException arException) {
468                 JOptionPane.showMessageDialog(this,
469                     arException.toString(), "Exception", JOptionPane.ERROR_MESSAGE);
470             } catch (AssociationNotRegisteredException nrException) {
471                 JOptionPane.showMessageDialog(this,
472                     nrException.toString(), "Exception", JOptionPane.ERROR_MESSAGE);
473             } catch (RegisterFailedException rfException) {
474                 JOptionPane.showMessageDialog(this,
475                     rfException.toString(), "Exception", JOptionPane.ERROR_MESSAGE);
476             }
477         }
478     }
479
480     void jCancelButton_actionPerformed(ActionEvent e) {
481         System.exit(0);
482     }
483
484     void jRadioButtonRegisterSys_actionPerformed(ActionEvent e) {
485         selectOption = SELECT_REGISTER_SYSTEM;
486     }
487
488     void jRadioButtonRegisterUser_actionPerformed(ActionEvent e) {
489         selectOption = SELECT_REGISTER_USER;
490     }
491
492     void jRadioButtonUnregisterSys_actionPerformed(ActionEvent e) {
493         selectOption = SELECT_UNREGISTER_SYSTEM;
494     }
495
496     void jRadioButtonUnregisterUser_actionPerformed(ActionEvent e) {
497         selectOption = SELECT_UNREGISTER_USER;
498     }
499
500     void jRadioButtonGetExt_itemStateChanged(ItemEvent e) {
501         if (jRadioButtonGetExt.isSelected()) {
502             selectOption = SELECT_GET_EXT;
503             jTextFieldGetExt.setEnabled(true);
504         } else {
505             jTextFieldGetExt.setEnabled(false);
506         }
507     }
508
509     void jRadioButtonGetMime_itemStateChanged(ItemEvent e) {
510         if (jRadioButtonGetMime.isSelected()) {
511             selectOption = SELECT_GET_MIME;
512             jTextFieldGetMime.setEnabled(true);
513         } else {
514             jTextFieldGetMime.setEnabled(false);
515         }
516     }
517 }
518
519
520 class FileTypes_jAddNewActionButton_actionAdapter implements java.awt.event.ActionListener JavaDoc {
521     FileTypes adaptee;
522
523     FileTypes_jAddNewActionButton_actionAdapter(FileTypes adaptee) {
524         this.adaptee = adaptee;
525     }
526
527     public void actionPerformed(ActionEvent e) {
528         adaptee.jAddNewActionButton_actionPerformed(e);
529     }
530 }
531
532
533 class FileTypes_jApplyButton_actionAdapter implements java.awt.event.ActionListener JavaDoc {
534     FileTypes adaptee;
535
536     FileTypes_jApplyButton_actionAdapter(FileTypes adaptee) {
537         this.adaptee = adaptee;
538     }
539
540     public void actionPerformed(ActionEvent e) {
541         adaptee.jApplyButton_actionPerformed(e);
542     }
543 }
544
545
546 class FileTypes_jCancelButton_actionAdapter implements java.awt.event.ActionListener JavaDoc {
547     FileTypes adaptee;
548
549     FileTypes_jCancelButton_actionAdapter(FileTypes adaptee) {
550         this.adaptee = adaptee;
551     }
552
553     public void actionPerformed(ActionEvent e) {
554         adaptee.jCancelButton_actionPerformed(e);
555     }
556 }
557
558
559 class FileTypes_jRadioButtonRegisterSys_actionAdapter
560     implements java.awt.event.ActionListener JavaDoc {
561     FileTypes adaptee;
562
563     FileTypes_jRadioButtonRegisterSys_actionAdapter(FileTypes adaptee) {
564         this.adaptee = adaptee;
565     }
566
567     public void actionPerformed(ActionEvent e) {
568         adaptee.jRadioButtonRegisterSys_actionPerformed(e);
569     }
570 }
571
572
573 class FileTypes_jRadioButtonRegisterUser_actionAdapter
574     implements java.awt.event.ActionListener JavaDoc {
575     FileTypes adaptee;
576
577     FileTypes_jRadioButtonRegisterUser_actionAdapter(FileTypes adaptee) {
578         this.adaptee = adaptee;
579     }
580
581     public void actionPerformed(ActionEvent e) {
582         adaptee.jRadioButtonRegisterUser_actionPerformed(e);
583     }
584 }
585
586
587 class FileTypes_jRadioButtonUnregisterSys_actionAdapter
588     implements java.awt.event.ActionListener JavaDoc {
589     FileTypes adaptee;
590
591     FileTypes_jRadioButtonUnregisterSys_actionAdapter(FileTypes adaptee) {
592         this.adaptee = adaptee;
593     }
594
595     public void actionPerformed(ActionEvent e) {
596         adaptee.jRadioButtonUnregisterSys_actionPerformed(e);
597     }
598 }
599
600
601 class FileTypes_jRadioButtonUnregisterUser_actionAdapter
602     implements java.awt.event.ActionListener JavaDoc {
603     FileTypes adaptee;
604
605     FileTypes_jRadioButtonUnregisterUser_actionAdapter(FileTypes adaptee) {
606         this.adaptee = adaptee;
607     }
608
609     public void actionPerformed(ActionEvent e) {
610         adaptee.jRadioButtonUnregisterUser_actionPerformed(e);
611     }
612 }
613
614
615 class FileTypes_jRadioButtonGetExt_itemAdapter implements java.awt.event.ItemListener JavaDoc {
616     FileTypes adaptee;
617
618     FileTypes_jRadioButtonGetExt_itemAdapter(FileTypes adaptee) {
619         this.adaptee = adaptee;
620     }
621
622     public void itemStateChanged(ItemEvent e) {
623         adaptee.jRadioButtonGetExt_itemStateChanged(e);
624     }
625 }
626
627
628 class FileTypes_jRadioButtonGetMime_itemAdapter implements java.awt.event.ItemListener JavaDoc {
629     FileTypes adaptee;
630
631     FileTypes_jRadioButtonGetMime_itemAdapter(FileTypes adaptee) {
632         this.adaptee = adaptee;
633     }
634
635     public void itemStateChanged(ItemEvent e) {
636         adaptee.jRadioButtonGetMime_itemStateChanged(e);
637     }
638 }
639
Popular Tags