1 22 package org.enhydra.kelp.jbuilder.properties; 23 24 import org.enhydra.kelp.KelpInfo; 26 import org.enhydra.kelp.common.node.OtterNode; 27 import org.enhydra.kelp.common.properties.XMLCPackagePropertyPanel; 28 import org.enhydra.kelp.jbuilder.node.PrimeNode; 29 30 import com.borland.primetime.help.HelpTopic; 32 import com.borland.primetime.help.ZipHelpTopic; 33 import com.borland.primetime.node.LightweightNode; 34 import com.borland.primetime.properties.PropertyPage; 35 36 import java.awt.BorderLayout ; 38 39 45 public class XMLCPackagePropertyPage extends PropertyPage { 46 private final String HELP_LINK = KelpInfo.getAddinHelpURL(); private XMLCPackagePropertyPanel packagePanel = new XMLCPackagePropertyPanel(); 50 private BorderLayout layoutMain = new BorderLayout (); 51 52 58 public XMLCPackagePropertyPage(Object topic) { 59 if (topic instanceof LightweightNode) { 60 LightweightNode nativeNode = null; 61 OtterNode otterNode = null; 62 63 nativeNode = (LightweightNode) topic; 64 otterNode = new PrimeNode(nativeNode); 65 try { 66 packagePanel.setNode(otterNode); 67 jbInit(); 68 } catch (Exception e) { 69 e.printStackTrace(); 70 } 71 } 72 } 73 74 78 public void readProperties() { 79 packagePanel.readProperties(); 80 } 81 82 88 public HelpTopic getHelpTopic() { 89 ZipHelpTopic topic = null; 90 91 topic = new ZipHelpTopic(null, HELP_LINK); 92 return topic; 93 } 94 95 99 public void writeProperties() { 100 packagePanel.writeProperties(); 101 } 102 103 107 public XMLCPackagePropertyPage() { 108 try { 109 jbInit(); 110 } catch (Exception e) { 111 e.printStackTrace(); 112 } 113 } 114 115 121 private void jbInit() throws Exception { 122 this.setLayout(layoutMain); 123 this.add(packagePanel, BorderLayout.CENTER); 124 } 125 126 } 127 | Popular Tags |