1 19 20 package org.netbeans.modules.websvc.core.wseditor.support; 21 22 import java.util.Set ; 23 import org.netbeans.modules.websvc.api.jaxws.project.config.JaxWsModel; 24 import org.netbeans.modules.websvc.core.wseditor.spi.WSEditor; 25 import org.openide.nodes.Node; 26 import org.openide.windows.TopComponent; 27 28 31 public class EditWSAttributesTopComponent extends TopComponent { 32 33 private static final long serialVersionUID = 1L; 34 35 37 static final String ICON_PATH = "org/netbeans/modules/websvc/core/ui/Context.gif"; 38 39 private static final String PREFERRED_ID = "EditWSAttributesTopComponent"; 40 41 public EditWSAttributesTopComponent() { 42 initComponents2(); 43 } 44 45 public void addTabs(Set <WSEditor> editors, Node node, JaxWsModel jaxWsModel){ 46 jTabbedPane1.removeAll(); 47 for (WSEditor editor : editors){ 48 jTabbedPane1.addTab(editor.getTitle(), editor.createWSEditorComponent(node, jaxWsModel)); 49 } 50 } 51 52 private void initComponents2(){ 53 jTabbedPane1 = new javax.swing.JTabbedPane (); 54 55 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 56 this.setLayout(layout); 57 layout.setHorizontalGroup( 58 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 59 .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE) 60 ); 61 layout.setVerticalGroup( 62 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 63 .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 531, Short.MAX_VALUE) 64 ); 65 } 66 67 68 73 private void initComponents() { 75 jTabbedPane1 = new javax.swing.JTabbedPane (); 76 77 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 78 this.setLayout(layout); 79 layout.setHorizontalGroup( 80 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 81 .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE) 82 ); 83 layout.setVerticalGroup( 84 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 85 .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 531, Short.MAX_VALUE) 86 ); 87 } 89 90 private javax.swing.JTabbedPane jTabbedPane1; 92 94 95 public int getPersistenceType() { 96 return TopComponent.PERSISTENCE_ALWAYS; 97 } 98 99 public void componentOpened() { 100 } 102 103 public void componentClosed() { 104 } 106 107 108 public Object writeReplace() { 109 return null; 111 } 112 113 protected String preferredID() { 114 return PREFERRED_ID; 115 } 116 117 } 118 | Popular Tags |