001: /*
002: * Enhydra Java Application Server Project
003: *
004: * The contents of this file are subject to the Enhydra Public License
005: * Version 1.1 (the "License"); you may not use this file except in
006: * compliance with the License. You may obtain a copy of the License on
007: * the Enhydra web site ( http://www.enhydra.org/ ).
008: *
009: * Software distributed under the License is distributed on an "AS IS"
010: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
011: * the License for the specific terms governing rights and limitations
012: * under the License.
013: *
014: * The Initial Developer of the Enhydra Application Server is Lutris
015: * Technologies, Inc. The Enhydra Application Server and portions created
016: * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
017: * All Rights Reserved.
018: *
019: * Contributor(s):
020: * Paul Mahar
021: *
022: */
023: package org.enhydra.kelp.common.properties;
024:
025: // AddinCore
026: import org.enhydra.kelp.common.node.OtterNode;
027: import org.enhydra.kelp.common.xmlc.XMLCOptionTab;
028:
029: // JDK
030: import java.awt.*;
031: import java.awt.event.*;
032: import java.beans.*;
033: import java.io.File;
034: import javax.swing.*;
035: import javax.swing.border.*;
036: import javax.swing.event.*;
037:
038: //
039: public class XMLCPackagePropertyPanel extends JPanel {
040: private GridBagLayout layoutMain = null;
041: private XMLCOptionTab tab = null;
042: private OtterNode node = null;
043:
044: /**
045: * Constructor declaration
046: *
047: */
048: public XMLCPackagePropertyPanel() {
049: try {
050: jbInit();
051: pmInit();
052: } catch (Exception e) {
053: e.printStackTrace();
054: }
055: }
056:
057: /**
058: * Method declaration
059: *
060: *
061: * @return
062: */
063: public OtterNode getNode() {
064: return node;
065: }
066:
067: /**
068: * Method declaration
069: *
070: *
071: * @param n
072: */
073: public void setNode(OtterNode n) {
074: node = n;
075: }
076:
077: /**
078: * Method declaration
079: *
080: *
081: * @exception Exception
082: */
083: private void pmInit() throws Exception {
084: //
085: }
086:
087: /**
088: * Method declaration
089: *
090: *
091: * @exception Exception
092: */
093: private void jbInit() throws Exception {
094: layoutMain = (GridBagLayout) Beans.instantiate(getClass()
095: .getClassLoader(), GridBagLayout.class.getName());
096: tab = (XMLCOptionTab) Beans.instantiate(getClass()
097: .getClassLoader(), XMLCOptionTab.class.getName());
098: tab.setLayout(tab.getLayout());
099: this .setLayout(layoutMain);
100: this .add(tab, new GridBagConstraints(0, 4, 1, 1, 0.1, 0.1,
101: GridBagConstraints.CENTER,
102: GridBagConstraints.HORIZONTAL, new Insets(3, 15, 5, 5),
103: 0, 0));
104: }
105:
106: /**
107: * Method declaration
108: *
109: */
110: public void readProperties() {
111: boolean b = false;
112: String s = new String();
113:
114: tab.setNode(node);
115: tab.init();
116: tab.readProperties();
117: }
118:
119: /**
120: * Method declaration
121: *
122: */
123: public void writeProperties() {
124: tab.writeProperties();
125: }
126:
127: }
|