View Javadoc

1   /***
2   *
3   * The owl-s matcher software is subject to the GNU Lesser General
4   * Public License Version 2.1 (the "License"). You may not copy or use this
5   * file, in either source code or executable form, except in compliance
6   * with the License. You may obtain a copy of the License at
7   * http://www.fsf.org/licenses/lgpl.txt or http://www.opensource.org/.
8   *
9   * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied without
11  * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  * PURPOSE. See the License for the specific language governing rights and
13  * limitations under the License.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this distribution; if not, write to the
17  *
18  * Free Software Foundation, Inc.,
19  * 59 Temple Place, Suite 330,
20  * Boston, MA  02111-1307 USA
21  *
22  * Copyright (C) 2003-2004
23  * TU Berlin, FG IVS
24  * Stefan Tang,
25  * Christoph Liebetruth,
26  * Michael C. Jaeger, 
27  *
28  * More information available at http://ivs.tu-berlin.de/
29  *
30  * $Id$
31  *
32  */
33  package de.tuberlin.ivs.owl.gui;
34  
35  import java.awt.*;
36  import javax.swing.*;
37  import de.tuberlin.ivs.owl.matching.*;
38  import java.awt.event.*;
39  
40  /***
41   * Dialog that displays the result of the matching.
42   *
43   * @author Stefan Tang (steftang@stanford.edu), Christoph Liebetruth (christophl@voelcker.com)
44   * @version 1.1
45   */
46  public class MatchingResultDialog extends JDialog {
47  
48    // --------------------------------------
49    // ------- AUTO-GENERATED FIELDS --------
50    // --------------------------------------
51    JPanel panel1 = new JPanel();
52    JPanel jPanel1 = new JPanel();
53    JPanel jPanel2 = new JPanel();
54    JPanel jPanel3 = new JPanel();
55    JButton okButton = new JButton();
56    JLabel finalResultLabel = new JLabel();
57    JPanel jPanel4 = new JPanel();
58    JPanel jPanel5 = new JPanel();
59    JLabel resultIcon = new JLabel();
60    BorderLayout borderLayout1 = new BorderLayout();
61    FlowLayout flowLayout1 = new FlowLayout();
62    JPanel jPanel6 = new JPanel();
63    JPanel jPanel7 = new JPanel();
64    JPanel jPanel8 = new JPanel();
65    JLabel jLabel3 = new JLabel();
66    BorderLayout borderLayout2 = new BorderLayout();
67    JPanel jPanel9 = new JPanel();
68    JPanel jPanel10 = new JPanel();
69    JPanel jPanel11 = new JPanel();
70    JLabel minDegreeProfileLabel = new JLabel();
71    GridLayout gridLayout1 = new GridLayout();
72    BorderLayout borderLayout3 = new BorderLayout();
73    ImageIcon image1;
74    JPanel jPanel12 = new JPanel();
75    JLabel profilePartialResultLabel = new JLabel();
76    BorderLayout borderLayout6 = new BorderLayout();
77    JPanel jPanel14 = new JPanel();
78    JLabel profileMatchResultLabel = new JLabel();
79    GridLayout gridLayout4 = new GridLayout();
80    BorderLayout borderLayout4 = new BorderLayout();
81    JPanel jPanel13 = new JPanel();
82    JPanel jPanel15 = new JPanel();
83    JPanel jPanel16 = new JPanel();
84    BorderLayout borderLayout7 = new BorderLayout();
85    JLabel jLabel7 = new JLabel();
86    JPanel jPanel17 = new JPanel();
87    JPanel jPanel18 = new JPanel();
88    JPanel jPanel19 = new JPanel();
89    GridLayout gridLayout5 = new GridLayout();
90    JLabel minDegreeInputLabel = new JLabel();
91    JLabel inputMatchResultLabel = new JLabel();
92    JPanel jPanel20 = new JPanel();
93    JButton inputInfoButton = new JButton();
94    JPanel jPanel21 = new JPanel();
95    JLabel inputPartialResultLabel = new JLabel();
96    BorderLayout borderLayout9 = new BorderLayout();
97    GridLayout gridLayout6 = new GridLayout();
98    JPanel jPanel22 = new JPanel();
99    BorderLayout borderLayout5 = new BorderLayout();
100   JPanel jPanel23 = new JPanel();
101   BorderLayout borderLayout8 = new BorderLayout();
102   BorderLayout borderLayout10 = new BorderLayout();
103   JPanel outputPanel = new JPanel();
104   JPanel jPanel25 = new JPanel();
105   JLabel jLabel11 = new JLabel();
106   BorderLayout borderLayout11 = new BorderLayout();
107   JPanel jPanel26 = new JPanel();
108   JPanel jPanel27 = new JPanel();
109   JPanel jPanel28 = new JPanel();
110   JPanel jPanel29 = new JPanel();
111   JLabel minDegreeOutputLabel = new JLabel();
112   JLabel outputMatchResultLabel = new JLabel();
113   JPanel jPanel30 = new JPanel();
114   JPanel jPanel31 = new JPanel();
115   JButton outputInfoButton = new JButton();
116   JLabel outputPartialResultLabel = new JLabel();
117   BorderLayout borderLayout12 = new BorderLayout();
118   GridLayout gridLayout11 = new GridLayout();
119   BorderLayout borderLayout13 = new BorderLayout();
120   GridLayout gridLayout12 = new GridLayout();
121   JPanel pluginPanel = new JPanel();
122   JPanel jPanel33 = new JPanel();
123   JLabel jLabel15 = new JLabel();
124   BorderLayout borderLayout14 = new BorderLayout();
125   JPanel jPanel34 = new JPanel();
126   JPanel jPanel35 = new JPanel();
127   JPanel jPanel36 = new JPanel();
128   JButton userInfoButton = new JButton();
129   JLabel plugInMatchResultLabel = new JLabel();
130   JPanel jPanel37 = new JPanel();
131   JLabel plugInPartialResultLabel = new JLabel();
132   JPanel jPanel38 = new JPanel();
133   BorderLayout borderLayout15 = new BorderLayout();
134   GridLayout gridLayout13 = new GridLayout();
135   JPanel jPanel39 = new JPanel();
136   GridLayout gridLayout14 = new GridLayout();
137   GridLayout gridLayout15 = new GridLayout();
138   BorderLayout borderLayout16 = new BorderLayout();
139   GridLayout gridLayout16 = new GridLayout();
140   ImageIcon matchIcon;
141   ImageIcon failIcon;
142   ExtendedMatchingResult result = null;
143   JLabel jLabel1 = new JLabel();
144   JLabel jLabel2 = new JLabel();
145   GridLayout gridLayout2 = new GridLayout();
146   GridLayout gridLayout3 = new GridLayout();
147   JLabel jLabel4 = new JLabel();
148   JLabel jLabel5 = new JLabel();
149   GridLayout gridLayout7 = new GridLayout();
150   GridLayout gridLayout8 = new GridLayout();
151   JLabel jLabel6 = new JLabel();
152   JLabel jLabel8 = new JLabel();
153   GridLayout gridLayout9 = new GridLayout();
154   GridLayout gridLayout10 = new GridLayout();
155   JLabel jLabel9 = new JLabel();
156 
157   /***
158    * The parent frame.
159    */
160   MainFrame mainFrame;
161 
162   /***
163    * Constructor. Initializes this dialog and displays the results.
164    * @param frame The parent frame.
165    * @param title The title of this dialog.
166    * @param modal true if the parent frame should be disabled when this dialog
167    * is displayed, false otherwise.
168    * @param result The extended result which contains the matching result.
169    * @param parent The main frame.
170    */
171   public MatchingResultDialog(Frame frame, String title, boolean modal, ExtendedMatchingResult result,MainFrame parent) {
172     super(frame, title, modal);
173     mainFrame = parent;
174     this.result = result;
175     try {
176       jbInit();
177       pack();
178     }
179     catch(Exception ex) {
180       ex.printStackTrace();
181     }
182     showResults();
183   }
184 
185   // Component initialization.
186   private void jbInit() throws Exception {
187     image1 = new ImageIcon(de.tuberlin.ivs.owl.gui.MainFrame.class.getResource("help.png"));
188     matchIcon = new ImageIcon(de.tuberlin.ivs.owl.gui.MainFrame.class.getResource("good.gif"));
189     failIcon = new ImageIcon(de.tuberlin.ivs.owl.gui.MainFrame.class.getResource("bad.gif"));
190     panel1.setLayout(borderLayout4);
191     jPanel1.setLayout(borderLayout1);
192     jPanel2.setLayout(gridLayout16);
193     jPanel3.setLayout(flowLayout1);
194     okButton.setText("OK");
195     okButton.addActionListener(new MatchingResultDialog_okButton_actionAdapter(this));
196     finalResultLabel.setFont(new java.awt.Font("Dialog", 3, 11));
197     finalResultLabel.setText("MATCH");
198     resultIcon.setIcon(matchIcon);
199     resultIcon.setText("");
200     jPanel6.setBorder(BorderFactory.createEtchedBorder());
201     jPanel6.setMaximumSize(new Dimension(32767, 32767));
202     jPanel6.setLayout(borderLayout3);
203     jPanel7.setBackground(Color.white);
204     jPanel7.setBorder(null);
205     jPanel7.setLayout(borderLayout2);
206     jPanel8.setLayout(gridLayout1);
207     jLabel3.setFont(new java.awt.Font("Dialog", 1, 11));
208     jLabel3.setHorizontalAlignment(SwingConstants.LEFT);
209     jLabel3.setText("Profile matching result");
210     jLabel3.setVerticalAlignment(SwingConstants.CENTER);
211     borderLayout2.setHgap(5);
212     borderLayout2.setVgap(5);
213     jPanel9.setBorder(null);
214     jPanel9.setDebugGraphicsOptions(0);
215     jPanel9.setLayout(gridLayout2);
216     jPanel10.setLayout(gridLayout3);
217     jPanel11.setLayout(borderLayout6);
218     minDegreeProfileLabel.setFont(new java.awt.Font("Dialog", 2, 11));
219     minDegreeProfileLabel.setHorizontalAlignment(SwingConstants.LEFT);
220     minDegreeProfileLabel.setText("FAIL");
221     minDegreeProfileLabel.setVerticalAlignment(SwingConstants.TOP);
222     profilePartialResultLabel.setText("Partial result: MATCH");
223     profilePartialResultLabel.setVerticalAlignment(SwingConstants.CENTER);
224     gridLayout1.setColumns(3);
225     jPanel12.setLayout(borderLayout5);
226     jPanel14.setLayout(gridLayout4);
227     profileMatchResultLabel.setFont(new java.awt.Font("Dialog", 2, 11));
228     profileMatchResultLabel.setText("FAIL");
229     profileMatchResultLabel.setVerticalAlignment(SwingConstants.TOP);
230     jPanel13.setBorder(BorderFactory.createEtchedBorder());
231     jPanel13.setLayout(borderLayout10);
232     jPanel15.setBackground(Color.white);
233     jPanel15.setLayout(borderLayout7);
234     jPanel16.setLayout(gridLayout5);
235     jLabel7.setFont(new java.awt.Font("Dialog", 1, 11));
236     jLabel7.setText("Input parameter matching result");
237     jPanel17.setLayout(gridLayout7);
238     jPanel18.setLayout(gridLayout8);
239     jPanel19.setLayout(borderLayout9);
240     minDegreeInputLabel.setFont(new java.awt.Font("Dialog", 2, 11));
241     minDegreeInputLabel.setText("FAIL");
242     minDegreeInputLabel.setVerticalAlignment(SwingConstants.TOP);
243     inputMatchResultLabel.setFont(new java.awt.Font("Dialog", 2, 11));
244     inputMatchResultLabel.setText("FAIL");
245     inputMatchResultLabel.setVerticalAlignment(SwingConstants.TOP);
246     jPanel20.setLayout(borderLayout8);
247     inputInfoButton.setMaximumSize(new Dimension(29, 27));
248     inputInfoButton.setMinimumSize(new Dimension(29, 27));
249     inputInfoButton.setPreferredSize(new Dimension(29, 27));
250     inputInfoButton.setToolTipText("View Details");
251     inputInfoButton.setBorderPainted(false);
252     inputInfoButton.setIcon(image1);
253     inputInfoButton.setText("");
254     inputInfoButton.addMouseListener(new MatchingResultDialog_inputInfoButton_mouseAdapter(this));
255     inputInfoButton.addActionListener(new MatchingResultDialog_inputInfoButton_actionAdapter(this));
256     inputPartialResultLabel.setToolTipText("");
257     inputPartialResultLabel.setText("Partial result: MATCH");
258     inputPartialResultLabel.setVerticalAlignment(SwingConstants.CENTER);
259     jPanel21.setLayout(gridLayout6);
260     jPanel8.setBorder(null);
261     jPanel14.setBorder(null);
262     jPanel22.setBorder(null);
263     jPanel21.setBorder(null);
264     jPanel23.setBorder(null);
265     jPanel16.setBorder(null);
266     outputPanel.setBorder(BorderFactory.createEtchedBorder());
267     outputPanel.setLayout(borderLayout13);
268     jPanel25.setBackground(Color.white);
269     jPanel25.setLayout(borderLayout11);
270     jLabel11.setFont(new java.awt.Font("Dialog", 1, 11));
271     jLabel11.setText("Output parameter matching result");
272     jPanel26.setLayout(gridLayout11);
273     jPanel27.setLayout(gridLayout9);
274     jPanel28.setLayout(gridLayout10);
275     jPanel29.setBorder(null);
276     jPanel29.setDebugGraphicsOptions(0);
277     jPanel29.setLayout(borderLayout12);
278     minDegreeOutputLabel.setFont(new java.awt.Font("Dialog", 2, 11));
279     minDegreeOutputLabel.setText("FAIL");
280     minDegreeOutputLabel.setVerticalAlignment(SwingConstants.TOP);
281     outputMatchResultLabel.setFont(new java.awt.Font("Dialog", 2, 11));
282     outputMatchResultLabel.setText("FAIL");
283     outputMatchResultLabel.setVerticalAlignment(SwingConstants.TOP);
284     outputInfoButton.setMaximumSize(new Dimension(29, 27));
285     outputInfoButton.setMinimumSize(new Dimension(29, 27));
286     outputInfoButton.setPreferredSize(new Dimension(29, 27));
287     outputInfoButton.setToolTipText("View Details");
288     outputInfoButton.setVerifyInputWhenFocusTarget(true);
289     outputInfoButton.setBorderPainted(false);
290     outputInfoButton.setIcon(image1);
291     outputInfoButton.setText("");
292     outputInfoButton.addMouseListener(new MatchingResultDialog_outputInfoButton_mouseAdapter(this));
293     outputInfoButton.addActionListener(new MatchingResultDialog_outputInfoButton_actionAdapter(this));
294     outputPartialResultLabel.setVerifyInputWhenFocusTarget(true);
295     outputPartialResultLabel.setText("Partial result: MATCH");
296     outputPartialResultLabel.setVerticalAlignment(SwingConstants.CENTER);
297     jPanel30.setBorder(null);
298     jPanel30.setLayout(gridLayout12);
299     jPanel31.setBorder(null);
300     pluginPanel.setBorder(BorderFactory.createEtchedBorder());
301     pluginPanel.setLayout(borderLayout16);
302     jPanel33.setBackground(Color.white);
303     jPanel33.setLayout(borderLayout14);
304     jLabel15.setFont(new java.awt.Font("Dialog", 1, 11));
305     jLabel15.setText("Plug-in matching result");
306     jLabel15.setVerticalAlignment(SwingConstants.CENTER);
307     jPanel34.setLayout(gridLayout14);
308     userInfoButton.setMaximumSize(new Dimension(29, 27));
309     userInfoButton.setMinimumSize(new Dimension(29, 27));
310     userInfoButton.setPreferredSize(new Dimension(29, 27));
311     userInfoButton.setToolTipText("View Details");
312     userInfoButton.setBorderPainted(false);
313     userInfoButton.setIcon(image1);
314     userInfoButton.setText("");
315     userInfoButton.addMouseListener(new MatchingResultDialog_userInfoButton_mouseAdapter(this));
316     userInfoButton.addActionListener(new MatchingResultDialog_userInfoButton_actionAdapter(this));
317     plugInMatchResultLabel.setText("All active plug-ins matched");
318     plugInMatchResultLabel.setVerticalAlignment(SwingConstants.CENTER);
319     jPanel35.setBorder(null);
320     jPanel35.setDebugGraphicsOptions(0);
321     jPanel35.setLayout(gridLayout15);
322     jPanel37.setLayout(gridLayout13);
323     plugInPartialResultLabel.setText("Partial result: MATCH");
324     plugInPartialResultLabel.setVerticalAlignment(SwingConstants.CENTER);
325     jPanel38.setLayout(borderLayout15);
326     jPanel37.setBorder(null);
327     jPanel36.setBorder(null);
328     gridLayout16.setRows(4);
329     this.setResizable(false);
330     this.setTitle("Matching Result");
331     jPanel34.setBorder(null);
332     jPanel2.setBorder(null);
333     jPanel3.setBorder(null);
334     jPanel1.setBorder(null);
335     jPanel4.setBorder(null);
336     jPanel5.setBorder(null);
337     jPanel10.setBorder(null);
338     jPanel11.setBorder(null);
339     jPanel17.setBorder(null);
340     jPanel17.setMaximumSize(new Dimension(32767, 32767));
341     jPanel18.setBorder(null);
342     jPanel19.setBorder(null);
343     jPanel20.setBorder(null);
344     jPanel27.setBorder(null);
345     jPanel28.setBorder(null);
346     jPanel39.setBorder(null);
347     jPanel38.setBorder(null);
348     jLabel1.setText("Minimal expected degree");
349     jLabel2.setToolTipText("");
350     jLabel2.setText("Matching result");
351     gridLayout3.setRows(2);
352     gridLayout2.setColumns(1);
353     gridLayout2.setRows(2);
354     jLabel4.setText("Minimal expected degree");
355     jLabel5.setText("Matching result");
356     gridLayout7.setRows(2);
357     gridLayout8.setRows(2);
358     jLabel6.setToolTipText("");
359     jLabel6.setText("Minimal expected degree");
360     jLabel8.setText("Matching result");
361     gridLayout9.setRows(2);
362     gridLayout10.setRows(2);
363     jLabel9.setFont(new java.awt.Font("Dialog", 1, 11));
364     jLabel9.setText("Matching Result:");
365     getContentPane().add(panel1, BorderLayout.CENTER);
366     panel1.add(jPanel1, BorderLayout.NORTH);
367     panel1.add(jPanel2, BorderLayout.CENTER);
368     jPanel1.add(jPanel4, BorderLayout.WEST);
369     jPanel1.add(jPanel5, BorderLayout.CENTER);
370     jPanel5.add(jLabel9, null);
371     jPanel5.add(finalResultLabel, null);
372     jPanel4.add(resultIcon, null);
373     jPanel2.add(jPanel6, null);
374     jPanel6.add(jPanel8, BorderLayout.CENTER);
375     jPanel8.add(jPanel9, null);
376     jPanel9.add(jLabel2, null);
377     jPanel9.add(jLabel1, null);
378     jPanel8.add(jPanel10, null);
379     jPanel10.add(profileMatchResultLabel, null);
380     jPanel10.add(minDegreeProfileLabel, null);
381     jPanel8.add(jPanel11, null);
382     jPanel11.add(jPanel12, BorderLayout.CENTER);
383     jPanel12.add(jPanel14, BorderLayout.CENTER);
384     jPanel14.add(profilePartialResultLabel, null);
385     jPanel6.add(jPanel7, BorderLayout.NORTH);
386     jPanel7.add(jLabel3, BorderLayout.CENTER);
387     jPanel2.add(jPanel13, null);
388     panel1.add(jPanel3, BorderLayout.SOUTH);
389     jPanel3.add(okButton, null);
390     jPanel13.add(jPanel15, BorderLayout.NORTH);
391     jPanel15.add(jLabel7, BorderLayout.CENTER);
392     jPanel13.add(jPanel16, BorderLayout.CENTER);
393     jPanel16.add(jPanel17, null);
394     jPanel17.add(jLabel5, null);
395     jPanel17.add(jLabel4, null);
396     jPanel16.add(jPanel18, null);
397     jPanel18.add(inputMatchResultLabel, null);
398     jPanel18.add(minDegreeInputLabel, null);
399     jPanel16.add(jPanel19, null);
400     jPanel19.add(jPanel20, BorderLayout.CENTER);
401     jPanel20.add(jPanel21,  BorderLayout.CENTER);
402     jPanel21.add(inputPartialResultLabel, null);
403     jPanel12.add(jPanel22, BorderLayout.EAST);
404     jPanel20.add(jPanel23,  BorderLayout.EAST);
405     jPanel23.add(inputInfoButton, null);
406     jPanel2.add(outputPanel, null);
407     outputPanel.add(jPanel25, BorderLayout.NORTH);
408     jPanel25.add(jLabel11, BorderLayout.CENTER);
409     outputPanel.add(jPanel26, BorderLayout.CENTER);
410     jPanel26.add(jPanel27, null);
411     jPanel27.add(jLabel8, null);
412     jPanel27.add(jLabel6, null);
413     jPanel26.add(jPanel28, null);
414     jPanel26.add(jPanel29, null);
415     jPanel28.add(outputMatchResultLabel, null);
416     jPanel28.add(minDegreeOutputLabel, null);
417     jPanel2.add(pluginPanel, null);
418     pluginPanel.add(jPanel33, BorderLayout.NORTH);
419     jPanel33.add(jLabel15, BorderLayout.CENTER);
420     pluginPanel.add(jPanel34, BorderLayout.CENTER);
421     jPanel34.add(jPanel35, null);
422     jPanel35.add(plugInMatchResultLabel, null);
423     jPanel34.add(jPanel39, null);
424     jPanel34.add(jPanel38, null);
425     jPanel38.add(jPanel37, BorderLayout.CENTER);
426     jPanel37.add(plugInPartialResultLabel, null);
427     jPanel38.add(jPanel36, BorderLayout.EAST);
428     jPanel36.add(userInfoButton, null);
429     jPanel29.add(jPanel30, BorderLayout.CENTER);
430     jPanel30.add(outputPartialResultLabel, null);
431     jPanel29.add(jPanel31, BorderLayout.EAST);
432     jPanel31.add(outputInfoButton, null);
433   }
434 
435   /***
436    * Displays the matching results.
437    */
438   private void showResults() {
439     if (result==null) {
440       return;
441     }
442     if (result.getFinalMatchingResult()) {
443       finalResultLabel.setText("MATCH");
444       resultIcon.setIcon(matchIcon);
445 
446     } else {
447       finalResultLabel.setText("FAIL");
448       resultIcon.setIcon(failIcon);
449     }
450     // PROFILE
451     if (result.getProfileMatching()==ProfileMatching.MATCH) {
452       profileMatchResultLabel.setText("MATCH");
453     } else if (result.getProfileMatching()==ProfileMatching.SUBSUMES) {
454       profileMatchResultLabel.setText("SUBSUMES");
455     } else if (result.getProfileMatching()==ProfileMatching.UNCLASSIFIED) {
456       profileMatchResultLabel.setText("UNCLASSIFIED");
457     } else if (result.getProfileMatching()==ProfileMatching.FAIL) {
458       profileMatchResultLabel.setText("FAIL");
459     }
460     if (result.getMinimalProfileDegree()==ProfileMatching.MATCH) {
461       minDegreeProfileLabel.setText("MATCH");
462     } else if (result.getMinimalProfileDegree()==ProfileMatching.SUBSUMES) {
463       minDegreeProfileLabel.setText("SUBSUMES");
464     } else if (result.getMinimalProfileDegree()==ProfileMatching.UNCLASSIFIED) {
465       minDegreeProfileLabel.setText("UNCLASSIFIED");
466     } else if (result.getMinimalProfileDegree()==ProfileMatching.FAIL) {
467       minDegreeProfileLabel.setText("FAIL");
468     }
469     if (result.getProfileMatching()>=result.getMinimalProfileDegree()) {
470       profilePartialResultLabel.setText("Partial result: MATCH");
471     } else {
472       profilePartialResultLabel.setText("Partial result: FAIL");
473     }
474     // INPUT
475     if (result.getInputMatching()==InputParameterMatching.MATCH) {
476       inputMatchResultLabel.setText("MATCH");
477     } else if (result.getInputMatching()==InputParameterMatching.TYPE_SUBSUME) {
478       inputMatchResultLabel.setText("TYPE_SUBSUME");
479     } else if (result.getInputMatching()==InputParameterMatching.TYPE_INVERT) {
480       inputMatchResultLabel.setText("TYPE_INVERT");
481     } else if (result.getInputMatching()==InputParameterMatching.SUBPROPERTY) {
482       inputMatchResultLabel.setText("SUBPROPERTY");
483     } else if (result.getInputMatching()==InputParameterMatching.UNCLASSIFIED) {
484       inputMatchResultLabel.setText("UNCLASSIFIED");
485     } else if (result.getInputMatching()==InputParameterMatching.FAIL) {
486       inputMatchResultLabel.setText("FAIL");
487     }
488     if (result.getMinimalInputDegree()==InputParameterMatching.MATCH) {
489       minDegreeInputLabel.setText("MATCH");
490     } else if (result.getMinimalInputDegree()==InputParameterMatching.TYPE_SUBSUME) {
491       minDegreeInputLabel.setText("TYPE_SUBSUME");
492     } else if (result.getMinimalInputDegree()==InputParameterMatching.TYPE_INVERT) {
493       minDegreeInputLabel.setText("TYPE_INVERT");
494     } else if (result.getMinimalInputDegree()==InputParameterMatching.SUBPROPERTY) {
495       minDegreeInputLabel.setText("SUBPROPERTY");
496     } else if (result.getMinimalInputDegree()==InputParameterMatching.UNCLASSIFIED) {
497       minDegreeInputLabel.setText("UNCLASSIFIED");
498     } else if (result.getMinimalInputDegree()==InputParameterMatching.FAIL) {
499       minDegreeInputLabel.setText("FAIL");
500     }
501     if (result.getInputMatching()>=result.getMinimalInputDegree()) {
502       inputPartialResultLabel.setText("Partial result: MATCH");
503     } else {
504       inputPartialResultLabel.setText("Partial result: FAIL");
505     }
506 
507     // OUTPUT
508     if (result.getOutputMatching()==OutputParameterMatching.MATCH) {
509       outputMatchResultLabel.setText("MATCH");
510     } else if (result.getOutputMatching()==OutputParameterMatching.TYPE_SUBSUME) {
511       outputMatchResultLabel.setText("TYPE_SUBSUME");
512     } else if (result.getOutputMatching()==OutputParameterMatching.TYPE_INVERT) {
513       outputMatchResultLabel.setText("TYPE_INVERT");
514     } else if (result.getOutputMatching()==OutputParameterMatching.SUBPROPERTY) {
515       outputMatchResultLabel.setText("SUBPROPERTY");
516     } else if (result.getOutputMatching()==OutputParameterMatching.UNCLASSIFIED) {
517       outputMatchResultLabel.setText("UNCLASSIFIED");
518     } else if (result.getOutputMatching()==OutputParameterMatching.FAIL) {
519       outputMatchResultLabel.setText("FAIL");
520     } else if (result.getOutputMatching()==OutputParameterMatching.PARTIAL_FAIL) {
521       outputMatchResultLabel.setText("PARTIAL_FAIL");
522     }
523     if (result.getMinimalOutputDegree()==OutputParameterMatching.MATCH) {
524       minDegreeOutputLabel.setText("MATCH");
525     } else if (result.getMinimalOutputDegree()==OutputParameterMatching.TYPE_SUBSUME) {
526       minDegreeOutputLabel.setText("TYPE_SUBSUME");
527     } else if (result.getMinimalOutputDegree()==OutputParameterMatching.TYPE_INVERT) {
528       minDegreeOutputLabel.setText("TYPE_INVERT");
529     } else if (result.getMinimalOutputDegree()==OutputParameterMatching.SUBPROPERTY) {
530       minDegreeOutputLabel.setText("SUBPROPERTY");
531     } else if (result.getMinimalOutputDegree()==OutputParameterMatching.UNCLASSIFIED) {
532       minDegreeOutputLabel.setText("UNCLASSIFIED");
533     } else if (result.getMinimalOutputDegree()==OutputParameterMatching.FAIL) {
534       minDegreeOutputLabel.setText("FAIL");
535     } else if (result.getMinimalOutputDegree()==OutputParameterMatching.PARTIAL_FAIL) {
536       minDegreeOutputLabel.setText("PARTIAL_FAIL");
537     }
538     if (result.getOutputMatching()>=result.getMinimalOutputDegree()) {
539       outputPartialResultLabel.setText("Partial result: MATCH");
540     } else {
541       outputPartialResultLabel.setText("Partial result: FAIL");
542     }
543     // PLUG-INS
544     if (result.getPluginMatching()) {
545       plugInMatchResultLabel.setText("All active plug-ins matched");
546       plugInPartialResultLabel.setText("Partial result: MATCH");
547     } else {
548       plugInMatchResultLabel.setText("At least one plug-in failed");
549       plugInPartialResultLabel.setText("Partial result: FAIL");
550     }
551   }
552 
553   // Is called when the user clicks the 'input info' button.
554   void inputInfoButton_actionPerformed(ActionEvent e) {
555     ShowParameterResultDialog inputDiag = new ShowParameterResultDialog(mainFrame,"Input Parameter Matching Info",true,result,true);
556     inputDiag.setSize(400,400);
557     Dimension dlgSize = inputDiag.getSize();
558     Dimension frmSize = getSize();
559     Point loc = getLocation();
560     inputDiag.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
561                                    (frmSize.height - dlgSize.height) / 2 + loc.y);
562     inputDiag.show();
563 
564   }
565 
566   // Is called when the mouse enters the 'input info' button.
567   void inputInfoButton_mouseEntered(MouseEvent e) {
568     inputInfoButton.setBorderPainted(true);
569   }
570 
571   // Is called when the mouse exits the 'input info' button.
572   void inputInfoButton_mouseExited(MouseEvent e) {
573     inputInfoButton.setBorderPainted(false);
574   }
575 
576   // Is called when the user clicks the 'output info' button.
577   void outputInfoButton_actionPerformed(ActionEvent e) {
578     ShowParameterResultDialog outputDiag = new ShowParameterResultDialog(mainFrame,"Output Parameter Matching Info",true,result,false);
579     outputDiag.setSize(400,400);
580     Dimension dlgSize = outputDiag.getSize();
581     Dimension frmSize = getSize();
582     Point loc = getLocation();
583     outputDiag.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
584                                    (frmSize.height - dlgSize.height) / 2 + loc.y);
585     outputDiag.show();
586 
587   }
588 
589   // Is called when the mouse enters the 'output info' button.
590   void outputInfoButton_mouseEntered(MouseEvent e) {
591     outputInfoButton.setBorderPainted(true);
592   }
593 
594   // Is called when the mouse exits the 'output info' button.
595   void outputInfoButton_mouseExited(MouseEvent e) {
596     outputInfoButton.setBorderPainted(false);
597   }
598 
599   // Is called when the user clicks the 'plug-in info' button.
600   void userInfoButton_actionPerformed(ActionEvent e) {
601     ShowPlugInResultsDialog userDiag = new ShowPlugInResultsDialog(mainFrame,"Plug-In Matching Info",true,result);
602     userDiag.setSize(300,300);
603     Dimension dlgSize = userDiag.getSize();
604     Dimension frmSize = getSize();
605     Point loc = getLocation();
606     userDiag.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
607                                    (frmSize.height - dlgSize.height) / 2 + loc.y);
608     userDiag.show();
609   }
610 
611   // Is called when the mouse enters the 'plug-in info' button.
612   void userInfoButton_mouseEntered(MouseEvent e) {
613     userInfoButton.setBorderPainted(true);
614   }
615 
616   // Is called when the mouse exits the 'plug-in info' button.
617   void userInfoButton_mouseExited(MouseEvent e) {
618     userInfoButton.setBorderPainted(false);
619   }
620 
621   // Is called when the user clicks the 'ok' button.
622   void okButton_actionPerformed(ActionEvent e) {
623     this.hide();
624   }
625 }
626 
627 // -----------------------------------------
628 // ------- AUTO GENERATED CLASSES ----------
629 // -----------------------------------------
630 class MatchingResultDialog_inputInfoButton_actionAdapter implements java.awt.event.ActionListener {
631   MatchingResultDialog adaptee;
632   MatchingResultDialog_inputInfoButton_actionAdapter(MatchingResultDialog adaptee) {
633     this.adaptee = adaptee;
634   }
635   public void actionPerformed(ActionEvent e) {
636     adaptee.inputInfoButton_actionPerformed(e);
637   }
638 }
639 class MatchingResultDialog_inputInfoButton_mouseAdapter extends java.awt.event.MouseAdapter {
640   MatchingResultDialog adaptee;
641   MatchingResultDialog_inputInfoButton_mouseAdapter(MatchingResultDialog adaptee) {
642     this.adaptee = adaptee;
643   }
644   public void mouseEntered(MouseEvent e) {
645     adaptee.inputInfoButton_mouseEntered(e);
646   }
647   public void mouseExited(MouseEvent e) {
648     adaptee.inputInfoButton_mouseExited(e);
649   }
650 }
651 class MatchingResultDialog_outputInfoButton_actionAdapter implements java.awt.event.ActionListener {
652   MatchingResultDialog adaptee;
653   MatchingResultDialog_outputInfoButton_actionAdapter(MatchingResultDialog adaptee) {
654     this.adaptee = adaptee;
655   }
656   public void actionPerformed(ActionEvent e) {
657     adaptee.outputInfoButton_actionPerformed(e);
658   }
659 }
660 class MatchingResultDialog_outputInfoButton_mouseAdapter extends java.awt.event.MouseAdapter {
661   MatchingResultDialog adaptee;
662   MatchingResultDialog_outputInfoButton_mouseAdapter(MatchingResultDialog adaptee) {
663     this.adaptee = adaptee;
664   }
665   public void mouseEntered(MouseEvent e) {
666     adaptee.outputInfoButton_mouseEntered(e);
667   }
668   public void mouseExited(MouseEvent e) {
669     adaptee.outputInfoButton_mouseExited(e);
670   }
671 }
672 class MatchingResultDialog_userInfoButton_actionAdapter implements java.awt.event.ActionListener {
673   MatchingResultDialog adaptee;
674   MatchingResultDialog_userInfoButton_actionAdapter(MatchingResultDialog adaptee) {
675     this.adaptee = adaptee;
676   }
677   public void actionPerformed(ActionEvent e) {
678     adaptee.userInfoButton_actionPerformed(e);
679   }
680 }
681 class MatchingResultDialog_userInfoButton_mouseAdapter extends java.awt.event.MouseAdapter {
682   MatchingResultDialog adaptee;
683   MatchingResultDialog_userInfoButton_mouseAdapter(MatchingResultDialog adaptee) {
684     this.adaptee = adaptee;
685   }
686   public void mouseEntered(MouseEvent e) {
687     adaptee.userInfoButton_mouseEntered(e);
688   }
689   public void mouseExited(MouseEvent e) {
690     adaptee.userInfoButton_mouseExited(e);
691   }
692 }
693 class MatchingResultDialog_okButton_actionAdapter implements java.awt.event.ActionListener {
694   MatchingResultDialog adaptee;
695   MatchingResultDialog_okButton_actionAdapter(MatchingResultDialog adaptee) {
696     this.adaptee = adaptee;
697   }
698   public void actionPerformed(ActionEvent e) {
699     adaptee.okButton_actionPerformed(e);
700   }
701 }