KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > common > properties > XMLCPackagePropertyPanel


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.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. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  * Paul Mahar
21  *
22  */

23 package org.enhydra.kelp.common.properties;
24
25 // AddinCore
26
import org.enhydra.kelp.common.node.OtterNode;
27 import org.enhydra.kelp.common.xmlc.XMLCOptionTab;
28
29 // JDK
30
import java.awt.*;
31 import java.awt.event.*;
32 import java.beans.*;
33 import java.io.File JavaDoc;
34 import javax.swing.*;
35 import javax.swing.border.*;
36 import javax.swing.event.*;
37
38 //
39
public class XMLCPackagePropertyPanel extends JPanel {
40     private GridBagLayout layoutMain = null;
41     private XMLCOptionTab tab = null;
42     private OtterNode node = null;
43
44     /**
45      * Constructor declaration
46      *
47      */

48     public XMLCPackagePropertyPanel() {
49         try {
50             jbInit();
51             pmInit();
52         } catch (Exception JavaDoc e) {
53             e.printStackTrace();
54         }
55     }
56
57     /**
58      * Method declaration
59      *
60      *
61      * @return
62      */

63     public OtterNode getNode() {
64         return node;
65     }
66
67     /**
68      * Method declaration
69      *
70      *
71      * @param n
72      */

73     public void setNode(OtterNode n) {
74         node = n;
75     }
76
77     /**
78      * Method declaration
79      *
80      *
81      * @exception Exception
82      */

83     private void pmInit() throws Exception JavaDoc {
84         //
85
}
86
87     /**
88      * Method declaration
89      *
90      *
91      * @exception Exception
92      */

93     private void jbInit() throws Exception JavaDoc {
94         layoutMain =
95             (GridBagLayout) Beans.instantiate(getClass().getClassLoader(),
96                                               GridBagLayout.class.getName());
97         tab =
98             (XMLCOptionTab) Beans.instantiate(getClass().getClassLoader(),
99                                                 XMLCOptionTab.class.getName());
100         tab.setLayout(tab.getLayout());
101         this.setLayout(layoutMain);
102         this.add(tab,
103                  new GridBagConstraints(0, 4, 1, 1, 0.1, 0.1,
104                                         GridBagConstraints.CENTER,
105                                         GridBagConstraints.HORIZONTAL,
106                                         new Insets(3, 15, 5, 5), 0, 0));
107     }
108
109     /**
110      * Method declaration
111      *
112      */

113     public void readProperties() {
114         boolean b = false;
115         String JavaDoc s = new String JavaDoc();
116
117         tab.setNode(node);
118         tab.init();
119         tab.readProperties();
120     }
121
122     /**
123      * Method declaration
124      *
125      */

126     public void writeProperties() {
127         tab.writeProperties();
128     }
129
130 }
131
Popular Tags