1 19 20 package org.netbeans.modules.j2ee.ejbjarproject.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.spi.project.support.ant.AntProjectHelper; 36 import org.netbeans.spi.project.support.ant.PropertyUtils; 37 import org.openide.DialogDisplayer; 38 import org.openide.NotifyDescriptor; 39 import org.openide.util.HelpCtx; 40 import org.openide.util.NbBundle; 41 42 46 public class CustomizerJar extends JPanel implements HelpCtx.Provider { 47 48 public CustomizerJar( EjbJarProjectProperties uiProperties ) { 49 initComponents(); 50 51 jTextFieldDistDir.setDocument( uiProperties.DIST_JAR_MODEL ); 52 jTextFieldExcludes.setDocument( uiProperties.BUILD_CLASSES_EXCLUDES_MODEL ); 53 54 uiProperties.JAR_COMPRESS_MODEL.setMnemonic( jCheckBoxCommpress.getMnemonic() ); 55 jCheckBoxCommpress.setModel( uiProperties.JAR_COMPRESS_MODEL ); 56 } 57 58 public HelpCtx getHelpCtx() { 59 return new HelpCtx( CustomizerJar.class ); 60 } 61 62 63 68 private void initComponents() { 70 java.awt.GridBagConstraints gridBagConstraints; 71 72 jLabelDistDir = new javax.swing.JLabel (); 73 jTextFieldDistDir = new javax.swing.JTextField (); 74 jLabel2 = new javax.swing.JLabel (); 75 jTextFieldExcludes = new javax.swing.JTextField (); 76 jCheckBoxCommpress = new javax.swing.JCheckBox (); 77 excludeMessage = new javax.swing.JLabel (); 78 79 setLayout(new java.awt.GridBagLayout ()); 80 81 jLabelDistDir.setLabelFor(jTextFieldDistDir); 82 org.openide.awt.Mnemonics.setLocalizedText(jLabelDistDir, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_DistDir_JTextField")); 83 gridBagConstraints = new java.awt.GridBagConstraints (); 84 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 85 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 12); 86 add(jLabelDistDir, gridBagConstraints); 87 88 jTextFieldDistDir.setEditable(false); 89 gridBagConstraints = new java.awt.GridBagConstraints (); 90 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 91 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 92 gridBagConstraints.weightx = 1.0; 93 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 94 add(jTextFieldDistDir, gridBagConstraints); 95 jTextFieldDistDir.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jTextFieldDistDir")); 96 97 jLabel2.setLabelFor(jTextFieldExcludes); 98 org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_Excludes_JTextField")); 99 gridBagConstraints = new java.awt.GridBagConstraints (); 100 gridBagConstraints.gridx = 0; 101 gridBagConstraints.gridy = 1; 102 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 103 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 12); 104 add(jLabel2, gridBagConstraints); 105 106 gridBagConstraints = new java.awt.GridBagConstraints (); 107 gridBagConstraints.gridx = 1; 108 gridBagConstraints.gridy = 1; 109 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 110 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 111 gridBagConstraints.weightx = 1.0; 112 add(jTextFieldExcludes, gridBagConstraints); 113 jTextFieldExcludes.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jTextFieldExcludes")); 114 115 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxCommpress, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_Commpres_JCheckBox")); 116 gridBagConstraints = new java.awt.GridBagConstraints (); 117 gridBagConstraints.gridx = 0; 118 gridBagConstraints.gridy = 3; 119 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 120 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 121 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 122 gridBagConstraints.weighty = 1.0; 123 add(jCheckBoxCommpress, gridBagConstraints); 124 jCheckBoxCommpress.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getBundle(CustomizerJar.class).getString("AD_jCheckBoxCompress")); 125 126 excludeMessage.setLabelFor(jTextFieldExcludes); 127 org.openide.awt.Mnemonics.setLocalizedText(excludeMessage, org.openide.util.NbBundle.getMessage(CustomizerJar.class, "LBL_CustomizeJar_ExcludeMessage_JLabel")); 128 gridBagConstraints = new java.awt.GridBagConstraints (); 129 gridBagConstraints.gridx = 1; 130 gridBagConstraints.gridy = 2; 131 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 132 add(excludeMessage, gridBagConstraints); 133 134 } 135 137 138 private javax.swing.JLabel excludeMessage; 140 private javax.swing.JCheckBox jCheckBoxCommpress; 141 private javax.swing.JLabel jLabel2; 142 private javax.swing.JLabel jLabelDistDir; 143 private javax.swing.JTextField jTextFieldDistDir; 144 private javax.swing.JTextField jTextFieldExcludes; 145 147 } 148 | Popular Tags |