1 19 20 package org.netbeans.modules.java.j2seproject.ui.customizer; 21 22 import java.io.File ; 23 import java.util.ArrayList ; 24 import java.util.Enumeration ; 25 import java.util.Iterator ; 26 import java.util.List ; 27 import javax.swing.JComponent ; 28 import javax.swing.JPanel ; 29 import javax.swing.ListCellRenderer ; 30 import javax.swing.event.DocumentEvent ; 31 import javax.swing.event.DocumentListener ; 32 import javax.swing.event.ListDataEvent ; 33 import javax.swing.event.ListDataListener ; 34 import org.netbeans.api.project.ant.AntArtifact; 35 import org.netbeans.modules.java.j2seproject.J2SEProjectUtil; 36 import org.netbeans.spi.project.support.ant.AntProjectHelper; 37 import org.netbeans.spi.project.support.ant.PropertyUtils; 38 import org.openide.DialogDisplayer; 39 import org.openide.NotifyDescriptor; 40 import org.openide.util.HelpCtx; 41 import org.openide.util.NbBundle; 42 43 47 public class CustomizerJar extends JPanel implements HelpCtx.Provider { 48 49 public CustomizerJar( J2SEProjectProperties uiProperties ) { 50 initComponents(); 51 52 jTextFieldDistDir.setDocument( uiProperties.DIST_JAR_MODEL ); 53 jTextFieldExcludes.setDocument( uiProperties.BUILD_CLASSES_EXCLUDES_MODEL ); 54 55 uiProperties.JAR_COMPRESS_MODEL.setMnemonic( jCheckBoxCommpress.getMnemonic() ); 56 jCheckBoxCommpress.setModel( uiProperties.JAR_COMPRESS_MODEL ); 57 } 58 59 public HelpCtx getHelpCtx() { 60 return new HelpCtx( CustomizerJar.class ); 61 } 62 63 64 69 private void initComponents() { 71 java.awt.GridBagConstraints gridBagConstraints; 72 73 jLabelDistDir = new javax.swing.JLabel (); 74 jTextFieldDistDir = new javax.swing.JTextField (); 75 jLabel2 = new javax.swing.JLabel (); 76 jTextFieldExcludes = new javax.swing.JTextField (); 77 jCheckBoxCommpress = new javax.swing.JCheckBox (); 78 excludeMessage = new javax.swing.JLabel (); 79 80 setLayout(new java.awt.GridBagLayout ()); 81 82 jLabelDistDir.setLabelFor(jTextFieldDistDir); 83 org.openide.awt.Mnemonics.setLocalizedText(jLabelDistDir, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_DistDir_JTextField")); 84 gridBagConstraints = new java.awt.GridBagConstraints (); 85 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 86 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 12); 87 add(jLabelDistDir, gridBagConstraints); 88 89 jTextFieldDistDir.setEditable(false); 90 gridBagConstraints = new java.awt.GridBagConstraints (); 91 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 92 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 93 gridBagConstraints.weightx = 1.0; 94 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 95 add(jTextFieldDistDir, gridBagConstraints); 96 jTextFieldDistDir.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jTextFieldDistDir")); 97 98 jLabel2.setLabelFor(jTextFieldExcludes); 99 org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_Excludes_JTextField")); 100 gridBagConstraints = new java.awt.GridBagConstraints (); 101 gridBagConstraints.gridx = 0; 102 gridBagConstraints.gridy = 1; 103 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 104 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 12); 105 add(jLabel2, gridBagConstraints); 106 107 gridBagConstraints = new java.awt.GridBagConstraints (); 108 gridBagConstraints.gridx = 1; 109 gridBagConstraints.gridy = 1; 110 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 111 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 112 gridBagConstraints.weightx = 1.0; 113 add(jTextFieldExcludes, gridBagConstraints); 114 jTextFieldExcludes.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jTextFieldExcludes")); 115 116 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxCommpress, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_Commpres_JCheckBox")); 117 gridBagConstraints = new java.awt.GridBagConstraints (); 118 gridBagConstraints.gridx = 0; 119 gridBagConstraints.gridy = 3; 120 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 121 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 122 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 123 gridBagConstraints.weighty = 1.0; 124 add(jCheckBoxCommpress, gridBagConstraints); 125 jCheckBoxCommpress.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jCheckBoxCompress")); 126 127 excludeMessage.setLabelFor(jTextFieldExcludes); 128 org.openide.awt.Mnemonics.setLocalizedText(excludeMessage, java.util.ResourceBundle.getBundle("org/netbeans/modules/java/j2seproject/ui/customizer/Bundle").getString("LBL_CustomizerJar_ExcludeMessage")); 129 gridBagConstraints = new java.awt.GridBagConstraints (); 130 gridBagConstraints.gridx = 1; 131 gridBagConstraints.gridy = 2; 132 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 133 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 134 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 135 gridBagConstraints.insets = new java.awt.Insets (0, 0, 6, 0); 136 add(excludeMessage, gridBagConstraints); 137 138 } 139 141 142 private javax.swing.JLabel excludeMessage; 144 private javax.swing.JCheckBox jCheckBoxCommpress; 145 private javax.swing.JLabel jLabel2; 146 private javax.swing.JLabel jLabelDistDir; 147 private javax.swing.JTextField jTextFieldDistDir; 148 private javax.swing.JTextField jTextFieldExcludes; 149 151 } 152 | Popular Tags |