1 19 20 package org.netbeans.modules.java.j2seproject.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( J2SEProjectProperties uiProperties ) { 63 initComponents(); 64 65 uiProperties.JAVAC_DEPRECATION_MODEL.setMnemonic( jCheckBoxDeprecation.getMnemonic() ); 66 jCheckBoxDeprecation.setModel( uiProperties.JAVAC_DEPRECATION_MODEL ); 67 68 uiProperties.JAVAC_DEBUG_MODEL.setMnemonic( jCheckBoxDebugInfo.getMnemonic() ); 69 jCheckBoxDebugInfo.setModel( uiProperties.JAVAC_DEBUG_MODEL ); 70 71 additionalJavacParamsJTextField.setDocument( uiProperties.JAVAC_COMPILER_ARG_MODEL ); 72 73 } 74 75 public HelpCtx getHelpCtx() { 76 return new HelpCtx( CustomizerCompile.class ); 77 } 78 79 80 85 private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; 87 88 jCheckBoxDebugInfo = new javax.swing.JCheckBox (); 89 jCheckBoxDeprecation = new javax.swing.JCheckBox (); 90 additionalJavacParamsJLabel = new javax.swing.JLabel (); 91 additionalJavacParamsJTextField = new javax.swing.JTextField (); 92 additionalJavacParamsExampleJLabel = new javax.swing.JLabel (); 93 94 setLayout(new java.awt.GridBagLayout ()); 95 96 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxDebugInfo, org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "LBL_CustomizeCompile_Compiler_DebugInfo_JCheckBox")); 97 jCheckBoxDebugInfo.setMargin(new java.awt.Insets (0, 0, 0, 0)); 98 gridBagConstraints = new java.awt.GridBagConstraints (); 99 gridBagConstraints.gridx = 0; 100 gridBagConstraints.gridy = 0; 101 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 102 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 103 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 104 add(jCheckBoxDebugInfo, gridBagConstraints); 105 jCheckBoxDebugInfo.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "ACSD_CustomizerCompile_jCheckBoxDebugInfo")); 106 107 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxDeprecation, org.openide.util.NbBundle.getBundle(CustomizerCompile.class).getString("LBL_CustomizeCompile_Compiler_Deprecation_JCheckBox")); 108 jCheckBoxDeprecation.setMargin(new java.awt.Insets (0, 0, 0, 0)); 109 gridBagConstraints = new java.awt.GridBagConstraints (); 110 gridBagConstraints.gridx = 0; 111 gridBagConstraints.gridy = 1; 112 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 113 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 114 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 115 add(jCheckBoxDeprecation, gridBagConstraints); 116 jCheckBoxDeprecation.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CustomizerCompile.class, "ACSD_CustomizerCompile_jCheckBoxDeprecation")); 117 118 additionalJavacParamsJLabel.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"MNE_AdditionalCompilerOptions").charAt(0)); 119 additionalJavacParamsJLabel.setLabelFor(additionalJavacParamsJTextField); 120 additionalJavacParamsJLabel.setText(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"LBL_AdditionalCompilerOptions")); 121 gridBagConstraints = new java.awt.GridBagConstraints (); 122 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 123 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 12); 124 add(additionalJavacParamsJLabel, gridBagConstraints); 125 126 gridBagConstraints = new java.awt.GridBagConstraints (); 127 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 128 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 129 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 130 gridBagConstraints.weightx = 1.0; 131 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 132 add(additionalJavacParamsJTextField, gridBagConstraints); 133 additionalJavacParamsJTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"AD_AdditionalCompilerOptions")); 134 135 additionalJavacParamsExampleJLabel.setText(org.openide.util.NbBundle.getMessage (CustomizerCompile.class,"LBL_AdditionalCompilerOptionsExample")); 136 gridBagConstraints = new java.awt.GridBagConstraints (); 137 gridBagConstraints.gridx = 1; 138 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 139 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 140 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 141 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 142 gridBagConstraints.weighty = 1.0; 143 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 144 add(additionalJavacParamsExampleJLabel, gridBagConstraints); 145 146 } 148 149 private javax.swing.JLabel additionalJavacParamsExampleJLabel; 151 private javax.swing.JLabel additionalJavacParamsJLabel; 152 private javax.swing.JTextField additionalJavacParamsJTextField; 153 private javax.swing.JCheckBox jCheckBoxDebugInfo; 154 private javax.swing.JCheckBox jCheckBoxDeprecation; 155 157 158 159 } 160 | Popular Tags |