1 23 package org.enhydra.kelp.common.properties; 24 25 import org.enhydra.kelp.common.node.OtterNode; 27 import org.enhydra.kelp.common.xmlc.XMLCOptionTab; 28 29 import java.awt.*; 31 import java.awt.event.*; 32 import java.beans.*; 33 import java.io.File ; 34 import javax.swing.*; 35 import javax.swing.border.*; 36 import javax.swing.event.*; 37 38 public class XMLCPackagePropertyPanel extends JPanel { 40 private GridBagLayout layoutMain = null; 41 private XMLCOptionTab tab = null; 42 private OtterNode node = null; 43 44 48 public XMLCPackagePropertyPanel() { 49 try { 50 jbInit(); 51 pmInit(); 52 } catch (Exception e) { 53 e.printStackTrace(); 54 } 55 } 56 57 63 public OtterNode getNode() { 64 return node; 65 } 66 67 73 public void setNode(OtterNode n) { 74 node = n; 75 } 76 77 83 private void pmInit() throws Exception { 84 } 86 87 93 private void jbInit() throws Exception { 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 113 public void readProperties() { 114 boolean b = false; 115 String s = new String (); 116 117 tab.setNode(node); 118 tab.init(); 119 tab.readProperties(); 120 } 121 122 126 public void writeProperties() { 127 tab.writeProperties(); 128 } 129 130 } 131 | Popular Tags |