KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > tools > generator > SAXGeneratorCustomizer


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xml.tools.generator;
20
21 import java.awt.event.*;
22 import java.beans.*;
23
24 /**
25  * Should start a wizard traveling around panels.
26  *
27  * @author pkuzel
28  * @version
29  */

30 public class SAXGeneratorCustomizer extends javax.swing.JPanel JavaDoc implements Customizer, ActionListener {
31
32     /** Serial Version UID */
33     private static final long serialVersionUID =9150516877346238338L;
34
35
36     private SAXGeneratorModel model;
37
38     /** Creates new form SAXGeneratorCustomizer */
39     public SAXGeneratorCustomizer() {
40         initComponents ();
41     }
42
43     /** This method is called from within the constructor to
44      * initialize the form.
45      * WARNING: Do NOT modify this code. The content of this method is
46      * always regenerated by the FormEditor.
47      */

48     private void initComponents() {//GEN-BEGIN:initComponents
49
sAXGeneratorParsletPanel1 = new org.netbeans.modules.xml.tools.generator.SAXGeneratorParsletPanel();
50         sAXGeneratorMethodPanel1 = new org.netbeans.modules.xml.tools.generator.SAXGeneratorMethodPanel();
51         sAXGeneratorVersionPanel1 = new org.netbeans.modules.xml.tools.generator.SAXGeneratorVersionPanel();
52         sAXGeneratorFilePanel1 = new org.netbeans.modules.xml.tools.generator.SAXGeneratorFilePanel();
53
54         setLayout(new java.awt.GridLayout JavaDoc(2, 2));
55
56         sAXGeneratorParsletPanel1.setLayout(new java.awt.BorderLayout JavaDoc());
57
58         add(sAXGeneratorParsletPanel1);
59
60         sAXGeneratorMethodPanel1.setLayout(new java.awt.BorderLayout JavaDoc());
61
62         add(sAXGeneratorMethodPanel1);
63
64         add(sAXGeneratorVersionPanel1);
65
66         add(sAXGeneratorFilePanel1);
67
68     }//GEN-END:initComponents
69

70     public void setObject(java.lang.Object JavaDoc peer) {
71         if ( not(peer instanceof SAXGeneratorModel) ) {
72             throw new IllegalArgumentException JavaDoc("SAXGeneratorModel class expected."); // NOI18N
73
}
74         
75         model = (SAXGeneratorModel) peer;
76         
77         sAXGeneratorParsletPanel1.setObject(model);
78         sAXGeneratorMethodPanel1.setObject(model);
79         sAXGeneratorVersionPanel1.setObject(model);
80         sAXGeneratorFilePanel1.setObject(model);
81     }
82
83     private boolean not (boolean expr) {
84         return ! expr;
85     }
86     
87     public void addPropertyChangeListener(java.beans.PropertyChangeListener JavaDoc p1) {
88     }
89     
90     public void removePropertyChangeListener(java.beans.PropertyChangeListener JavaDoc p1) {
91     }
92     
93     public void actionPerformed(java.awt.event.ActionEvent JavaDoc e) {
94         sAXGeneratorVersionPanel1.actionPerformed(e);
95         sAXGeneratorFilePanel1.actionPerformed(e);
96
97     }
98     
99     // Variables declaration - do not modify//GEN-BEGIN:variables
100
private org.netbeans.modules.xml.tools.generator.SAXGeneratorParsletPanel sAXGeneratorParsletPanel1;
101     private org.netbeans.modules.xml.tools.generator.SAXGeneratorFilePanel sAXGeneratorFilePanel1;
102     private org.netbeans.modules.xml.tools.generator.SAXGeneratorMethodPanel sAXGeneratorMethodPanel1;
103     private org.netbeans.modules.xml.tools.generator.SAXGeneratorVersionPanel sAXGeneratorVersionPanel1;
104     // End of variables declaration//GEN-END:variables
105

106 }
107
Popular Tags