1 19 20 package org.netbeans.modules.j2ee.ejbjarproject.ui.customizer; 21 22 import java.io.File ; 23 import java.io.IOException ; 24 import java.util.*; 25 import java.util.List ; 26 import java.awt.*; 27 import javax.swing.ButtonModel ; 28 import javax.swing.DefaultListModel ; 29 import javax.swing.JComponent ; 30 import javax.swing.JPanel ; 31 import javax.swing.ListCellRenderer ; 32 import javax.swing.event.DocumentEvent ; 33 import javax.swing.event.DocumentListener ; 34 import javax.swing.event.ListDataEvent ; 35 import javax.swing.event.ListDataListener ; 36 import javax.swing.text.Document ; 37 import org.netbeans.api.java.platform.JavaPlatform; 38 import org.netbeans.api.java.platform.JavaPlatformManager; 39 import org.netbeans.api.java.platform.Specification; 40 import org.netbeans.api.project.ant.AntArtifact; 41 import org.netbeans.spi.project.support.ant.AntProjectHelper; 42 import org.netbeans.spi.project.support.ant.PropertyUtils; 43 import org.openide.DialogDisplayer; 44 import org.openide.NotifyDescriptor; 45 import org.openide.ErrorManager; 46 import org.openide.awt.Mnemonics; 47 48 import org.openide.filesystems.Repository; 49 import org.openide.loaders.DataObject; 50 import org.openide.loaders.TemplateWizard; 51 import org.openide.loaders.DataFolder; 52 import org.openide.loaders.DataObjectNotFoundException; 53 import org.openide.util.HelpCtx; 54 55 59 public class CustomizerCompile extends JPanel implements HelpCtx.Provider { 60 61 62 public CustomizerCompile( EjbJarProjectProperties uiProperties ) { 63 initComponents(); 64 65 uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() ); 66 jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL ); 67 uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() ); 68 jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL ); 69 additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL ); 70 } 71 72 public HelpCtx getHelpCtx() { 73 return new HelpCtx( CustomizerCompile.class ); 74 } 75 76 77 82 private void initComponents() { 84 java.awt.GridBagConstraints gridBagConstraints; 85 86 jCheckBoxDebugInfo = new javax.swing.JCheckBox (); 87 jCheckBoxDeprecation = new javax.swing.JCheckBox (); 88 additionalJavacParamsJLabel = new javax.swing.JLabel (); 89 additionalJavacParamsJTextField = new javax.swing.JTextField (); 90 additionalJavacParamsExampleJLabel = new javax.swing.JLabel (); 91 92 setLayout(new java.awt.GridBagLayout ()); 93 94 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxDebugInfo, org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "LBL_CustomizeCompile_Compiler_DebugInfo_JCheckBox")); 95 jCheckBoxDebugInfo.setMargin(new java.awt.Insets (0, 0, 0, 0)); 96 gridBagConstraints = new java.awt.GridBagConstraints (); 97 gridBagConstraints.gridx = 0; 98 gridBagConstraints.gridy = 0; 99 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 100 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 101 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 102 add(jCheckBoxDebugInfo, gridBagConstraints); 103 jCheckBoxDebugInfo.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "ACSD_CustomizerCompile_jCheckBoxDebugInfo")); 104 105 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxDeprecation, org.openide.util.NbBundle.getBundle(CustomizerCompile.class).getString("LBL_CustomizeCompile_Compiler_Deprecation_JCheckBox")); 106 jCheckBoxDeprecation.setMargin(new java.awt.Insets (0, 0, 0, 0)); 107 gridBagConstraints = new java.awt.GridBagConstraints (); 108 gridBagConstraints.gridx = 0; 109 gridBagConstraints.gridy = 1; 110 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 111 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 112 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 113 add(jCheckBoxDeprecation, gridBagConstraints); 114 jCheckBoxDeprecation.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "ACSD_CustomizerCompile_jCheckBoxDeprecation")); 115 116 additionalJavacParamsJLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"MNE_AdditionalCompilerOptions").charAt(0)); 117 additionalJavacParamsJLabel.setLabelFor(additionalJavacParamsJTextField); 118 org.openide.awt.Mnemonics.setLocalizedText(additionalJavacParamsJLabel, org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "LBL_AdditionalCompilerOptions")); 119 gridBagConstraints = new java.awt.GridBagConstraints (); 120 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 121 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 12); 122 add(additionalJavacParamsJLabel, gridBagConstraints); 123 124 gridBagConstraints = new java.awt.GridBagConstraints (); 125 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 126 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 127 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 128 gridBagConstraints.weightx = 1.0; 129 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 130 add(additionalJavacParamsJTextField, gridBagConstraints); 131 additionalJavacParamsJTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"AD_AdditionalCompilerOptions")); 132 133 org.openide.awt.Mnemonics.setLocalizedText(additionalJavacParamsExampleJLabel, org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "LBL_AdditionalCompilerOptionsExample")); 134 gridBagConstraints = new java.awt.GridBagConstraints (); 135 gridBagConstraints.gridx = 1; 136 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 137 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 138 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 139 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 140 gridBagConstraints.weighty = 1.0; 141 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 142 add(additionalJavacParamsExampleJLabel, gridBagConstraints); 143 144 } 145 147 148 private javax.swing.JLabel additionalJavacParamsExampleJLabel; 150 private javax.swing.JLabel additionalJavacParamsJLabel; 151 private javax.swing.JTextField additionalJavacParamsJTextField; 152 private javax.swing.JCheckBox jCheckBoxDebugInfo; 153 private javax.swing.JCheckBox jCheckBoxDeprecation; 154 156 157 158 } 159 | Popular Tags |