1 19 package org.netbeans.modules.j2ee.oc4j.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 28 33 public class OC4JCustomizer extends JTabbedPane { 34 35 private static final String CLASSPATH = J2eeLibraryTypeProvider.VOLUME_TYPE_CLASSPATH; 36 private static final String JAVADOC = J2eeLibraryTypeProvider.VOLUME_TYPE_JAVADOC; 37 38 private final J2eePlatformImpl platform; 39 private final OC4JCustomizerDataSupport custData; 40 41 public OC4JCustomizer(OC4JCustomizerDataSupport custData, J2eePlatformImpl platform) { 42 this.custData = custData; 43 this.platform = platform; 44 initComponents(); 45 } 46 47 private void initComponents() { 48 getAccessibleContext().setAccessibleName(NbBundle.getMessage(OC4JCustomizer.class,"ACS_Customizer")); 49 getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(OC4JCustomizer.class,"ACS_Customizer")); 50 addChangeListener(new ChangeListener () { 52 public void stateChanged(ChangeEvent e) { 53 String helpID = null; 54 switch (getSelectedIndex()) { 55 case 0 : helpID = "oc4j_customizer_user"; break; 57 case 1 : helpID = "oc4j_customizer_classes"; break; 59 case 2 : helpID = "oc4j_customizer_javadoc"; break; 61 } 62 putClientProperty("HelpID", helpID); } 64 }); 65 addTab(NbBundle.getMessage(OC4JCustomizer.class,"TXT_Tab_User"), 66 OC4JCustomizerSupport.createUserCustomizer(custData.getInstanceProperties())); 67 addTab(NbBundle.getMessage(OC4JCustomizer.class,"TXT_Tab_Classes"), 68 OC4JCustomizerSupport.createClassesCustomizer(custData.getClassModel())); 69 addTab(NbBundle.getMessage(OC4JCustomizer.class,"TXT_Tab_Javadoc"), 70 OC4JCustomizerSupport.createJavadocCustomizer(custData.getJavadocsModel(), null)); 71 } 72 } | Popular Tags |