1 19 20 package org.netbeans.modules.j2ee.earproject.ui.customizer; 21 22 import javax.swing.JPanel ; 23 import org.openide.util.HelpCtx; 24 25 29 public class CustomizerJavadoc extends JPanel implements ArchiveCustomizerPanel, HelpCtx.Provider { 30 31 private VisualPropertySupport vps; 32 33 34 public CustomizerJavadoc(EarProjectProperties webProperties) { 35 initComponents(); 36 37 vps = new VisualPropertySupport(webProperties); 38 } 39 40 41 public void initValues() { 42 vps.register( jCheckBoxPrivate, EarProjectProperties.JAVADOC_PRIVATE ); 43 vps.register( jCheckBoxTree, EarProjectProperties.JAVADOC_NO_TREE ); 44 vps.register( jCheckBoxUsages, EarProjectProperties.JAVADOC_USE ); 45 vps.register( jCheckBoxNavigation, EarProjectProperties.JAVADOC_NO_NAVBAR ); 46 vps.register( jCheckBoxIndex, EarProjectProperties.JAVADOC_NO_INDEX ); 47 vps.register( jCheckBoxSplitIndex, EarProjectProperties.JAVADOC_SPLIT_INDEX ); 48 vps.register( jCheckBoxAuthor, EarProjectProperties.JAVADOC_AUTHOR ); 49 vps.register( jCheckBoxVersion, EarProjectProperties.JAVADOC_VERSION ); 50 vps.register( jTextFieldWinTitle, EarProjectProperties.JAVADOC_WINDOW_TITLE ); 51 vps.register( jCheckBoxPreview, EarProjectProperties.JAVADOC_PREVIEW ); 53 54 reenableSplitIndex( null ); 55 56 remove( jLabelPackage ); 58 remove( jTextFieldPackage ); 59 remove( jButtonPackage ); 60 remove( jCheckBoxSubpackages ); 61 jPanel1.remove( jLabelEncoding ); 62 jPanel1.remove( jTextFieldEncoding ); 63 64 65 } 66 67 68 73 private void initComponents() { 75 java.awt.GridBagConstraints gridBagConstraints; 76 77 jLabelPackage = new javax.swing.JLabel (); 78 jTextFieldPackage = new javax.swing.JTextField (); 79 jButtonPackage = new javax.swing.JButton (); 80 jCheckBoxSubpackages = new javax.swing.JCheckBox (); 81 jCheckBoxPrivate = new javax.swing.JCheckBox (); 82 jLabelGenerate = new javax.swing.JLabel (); 83 jCheckBoxTree = new javax.swing.JCheckBox (); 84 jCheckBoxUsages = new javax.swing.JCheckBox (); 85 jCheckBoxNavigation = new javax.swing.JCheckBox (); 86 jCheckBoxIndex = new javax.swing.JCheckBox (); 87 jCheckBoxSplitIndex = new javax.swing.JCheckBox (); 88 jLabelTags = new javax.swing.JLabel (); 89 jCheckBoxAuthor = new javax.swing.JCheckBox (); 90 jCheckBoxVersion = new javax.swing.JCheckBox (); 91 jPanel1 = new javax.swing.JPanel (); 92 jLabelWinTitle = new javax.swing.JLabel (); 93 jTextFieldWinTitle = new javax.swing.JTextField (); 94 jLabelEncoding = new javax.swing.JLabel (); 95 jTextFieldEncoding = new javax.swing.JTextField (); 96 jCheckBoxPreview = new javax.swing.JCheckBox (); 97 98 setLayout(new java.awt.GridBagLayout ()); 99 100 setBorder(new javax.swing.border.CompoundBorder (new javax.swing.border.EtchedBorder (), new javax.swing.border.EmptyBorder (new java.awt.Insets (12, 12, 12, 12)))); 101 jLabelPackage.setLabelFor(jTextFieldPackage); 102 org.openide.awt.Mnemonics.setLocalizedText(jLabelPackage, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Package_JLabel")); 103 gridBagConstraints = new java.awt.GridBagConstraints (); 104 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 105 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 12); 106 add(jLabelPackage, gridBagConstraints); 107 108 gridBagConstraints = new java.awt.GridBagConstraints (); 109 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 110 gridBagConstraints.weightx = 1.0; 111 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 6); 112 add(jTextFieldPackage, gridBagConstraints); 113 114 org.openide.awt.Mnemonics.setLocalizedText(jButtonPackage, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Package_JButton")); 115 gridBagConstraints = new java.awt.GridBagConstraints (); 116 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 117 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 118 add(jButtonPackage, gridBagConstraints); 119 120 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxSubpackages, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Subpackages_JCheckBox")); 121 jCheckBoxSubpackages.setMargin(new java.awt.Insets (0, 0, 0, 2)); 122 gridBagConstraints = new java.awt.GridBagConstraints (); 123 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 124 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 125 gridBagConstraints.insets = new java.awt.Insets (0, 0, 5, 0); 126 add(jCheckBoxSubpackages, gridBagConstraints); 127 128 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxPrivate, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Private_JCheckBox")); 129 jCheckBoxPrivate.setMargin(new java.awt.Insets (0, 0, 0, 2)); 130 gridBagConstraints = new java.awt.GridBagConstraints (); 131 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 132 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 133 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 134 add(jCheckBoxPrivate, gridBagConstraints); 135 136 org.openide.awt.Mnemonics.setLocalizedText(jLabelGenerate, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Generate_JLabel")); 137 gridBagConstraints = new java.awt.GridBagConstraints (); 138 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 139 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 140 gridBagConstraints.insets = new java.awt.Insets (0, 0, 2, 0); 141 add(jLabelGenerate, gridBagConstraints); 142 143 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxTree, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Tree_JCheckBox")); 144 jCheckBoxTree.setMargin(new java.awt.Insets (0, 0, 0, 2)); 145 gridBagConstraints = new java.awt.GridBagConstraints (); 146 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 147 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 148 gridBagConstraints.insets = new java.awt.Insets (0, 20, 5, 0); 149 add(jCheckBoxTree, gridBagConstraints); 150 151 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxUsages, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Usages_JCheckBox")); 152 jCheckBoxUsages.setMargin(new java.awt.Insets (0, 0, 0, 2)); 153 gridBagConstraints = new java.awt.GridBagConstraints (); 154 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 155 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 156 gridBagConstraints.insets = new java.awt.Insets (0, 20, 5, 0); 157 add(jCheckBoxUsages, gridBagConstraints); 158 159 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxNavigation, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Navigation_JCheckBox")); 160 jCheckBoxNavigation.setMargin(new java.awt.Insets (0, 0, 0, 2)); 161 gridBagConstraints = new java.awt.GridBagConstraints (); 162 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 163 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 164 gridBagConstraints.insets = new java.awt.Insets (0, 20, 5, 0); 165 add(jCheckBoxNavigation, gridBagConstraints); 166 167 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxIndex, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Index_JCheckBox")); 168 jCheckBoxIndex.setMargin(new java.awt.Insets (0, 0, 0, 2)); 169 jCheckBoxIndex.addActionListener(new java.awt.event.ActionListener () { 170 public void actionPerformed(java.awt.event.ActionEvent evt) { 171 reenableSplitIndex(evt); 172 } 173 }); 174 175 gridBagConstraints = new java.awt.GridBagConstraints (); 176 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 177 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 178 gridBagConstraints.insets = new java.awt.Insets (0, 20, 5, 0); 179 add(jCheckBoxIndex, gridBagConstraints); 180 181 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxSplitIndex, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_SplitIndex_JCheckBox")); 182 jCheckBoxSplitIndex.setMargin(new java.awt.Insets (0, 0, 0, 2)); 183 gridBagConstraints = new java.awt.GridBagConstraints (); 184 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 185 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 186 gridBagConstraints.insets = new java.awt.Insets (0, 40, 12, 0); 187 add(jCheckBoxSplitIndex, gridBagConstraints); 188 189 org.openide.awt.Mnemonics.setLocalizedText(jLabelTags, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Tags_JLabel")); 190 gridBagConstraints = new java.awt.GridBagConstraints (); 191 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 192 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 193 gridBagConstraints.insets = new java.awt.Insets (0, 0, 2, 0); 194 add(jLabelTags, gridBagConstraints); 195 196 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxAuthor, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Author_JCheckBox")); 197 jCheckBoxAuthor.setMargin(new java.awt.Insets (0, 0, 0, 2)); 198 gridBagConstraints = new java.awt.GridBagConstraints (); 199 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 200 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 201 gridBagConstraints.insets = new java.awt.Insets (0, 20, 5, 0); 202 add(jCheckBoxAuthor, gridBagConstraints); 203 204 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxVersion, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Version_JCheckBox")); 205 jCheckBoxVersion.setMargin(new java.awt.Insets (0, 0, 0, 2)); 206 gridBagConstraints = new java.awt.GridBagConstraints (); 207 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 208 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 209 gridBagConstraints.insets = new java.awt.Insets (0, 20, 12, 0); 210 add(jCheckBoxVersion, gridBagConstraints); 211 212 jPanel1.setLayout(new java.awt.GridBagLayout ()); 213 214 org.openide.awt.Mnemonics.setLocalizedText(jLabelWinTitle, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_WinTitle_JLabel")); 215 gridBagConstraints = new java.awt.GridBagConstraints (); 216 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 217 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 6); 218 jPanel1.add(jLabelWinTitle, gridBagConstraints); 219 220 gridBagConstraints = new java.awt.GridBagConstraints (); 221 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 222 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 223 gridBagConstraints.weightx = 1.0; 224 gridBagConstraints.insets = new java.awt.Insets (0, 0, 12, 0); 225 jPanel1.add(jTextFieldWinTitle, gridBagConstraints); 226 227 org.openide.awt.Mnemonics.setLocalizedText(jLabelEncoding, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Encoding_JLabel")); 228 gridBagConstraints = new java.awt.GridBagConstraints (); 229 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 230 gridBagConstraints.insets = new java.awt.Insets (0, 0, 0, 6); 231 jPanel1.add(jLabelEncoding, gridBagConstraints); 232 233 jTextFieldEncoding.setMinimumSize(new java.awt.Dimension (150, 22)); 234 jTextFieldEncoding.setPreferredSize(new java.awt.Dimension (150, 22)); 235 gridBagConstraints = new java.awt.GridBagConstraints (); 236 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 237 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 238 gridBagConstraints.weightx = 1.0; 239 jPanel1.add(jTextFieldEncoding, gridBagConstraints); 240 241 gridBagConstraints = new java.awt.GridBagConstraints (); 242 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 243 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 244 gridBagConstraints.weightx = 1.0; 245 add(jPanel1, gridBagConstraints); 246 247 org.openide.awt.Mnemonics.setLocalizedText(jCheckBoxPreview, org.openide.util.NbBundle.getMessage(CustomizerJavadoc.class, "LBL_CustomizeJavadoc_Preview_JCheckBox")); 248 jCheckBoxPreview.setMargin(new java.awt.Insets (0, 0, 0, 2)); 249 gridBagConstraints = new java.awt.GridBagConstraints (); 250 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 251 gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; 252 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 253 gridBagConstraints.weighty = 1.0; 254 add(jCheckBoxPreview, gridBagConstraints); 255 256 } 257 259 private void reenableSplitIndex(java.awt.event.ActionEvent evt) { jCheckBoxSplitIndex.setEnabled( jCheckBoxIndex.isSelected() ); 261 } 263 264 private javax.swing.JButton jButtonPackage; 266 private javax.swing.JCheckBox jCheckBoxAuthor; 267 private javax.swing.JCheckBox jCheckBoxIndex; 268 private javax.swing.JCheckBox jCheckBoxNavigation; 269 private javax.swing.JCheckBox jCheckBoxPreview; 270 private javax.swing.JCheckBox jCheckBoxPrivate; 271 private javax.swing.JCheckBox jCheckBoxSplitIndex; 272 private javax.swing.JCheckBox jCheckBoxSubpackages; 273 private javax.swing.JCheckBox jCheckBoxTree; 274 private javax.swing.JCheckBox jCheckBoxUsages; 275 private javax.swing.JCheckBox jCheckBoxVersion; 276 private javax.swing.JLabel jLabelEncoding; 277 private javax.swing.JLabel jLabelGenerate; 278 private javax.swing.JLabel jLabelPackage; 279 private javax.swing.JLabel jLabelTags; 280 private javax.swing.JLabel jLabelWinTitle; 281 private javax.swing.JPanel jPanel1; 282 private javax.swing.JTextField jTextFieldEncoding; 283 private javax.swing.JTextField jTextFieldPackage; 284 private javax.swing.JTextField jTextFieldWinTitle; 285 287 290 public HelpCtx getHelpCtx() { 291 return new HelpCtx(CustomizerJavadoc.class); 292 } 293 294 } 295 | Popular Tags |