1 19 package org.netbeans.modules.tomcat5.customizer; 20 21 import javax.swing.JTabbedPane ; 22 import javax.swing.event.ChangeEvent ; 23 import javax.swing.event.ChangeListener ; 24 import org.openide.util.NbBundle; 25 import org.netbeans.modules.j2ee.deployment.common.api.J2eeLibraryTypeProvider; 26 import org.netbeans.modules.j2ee.deployment.plugins.api.J2eePlatformImpl; 27 import org.netbeans.modules.tomcat5.TomcatManager; 28 29 34 public class Customizer extends JTabbedPane { 35 36 private static final String CLASSPATH = J2eeLibraryTypeProvider.VOLUME_TYPE_CLASSPATH; 37 private static final String SOURCES = J2eeLibraryTypeProvider.VOLUME_TYPE_SRC; 38 private static final String JAVADOC = J2eeLibraryTypeProvider.VOLUME_TYPE_JAVADOC; 39 40 private TomcatManager manager; 41 private J2eePlatformImpl platform; 42 43 public Customizer(TomcatManager aManager) { 44 manager = aManager; 45 platform = manager.getTomcatPlatform(); 46 initComponents (); 47 } 48 49 private void initComponents() { 50 getAccessibleContext().setAccessibleName (NbBundle.getMessage(Customizer.class,"ACS_Customizer")); getAccessibleContext().setAccessibleDescription (NbBundle.getMessage(Customizer.class,"ACS_Customizer")); CustomizerDataSupport custData = new CustomizerDataSupport(manager); 53 addChangeListener(new ChangeListener () { 55 public void stateChanged(ChangeEvent e) { 56 String helpID = null; 57 switch (getSelectedIndex()) { 58 case 0 : helpID = "tomcat_customizer_general"; break; 60 case 1 : helpID = "tomcat_customizer_startup"; break; 62 case 2 : helpID = "tomcat_customizer_platform"; break; 64 case 3 : helpID = "tomcat_customizer_classes"; break; 66 case 4 : helpID = "tomcat_customizer_sources"; break; 68 case 5 : helpID = "tomcat_customizer_javadoc"; break; 70 } 71 putClientProperty("HelpID", helpID); } 73 }); 74 addTab(NbBundle.getMessage(Customizer.class,"TXT_General"), new CustomizerGeneral(custData)); 75 addTab(NbBundle.getMessage(Customizer.class,"TXT_Startup"), new CustomizerStartup(custData)); 76 addTab(NbBundle.getMessage(Customizer.class,"TXT_Platform"), new CustomizerJVM(custData)); 77 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Classes"), 78 CustomizerSupport.createClassesCustomizer(custData.getClassModel())); 79 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Sources"), 80 CustomizerSupport.createSourcesCustomizer(custData.getSourceModel(), null)); 81 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Javadoc"), 82 CustomizerSupport.createJavadocCustomizer(custData.getJavadocsModel(), null)); 83 } 84 } 85 | Popular Tags |