1 19 package org.netbeans.modules.j2ee.jboss4.customizer; 20 21 22 import java.awt.GridBagConstraints ; 23 import java.awt.GridBagLayout ; 24 import java.awt.Insets ; 25 import java.io.File ; 26 import java.util.ArrayList ; 27 import java.net.URL ; 28 import java.net.URI ; 29 import java.util.List ; 30 import javax.swing.*; 31 import javax.swing.event.ChangeEvent ; 32 import javax.swing.event.ChangeListener ; 33 import org.openide.filesystems.FileUtil; 34 import org.openide.util.NbBundle; 35 import org.netbeans.modules.j2ee.deployment.common.api.J2eeLibraryTypeProvider; 36 import org.netbeans.modules.j2ee.deployment.plugins.api.J2eePlatformImpl; 37 import org.netbeans.spi.project.libraries.LibraryImplementation; 38 39 40 45 public class Customizer extends JTabbedPane { 46 47 private static final String CLASSPATH = J2eeLibraryTypeProvider.VOLUME_TYPE_CLASSPATH; 48 private static final String SOURCES = J2eeLibraryTypeProvider.VOLUME_TYPE_SRC; 49 private static final String JAVADOC = J2eeLibraryTypeProvider.VOLUME_TYPE_JAVADOC; 50 51 private final J2eePlatformImpl platform; 52 private final CustomizerDataSupport custData; 53 54 public Customizer(CustomizerDataSupport custData, J2eePlatformImpl platform) { 55 this.custData = custData; 56 this.platform = platform; 57 initComponents (); 58 } 59 60 private void initComponents() { 61 getAccessibleContext().setAccessibleName (NbBundle.getMessage(Customizer.class,"ACS_Customizer")); 62 getAccessibleContext().setAccessibleDescription (NbBundle.getMessage(Customizer.class,"ACS_Customizer")); 63 addChangeListener(new ChangeListener () { 65 public void stateChanged(ChangeEvent e) { 66 String helpID = null; 67 switch (getSelectedIndex()) { 68 case 0 : helpID = "jboss_customizer_platform"; break; 70 case 1 : helpID = "jboss_customizer_classes"; break; 72 case 2 : helpID = "jboss_customizer_sources"; break; 74 case 3 : helpID = "jboss_customizer_javadoc"; break; 76 } 77 putClientProperty("HelpID", helpID); } 79 }); 80 addTab(NbBundle.getMessage(Customizer.class,"TXT_Platform"), new CustomizerJVM(custData)); 81 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Classes"), 82 CustomizerSupport.createClassesCustomizer(custData.getClassModel())); 83 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Sources"), 84 CustomizerSupport.createSourcesCustomizer(custData.getSourceModel(), null)); 85 addTab(NbBundle.getMessage(Customizer.class,"TXT_Tab_Javadoc"), 86 CustomizerSupport.createJavadocCustomizer(custData.getJavadocsModel(), null)); 87 } 88 } 89 | Popular Tags |