1 19 20 package org.netbeans.modules.j2ee.ddloaders.multiview.ui; 21 22 import java.awt.Component ; 23 import java.awt.Container ; 24 import java.awt.FocusTraversalPolicy ; 25 import org.netbeans.modules.j2ee.ddloaders.multiview.Utils; 26 27 import javax.swing.*; 28 29 32 public class CmpRelationshipsForm extends javax.swing.JPanel { 33 34 37 public CmpRelationshipsForm() { 38 initComponents(); 39 errorLabel.setForeground(Utils.getErrorColor()); 40 org.netbeans.modules.xml.multiview.Utils.makeTextAreaLikeTextField(descriptionTextArea, 41 relationshipNameTextField); 42 } 43 44 public FocusTraversalPolicy createFocusTraversalPolicy() { 45 return new CustomFocusTraversalPolicy(); 46 } 47 48 54 private void initComponents() { 56 java.awt.GridBagConstraints gridBagConstraints; 57 58 multiplicityButtonGroup = new javax.swing.ButtonGroup (); 59 multiplicityButtonGroup2 = new javax.swing.ButtonGroup (); 60 jLabel1 = new javax.swing.JLabel (); 61 relationshipNameTextField = new javax.swing.JTextField (); 62 jLabel3 = new javax.swing.JLabel (); 63 descriptionTextArea = new javax.swing.JTextArea (); 64 jLabel4 = new javax.swing.JLabel (); 65 jLabel2 = new javax.swing.JLabel (); 66 roleNameTextField = new javax.swing.JTextField (); 67 jLabel14 = new javax.swing.JLabel (); 68 roleNameTextField2 = new javax.swing.JTextField (); 69 ejbComboBox = new javax.swing.JComboBox (); 70 jLabel12 = new javax.swing.JLabel (); 71 ejbComboBox2 = new javax.swing.JComboBox (); 72 jLabel5 = new javax.swing.JLabel (); 73 multiplicityOneRadioButton = new javax.swing.JRadioButton (); 74 multiplicityManyRadioButton = new javax.swing.JRadioButton (); 75 jLabel13 = new javax.swing.JLabel (); 76 multiplicityOneRadioButton2 = new javax.swing.JRadioButton (); 77 multiplicityManyRadioButton2 = new javax.swing.JRadioButton (); 78 cascadeDeleteCheckBox = new javax.swing.JCheckBox (); 79 cascadeDeleteCheckBox2 = new javax.swing.JCheckBox (); 80 createCmrFieldCheckBox = new javax.swing.JCheckBox (); 81 createCmrFieldCheckBox2 = new javax.swing.JCheckBox (); 82 jLabel6 = new javax.swing.JLabel (); 83 fieldNameTextField = new javax.swing.JTextField (); 84 jLabel9 = new javax.swing.JLabel (); 85 fieldNameTextField2 = new javax.swing.JTextField (); 86 jLabel7 = new javax.swing.JLabel (); 87 fieldTypeComboBox = new javax.swing.JComboBox (); 88 jLabel10 = new javax.swing.JLabel (); 89 fieldTypeComboBox2 = new javax.swing.JComboBox (); 90 jLabel8 = new javax.swing.JLabel (); 91 jLabel11 = new javax.swing.JLabel (); 92 getterCheckBox = new javax.swing.JCheckBox (); 93 getterCheckBox2 = new javax.swing.JCheckBox (); 94 setterCheckBox = new javax.swing.JCheckBox (); 95 setterCheckBox2 = new javax.swing.JCheckBox (); 96 errorLabel = new javax.swing.JLabel (); 97 98 setLayout(new java.awt.GridBagLayout ()); 99 100 getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "AddCmpRelationshipDialog_AD")); 101 jLabel1.setLabelFor(relationshipNameTextField); 102 org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_RelationshipName")); 103 gridBagConstraints = new java.awt.GridBagConstraints (); 104 gridBagConstraints.gridx = 0; 105 gridBagConstraints.gridy = 0; 106 gridBagConstraints.gridwidth = 2; 107 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 108 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 109 add(jLabel1, gridBagConstraints); 110 111 gridBagConstraints = new java.awt.GridBagConstraints (); 112 gridBagConstraints.gridx = 2; 113 gridBagConstraints.gridy = 0; 114 gridBagConstraints.gridwidth = 4; 115 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 116 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 117 add(relationshipNameTextField, gridBagConstraints); 118 relationshipNameTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "RelationshipName_AD")); 119 120 jLabel3.setLabelFor(descriptionTextArea); 121 jLabel3.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Description")); 122 gridBagConstraints = new java.awt.GridBagConstraints (); 123 gridBagConstraints.gridx = 0; 124 gridBagConstraints.gridy = 1; 125 gridBagConstraints.gridwidth = 2; 126 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 127 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; 128 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 129 add(jLabel3, gridBagConstraints); 130 131 descriptionTextArea.setLineWrap(true); 132 descriptionTextArea.setRows(3); 133 descriptionTextArea.setWrapStyleWord(true); 134 gridBagConstraints = new java.awt.GridBagConstraints (); 135 gridBagConstraints.gridx = 2; 136 gridBagConstraints.gridy = 1; 137 gridBagConstraints.gridwidth = 4; 138 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 139 gridBagConstraints.weighty = 1.0; 140 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 141 add(descriptionTextArea, gridBagConstraints); 142 descriptionTextArea.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Description_AN")); 143 descriptionTextArea.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Description_AD")); 144 145 jLabel4.setLabelFor(ejbComboBox); 146 org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_EntityBean_1")); 147 gridBagConstraints = new java.awt.GridBagConstraints (); 148 gridBagConstraints.gridx = 0; 149 gridBagConstraints.gridy = 2; 150 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 151 gridBagConstraints.insets = new java.awt.Insets (15, 12, 0, 5); 152 add(jLabel4, gridBagConstraints); 153 154 jLabel2.setLabelFor(roleNameTextField); 155 jLabel2.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_RoleName")); 156 gridBagConstraints = new java.awt.GridBagConstraints (); 157 gridBagConstraints.gridx = 0; 158 gridBagConstraints.gridy = 3; 159 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 160 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 161 add(jLabel2, gridBagConstraints); 162 163 gridBagConstraints = new java.awt.GridBagConstraints (); 164 gridBagConstraints.gridx = 1; 165 gridBagConstraints.gridy = 3; 166 gridBagConstraints.gridwidth = 2; 167 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 168 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 169 add(roleNameTextField, gridBagConstraints); 170 roleNameTextField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "RoleName_AN_1")); 171 roleNameTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "RoleName_AD_1")); 172 173 jLabel14.setLabelFor(roleNameTextField2); 174 jLabel14.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_RoleName")); 175 gridBagConstraints = new java.awt.GridBagConstraints (); 176 gridBagConstraints.gridx = 3; 177 gridBagConstraints.gridy = 3; 178 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 179 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 180 add(jLabel14, gridBagConstraints); 181 182 gridBagConstraints = new java.awt.GridBagConstraints (); 183 gridBagConstraints.gridx = 4; 184 gridBagConstraints.gridy = 3; 185 gridBagConstraints.gridwidth = 2; 186 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 187 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 188 add(roleNameTextField2, gridBagConstraints); 189 roleNameTextField2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "RoleName_AN_2")); 190 roleNameTextField2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "RoleName_AD_2")); 191 192 gridBagConstraints = new java.awt.GridBagConstraints (); 193 gridBagConstraints.gridx = 1; 194 gridBagConstraints.gridy = 2; 195 gridBagConstraints.gridwidth = 2; 196 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 197 gridBagConstraints.weightx = 1.0; 198 gridBagConstraints.insets = new java.awt.Insets (15, 5, 0, 12); 199 add(ejbComboBox, gridBagConstraints); 200 ejbComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "EntityBean_AN_1")); 201 ejbComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "EntityBean_AD_1")); 202 203 jLabel12.setLabelFor(ejbComboBox2); 204 org.openide.awt.Mnemonics.setLocalizedText(jLabel12, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_EntityBean_2")); 205 gridBagConstraints = new java.awt.GridBagConstraints (); 206 gridBagConstraints.gridx = 3; 207 gridBagConstraints.gridy = 2; 208 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 209 gridBagConstraints.insets = new java.awt.Insets (15, 12, 0, 5); 210 add(jLabel12, gridBagConstraints); 211 212 gridBagConstraints = new java.awt.GridBagConstraints (); 213 gridBagConstraints.gridx = 4; 214 gridBagConstraints.gridy = 2; 215 gridBagConstraints.gridwidth = 2; 216 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 217 gridBagConstraints.weightx = 1.0; 218 gridBagConstraints.insets = new java.awt.Insets (15, 5, 0, 12); 219 add(ejbComboBox2, gridBagConstraints); 220 ejbComboBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "EntityBean_AN_2")); 221 ejbComboBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "EntityBean_AD_2")); 222 223 jLabel5.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Multiplicity")); 224 gridBagConstraints = new java.awt.GridBagConstraints (); 225 gridBagConstraints.gridx = 0; 226 gridBagConstraints.gridy = 4; 227 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 228 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 229 add(jLabel5, gridBagConstraints); 230 231 multiplicityButtonGroup.add(multiplicityOneRadioButton); 232 multiplicityOneRadioButton.setSelected(true); 233 org.openide.awt.Mnemonics.setLocalizedText(multiplicityOneRadioButton, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_One_1")); 234 gridBagConstraints = new java.awt.GridBagConstraints (); 235 gridBagConstraints.gridx = 1; 236 gridBagConstraints.gridy = 4; 237 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 238 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 5); 239 add(multiplicityOneRadioButton, gridBagConstraints); 240 multiplicityOneRadioButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "One_AN_1")); 241 multiplicityOneRadioButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "One_AD_1")); 242 243 multiplicityButtonGroup.add(multiplicityManyRadioButton); 244 org.openide.awt.Mnemonics.setLocalizedText(multiplicityManyRadioButton, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Many_1")); 245 gridBagConstraints = new java.awt.GridBagConstraints (); 246 gridBagConstraints.gridx = 2; 247 gridBagConstraints.gridy = 4; 248 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 249 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 250 add(multiplicityManyRadioButton, gridBagConstraints); 251 multiplicityManyRadioButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Many_AN_1")); 252 multiplicityManyRadioButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Many_AD_1")); 253 254 jLabel13.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Multiplicity")); 255 gridBagConstraints = new java.awt.GridBagConstraints (); 256 gridBagConstraints.gridx = 3; 257 gridBagConstraints.gridy = 4; 258 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 259 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 260 add(jLabel13, gridBagConstraints); 261 262 multiplicityButtonGroup2.add(multiplicityOneRadioButton2); 263 multiplicityOneRadioButton2.setSelected(true); 264 org.openide.awt.Mnemonics.setLocalizedText(multiplicityOneRadioButton2, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_One_2")); 265 gridBagConstraints = new java.awt.GridBagConstraints (); 266 gridBagConstraints.gridx = 4; 267 gridBagConstraints.gridy = 4; 268 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 269 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 5); 270 add(multiplicityOneRadioButton2, gridBagConstraints); 271 multiplicityOneRadioButton2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "One_AN_2")); 272 multiplicityOneRadioButton2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "One_AD_2")); 273 274 multiplicityButtonGroup2.add(multiplicityManyRadioButton2); 275 org.openide.awt.Mnemonics.setLocalizedText(multiplicityManyRadioButton2, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Many_2")); 276 gridBagConstraints = new java.awt.GridBagConstraints (); 277 gridBagConstraints.gridx = 5; 278 gridBagConstraints.gridy = 4; 279 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 280 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 281 add(multiplicityManyRadioButton2, gridBagConstraints); 282 multiplicityManyRadioButton2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Many_AN_2")); 283 multiplicityManyRadioButton2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Many_AD_2")); 284 285 org.openide.awt.Mnemonics.setLocalizedText(cascadeDeleteCheckBox, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_CascadeDelete_1")); 286 gridBagConstraints = new java.awt.GridBagConstraints (); 287 gridBagConstraints.gridx = 0; 288 gridBagConstraints.gridy = 5; 289 gridBagConstraints.gridwidth = 3; 290 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 291 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 292 add(cascadeDeleteCheckBox, gridBagConstraints); 293 cascadeDeleteCheckBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CascadeDelete_AN_1")); 294 cascadeDeleteCheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CascadeDelete_AD_1")); 295 296 org.openide.awt.Mnemonics.setLocalizedText(cascadeDeleteCheckBox2, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_CascadeDelete_2")); 297 gridBagConstraints = new java.awt.GridBagConstraints (); 298 gridBagConstraints.gridx = 3; 299 gridBagConstraints.gridy = 5; 300 gridBagConstraints.gridwidth = 3; 301 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 302 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 303 add(cascadeDeleteCheckBox2, gridBagConstraints); 304 cascadeDeleteCheckBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CascadeDelete_AN_2")); 305 cascadeDeleteCheckBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CascadeDelete_AD_2")); 306 307 org.openide.awt.Mnemonics.setLocalizedText(createCmrFieldCheckBox, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_CreateCMRField_1")); 308 gridBagConstraints = new java.awt.GridBagConstraints (); 309 gridBagConstraints.gridx = 0; 310 gridBagConstraints.gridy = 6; 311 gridBagConstraints.gridwidth = 3; 312 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 313 gridBagConstraints.insets = new java.awt.Insets (15, 12, 0, 12); 314 add(createCmrFieldCheckBox, gridBagConstraints); 315 createCmrFieldCheckBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CreateCMRField_AN_1")); 316 createCmrFieldCheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CreateCMRField_AD_1")); 317 318 org.openide.awt.Mnemonics.setLocalizedText(createCmrFieldCheckBox2, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_CreateCMRField_2")); 319 gridBagConstraints = new java.awt.GridBagConstraints (); 320 gridBagConstraints.gridx = 3; 321 gridBagConstraints.gridy = 6; 322 gridBagConstraints.gridwidth = 3; 323 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 324 gridBagConstraints.insets = new java.awt.Insets (15, 12, 0, 12); 325 add(createCmrFieldCheckBox2, gridBagConstraints); 326 createCmrFieldCheckBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CreateCMRField_AN_2")); 327 createCmrFieldCheckBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "CreateCMRField_AD_2")); 328 329 jLabel6.setLabelFor(fieldNameTextField); 330 org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_FieldName_1")); 331 gridBagConstraints = new java.awt.GridBagConstraints (); 332 gridBagConstraints.gridx = 0; 333 gridBagConstraints.gridy = 7; 334 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 335 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 336 add(jLabel6, gridBagConstraints); 337 338 gridBagConstraints = new java.awt.GridBagConstraints (); 339 gridBagConstraints.gridx = 1; 340 gridBagConstraints.gridy = 7; 341 gridBagConstraints.gridwidth = 2; 342 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 343 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 344 add(fieldNameTextField, gridBagConstraints); 345 fieldNameTextField.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldName_AN_1")); 346 fieldNameTextField.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldName_AD_1")); 347 348 jLabel9.setLabelFor(fieldNameTextField2); 349 org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_FieldName_2")); 350 gridBagConstraints = new java.awt.GridBagConstraints (); 351 gridBagConstraints.gridx = 3; 352 gridBagConstraints.gridy = 7; 353 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 354 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 355 add(jLabel9, gridBagConstraints); 356 357 gridBagConstraints = new java.awt.GridBagConstraints (); 358 gridBagConstraints.gridx = 4; 359 gridBagConstraints.gridy = 7; 360 gridBagConstraints.gridwidth = 2; 361 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 362 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 363 add(fieldNameTextField2, gridBagConstraints); 364 fieldNameTextField2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldName_AN_2")); 365 fieldNameTextField2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldName_AD_2")); 366 367 jLabel7.setLabelFor(fieldTypeComboBox); 368 jLabel7.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_FieldType")); 369 gridBagConstraints = new java.awt.GridBagConstraints (); 370 gridBagConstraints.gridx = 0; 371 gridBagConstraints.gridy = 8; 372 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 373 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 374 add(jLabel7, gridBagConstraints); 375 376 gridBagConstraints = new java.awt.GridBagConstraints (); 377 gridBagConstraints.gridx = 1; 378 gridBagConstraints.gridy = 8; 379 gridBagConstraints.gridwidth = 2; 380 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 381 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 382 add(fieldTypeComboBox, gridBagConstraints); 383 fieldTypeComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldType_AN_1")); 384 fieldTypeComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldType_AD_1")); 385 386 jLabel10.setLabelFor(fieldTypeComboBox2); 387 jLabel10.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_FieldType")); 388 gridBagConstraints = new java.awt.GridBagConstraints (); 389 gridBagConstraints.gridx = 3; 390 gridBagConstraints.gridy = 8; 391 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 392 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 393 add(jLabel10, gridBagConstraints); 394 395 gridBagConstraints = new java.awt.GridBagConstraints (); 396 gridBagConstraints.gridx = 4; 397 gridBagConstraints.gridy = 8; 398 gridBagConstraints.gridwidth = 2; 399 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 400 gridBagConstraints.insets = new java.awt.Insets (5, 5, 0, 12); 401 add(fieldTypeComboBox2, gridBagConstraints); 402 fieldTypeComboBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldType_AN_2")); 403 fieldTypeComboBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "FieldType_AD_2")); 404 405 jLabel8.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_AddToLocalInterfaceColon")); 406 gridBagConstraints = new java.awt.GridBagConstraints (); 407 gridBagConstraints.gridx = 0; 408 gridBagConstraints.gridy = 9; 409 gridBagConstraints.gridwidth = 3; 410 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 411 gridBagConstraints.insets = new java.awt.Insets (15, 12, 0, 12); 412 add(jLabel8, gridBagConstraints); 413 414 jLabel11.setText(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_AddToLocalInterfaceColon")); 415 gridBagConstraints = new java.awt.GridBagConstraints (); 416 gridBagConstraints.gridx = 3; 417 gridBagConstraints.gridy = 9; 418 gridBagConstraints.gridwidth = 3; 419 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 420 gridBagConstraints.insets = new java.awt.Insets (15, 12, 0, 12); 421 add(jLabel11, gridBagConstraints); 422 423 getterCheckBox.setSelected(true); 424 org.openide.awt.Mnemonics.setLocalizedText(getterCheckBox, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Getter1")); 425 gridBagConstraints = new java.awt.GridBagConstraints (); 426 gridBagConstraints.gridx = 0; 427 gridBagConstraints.gridy = 10; 428 gridBagConstraints.gridwidth = 2; 429 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 430 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 431 add(getterCheckBox, gridBagConstraints); 432 getterCheckBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Getter_AN_1")); 433 getterCheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Getter_AD_1")); 434 435 getterCheckBox2.setSelected(true); 436 org.openide.awt.Mnemonics.setLocalizedText(getterCheckBox2, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Getter2")); 437 gridBagConstraints = new java.awt.GridBagConstraints (); 438 gridBagConstraints.gridx = 3; 439 gridBagConstraints.gridy = 10; 440 gridBagConstraints.gridwidth = 2; 441 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 442 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 443 add(getterCheckBox2, gridBagConstraints); 444 getterCheckBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Getter_AN_2")); 445 getterCheckBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Getter_AD_2")); 446 447 setterCheckBox.setSelected(true); 448 org.openide.awt.Mnemonics.setLocalizedText(setterCheckBox, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Setter1")); 449 gridBagConstraints = new java.awt.GridBagConstraints (); 450 gridBagConstraints.gridx = 0; 451 gridBagConstraints.gridy = 11; 452 gridBagConstraints.gridwidth = 2; 453 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 454 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 455 add(setterCheckBox, gridBagConstraints); 456 setterCheckBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Setter_AN_1")); 457 setterCheckBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Setter_AD_1")); 458 459 setterCheckBox2.setSelected(true); 460 org.openide.awt.Mnemonics.setLocalizedText(setterCheckBox2, org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "LBL_Setter2")); 461 gridBagConstraints = new java.awt.GridBagConstraints (); 462 gridBagConstraints.gridx = 3; 463 gridBagConstraints.gridy = 11; 464 gridBagConstraints.gridwidth = 2; 465 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 466 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 5); 467 add(setterCheckBox2, gridBagConstraints); 468 setterCheckBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Setter_AN_2")); 469 setterCheckBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CmpRelationshipsForm.class, "Setter_AD_2")); 470 471 errorLabel.setText(" "); 472 gridBagConstraints = new java.awt.GridBagConstraints (); 473 gridBagConstraints.gridx = 0; 474 gridBagConstraints.gridy = 12; 475 gridBagConstraints.gridwidth = 6; 476 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 477 gridBagConstraints.insets = new java.awt.Insets (5, 12, 0, 12); 478 add(errorLabel, gridBagConstraints); 479 480 } 481 483 497 final class CustomFocusTraversalPolicy extends LayoutFocusTraversalPolicy { 498 499 private final Component [] compList; 500 501 CustomFocusTraversalPolicy() { 502 super(); 503 504 compList = new Component [] { 506 relationshipNameTextField, 507 descriptionTextArea, 508 ejbComboBox, 509 roleNameTextField, 510 multiplicityOneRadioButton, 511 multiplicityManyRadioButton, 512 cascadeDeleteCheckBox, 513 createCmrFieldCheckBox, 514 fieldNameTextField, 515 fieldTypeComboBox, 516 getterCheckBox, 517 setterCheckBox, 518 ejbComboBox2, 519 roleNameTextField2, 520 multiplicityOneRadioButton2, 521 multiplicityManyRadioButton2, 522 cascadeDeleteCheckBox2, 523 createCmrFieldCheckBox2, 524 fieldNameTextField2, 525 fieldTypeComboBox2, 526 getterCheckBox2, 527 setterCheckBox2 528 }; 529 } 531 532 534 private int getIndex(Component c) { 535 for (int i = 0; i < compList.length; i++) { 536 if (compList[i] == c) { 537 return i; 538 } 539 } 540 return -1; 541 } 542 543 545 public Component getComponentBefore(Container focusCycleRoot, Component c) { 546 for (int i = getIndex(c); i > 0 && i < compList.length;) { 547 c = compList[--i]; 548 if (accept(c)) { 549 return c; 550 } 551 } 552 return super.getComponentBefore(focusCycleRoot, c); 553 } 554 555 557 public Component getComponentAfter(Container focusCycleRoot, Component c) { 558 for (int i = getIndex(c) + 1; i > 0 && i < compList.length; i++) { 559 c = compList[i]; 560 if (accept(c)) { 561 return c; 562 } 563 } 564 return super.getComponentAfter(focusCycleRoot, c); 565 } 566 } 567 568 private javax.swing.JCheckBox cascadeDeleteCheckBox; 570 private javax.swing.JCheckBox cascadeDeleteCheckBox2; 571 private javax.swing.JCheckBox createCmrFieldCheckBox; 572 private javax.swing.JCheckBox createCmrFieldCheckBox2; 573 private javax.swing.JTextArea descriptionTextArea; 574 private javax.swing.JComboBox ejbComboBox; 575 private javax.swing.JComboBox ejbComboBox2; 576 private javax.swing.JLabel errorLabel; 577 private javax.swing.JTextField fieldNameTextField; 578 private javax.swing.JTextField fieldNameTextField2; 579 private javax.swing.JComboBox fieldTypeComboBox; 580 private javax.swing.JComboBox fieldTypeComboBox2; 581 private javax.swing.JCheckBox getterCheckBox; 582 private javax.swing.JCheckBox getterCheckBox2; 583 private javax.swing.JLabel jLabel1; 584 private javax.swing.JLabel jLabel10; 585 private javax.swing.JLabel jLabel11; 586 private javax.swing.JLabel jLabel12; 587 private javax.swing.JLabel jLabel13; 588 private javax.swing.JLabel jLabel14; 589 private javax.swing.JLabel jLabel2; 590 private javax.swing.JLabel jLabel3; 591 private javax.swing.JLabel jLabel4; 592 private javax.swing.JLabel jLabel5; 593 private javax.swing.JLabel jLabel6; 594 private javax.swing.JLabel jLabel7; 595 private javax.swing.JLabel jLabel8; 596 private javax.swing.JLabel jLabel9; 597 private javax.swing.ButtonGroup multiplicityButtonGroup; 598 private javax.swing.ButtonGroup multiplicityButtonGroup2; 599 private javax.swing.JRadioButton multiplicityManyRadioButton; 600 private javax.swing.JRadioButton multiplicityManyRadioButton2; 601 private javax.swing.JRadioButton multiplicityOneRadioButton; 602 private javax.swing.JRadioButton multiplicityOneRadioButton2; 603 private javax.swing.JTextField relationshipNameTextField; 604 private javax.swing.JTextField roleNameTextField; 605 private javax.swing.JTextField roleNameTextField2; 606 private javax.swing.JCheckBox setterCheckBox; 607 private javax.swing.JCheckBox setterCheckBox2; 608 610 public JCheckBox getCascadeDeleteCheckBox2() { 611 return cascadeDeleteCheckBox2; 612 } 613 614 public JCheckBox getCascadeDeleteCheckBox() { 615 return cascadeDeleteCheckBox; 616 } 617 618 public JCheckBox getCreateCmrFieldCheckBox2() { 619 return createCmrFieldCheckBox2; 620 } 621 622 public JCheckBox getCreateCmrFieldCheckBox() { 623 return createCmrFieldCheckBox; 624 } 625 626 public JTextArea getDescriptionTextArea() { 627 return descriptionTextArea; 628 } 629 630 public JComboBox getEjbComboBox2() { 631 return ejbComboBox2; 632 } 633 634 public JComboBox getEjbComboBox() { 635 return ejbComboBox; 636 } 637 638 public JTextField getFieldNameTextField2() { 639 return fieldNameTextField2; 640 } 641 642 public JTextField getFieldNameTextField() { 643 return fieldNameTextField; 644 } 645 646 public JComboBox getFieldTypeComboBox2() { 647 return fieldTypeComboBox2; 648 } 649 650 public JComboBox getFieldTypeComboBox() { 651 return fieldTypeComboBox; 652 } 653 654 public JCheckBox getGetterCheckBox2() { 655 return getterCheckBox2; 656 } 657 658 public JCheckBox getGetterCheckBox() { 659 return getterCheckBox; 660 } 661 662 public ButtonGroup getMultiplicityButtonGroup2() { 663 return multiplicityButtonGroup2; 664 } 665 666 public ButtonGroup getMultiplicityButtonGroup() { 667 return multiplicityButtonGroup; 668 } 669 670 public JRadioButton getMultiplicityManyRadioButton2() { 671 return multiplicityManyRadioButton2; 672 } 673 674 public JRadioButton getMultiplicityManyRadioButton() { 675 return multiplicityManyRadioButton; 676 } 677 678 public JRadioButton getMultiplicityOneRadioButton2() { 679 return multiplicityOneRadioButton2; 680 } 681 682 public JRadioButton getMultiplicityOneRadioButton() { 683 return multiplicityOneRadioButton; 684 } 685 686 public JTextField getRelationshipNameTextField() { 687 return relationshipNameTextField; 688 } 689 690 public JCheckBox getSetterCheckBox2() { 691 return setterCheckBox2; 692 } 693 694 public JCheckBox getSetterCheckBox() { 695 return setterCheckBox; 696 } 697 698 public JLabel getErrorLabel() { 699 return errorLabel; 700 } 701 702 public JTextField getRoleNameTextField() { 703 return roleNameTextField; 704 } 705 706 public JTextField getRoleNameTextField2() { 707 return roleNameTextField2; 708 } 709 } 710 | Popular Tags |