1 19 20 package org.netbeans.modules.j2ee.sun.ide.j2ee.ui; 21 22 23 24 import javax.enterprise.deploy.spi.DeploymentManager ; 25 import javax.swing.JTabbedPane ; 26 import javax.swing.event.ChangeEvent ; 27 import javax.swing.event.ChangeListener ; 28 import org.openide.util.NbBundle; 29 import org.netbeans.modules.j2ee.sun.ide.j2ee.DeploymentManagerProperties; 30 31 36 public class Customizer extends JTabbedPane { 37 38 private final DeploymentManager dmp; 39 private ConnectionTabVisualPanel ctvp; 40 41 public Customizer(DeploymentManager dmp) { 42 43 this.dmp = dmp; 44 initComponents (); 45 } 46 public void removeNotify(){ 47 ctvp.syncUpWithModel(); 48 } 49 private void initComponents() { 50 getAccessibleContext().setAccessibleName (NbBundle.getMessage(Customizer.class,"ACS_Customizer")); getAccessibleContext().setAccessibleDescription (NbBundle.getMessage(Customizer.class,"ACS_Customizer")); addChangeListener(new ChangeListener () { 54 public void stateChanged(ChangeEvent e) { 55 String helpID = null; 56 switch (getSelectedIndex()) { 57 case 0 : helpID = "appsrv81_customizer_connection"; break; 59 case 1 : helpID = "appsrv81_customizer_classes"; break; 61 case 2 : helpID = "appsrv81_customizer_sources"; break; 63 case 3 : helpID = "appsrv81_customizer_javadoc"; break; 65 } 66 putClientProperty("HelpID", helpID); } 68 }); 69 DeploymentManagerProperties dmpr = new DeploymentManagerProperties(dmp); 70 71 CustomizerDataSupport custData = new CustomizerDataSupport(dmpr); 72 ctvp = new ConnectionTabVisualPanel(dmp); 73 addTab(NbBundle.getMessage(Customizer.class,"TXT_Connection"), ctvp); 74 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Classes"), 75 CustomizerSupport.createClassesCustomizer(custData.getClassModel())); 76 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Sources"), 77 CustomizerSupport.createSourcesCustomizer(custData.getSourceModel(), null)); 78 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Javadoc"), 79 CustomizerSupport.createJavadocCustomizer(custData.getJavadocsModel(), null)); 80 } 81 } 82 | Popular Tags |