1 19 20 package org.netbeans.modules.websvc.wsitconf.ui.service.profiles; 21 22 import javax.swing.JCheckBox ; 23 import javax.swing.JComboBox ; 24 import org.netbeans.modules.websvc.wsitconf.ui.ComboConstants; 25 import org.netbeans.modules.websvc.wsitconf.wsdlmodelext.AlgoSuiteModelHelper; 26 import org.netbeans.modules.websvc.wsitconf.wsdlmodelext.ProfilesModelHelper; 27 import org.netbeans.modules.websvc.wsitconf.wsdlmodelext.RMModelHelper; 28 import org.netbeans.modules.websvc.wsitconf.wsdlmodelext.SecurityPolicyModelHelper; 29 import org.netbeans.modules.websvc.wsitconf.wsdlmodelext.SecurityTokensModelHelper; 30 import org.netbeans.modules.websvc.wsitmodelext.policy.Policy; 31 import org.netbeans.modules.websvc.wsitmodelext.security.BootstrapPolicy; 32 import org.netbeans.modules.websvc.wsitmodelext.security.tokens.ProtectionToken; 33 import org.netbeans.modules.websvc.wsitmodelext.security.tokens.SecureConversationToken; 34 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 35 import org.netbeans.modules.xml.wsdl.model.WSDLModel; 36 37 41 public class STSIssuedEndorsing extends javax.swing.JPanel { 42 43 private boolean inSync = false; 44 45 private WSDLComponent comp; 46 private WSDLModel model; 47 48 51 public STSIssuedEndorsing(WSDLComponent comp) { 52 super(); 53 initComponents(); 54 this.model = comp.getModel(); 55 this.comp = comp; 56 57 inSync = true; 58 layoutCombo.removeAllItems(); 59 layoutCombo.addItem(ComboConstants.STRICT); 60 layoutCombo.addItem(ComboConstants.LAX); 61 layoutCombo.addItem(ComboConstants.LAXTSFIRST); 62 layoutCombo.addItem(ComboConstants.LAXTSLAST); 63 64 tokenTypeCombo.removeAllItems(); 65 tokenTypeCombo.addItem(ComboConstants.ISSUED_TOKENTYPE_SAML10); 66 tokenTypeCombo.addItem(ComboConstants.ISSUED_TOKENTYPE_SAML11); 67 tokenTypeCombo.addItem(ComboConstants.ISSUED_TOKENTYPE_SAML20); 68 69 keyTypeCombo.removeAllItems(); 70 keyTypeCombo.addItem(ComboConstants.ISSUED_KEYTYPE_SYMMETRIC); 71 keyTypeCombo.addItem(ComboConstants.ISSUED_KEYTYPE_PUBLIC); 72 73 keySizeCombo.removeAllItems(); 74 keySizeCombo.addItem(ComboConstants.ISSUED_KEYSIZE_128); 75 keySizeCombo.addItem(ComboConstants.ISSUED_KEYSIZE_192); 76 keySizeCombo.addItem(ComboConstants.ISSUED_KEYSIZE_256); 77 78 algoSuiteCombo.removeAllItems(); 79 algoSuiteCombo.addItem(ComboConstants.BASIC256); 80 algoSuiteCombo.addItem(ComboConstants.BASIC192); 81 algoSuiteCombo.addItem(ComboConstants.BASIC128); 82 algoSuiteCombo.addItem(ComboConstants.TRIPLEDES); 83 algoSuiteCombo.addItem(ComboConstants.BASIC256RSA15); 84 algoSuiteCombo.addItem(ComboConstants.BASIC192RSA15); 85 algoSuiteCombo.addItem(ComboConstants.BASIC128RSA15); 86 algoSuiteCombo.addItem(ComboConstants.TRIPLEDESRSA15); 87 96 inSync = false; 97 98 sync(); 99 } 100 101 private void sync() { 102 inSync = true; 103 104 WSDLComponent secBinding = null; 105 WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp); 106 WSDLComponent protTokenKind = SecurityTokensModelHelper.getTokenElement(topSecBinding, ProtectionToken.class); 107 WSDLComponent protToken = SecurityTokensModelHelper.getTokenTypeElement(protTokenKind); 108 109 boolean secConv = (protToken instanceof SecureConversationToken); 110 setChBox(secConvChBox, secConv); 111 112 if (secConv) { 113 WSDLComponent bootPolicy = SecurityTokensModelHelper.getTokenElement(protToken, BootstrapPolicy.class); 114 secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(bootPolicy); 115 Policy p = (Policy) secBinding.getParent(); 116 setChBox(derivedKeysChBox, SecurityPolicyModelHelper.isRequireDerivedKeys(protToken)); 117 setChBox(reqSigConfChBox, SecurityPolicyModelHelper.isRequireSignatureConfirmation(p)); 118 setChBox(encryptSignatureChBox, SecurityPolicyModelHelper.isEncryptSignature(bootPolicy)); 119 setChBox(encryptOrderChBox, SecurityPolicyModelHelper.isEncryptBeforeSigning(bootPolicy)); 120 } else { 121 secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp); 122 setChBox(reqSigConfChBox, SecurityPolicyModelHelper.isRequireSignatureConfirmation(comp)); 123 setChBox(encryptSignatureChBox, SecurityPolicyModelHelper.isEncryptSignature(comp)); 124 setChBox(encryptOrderChBox, SecurityPolicyModelHelper.isEncryptBeforeSigning(comp)); 125 } 126 127 WSDLComponent tokenKind = SecurityTokensModelHelper.getTokenElement(secBinding, ProtectionToken.class); 128 WSDLComponent token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind); 129 130 setChBox(reqDerivedKeys, SecurityPolicyModelHelper.isRequireDerivedKeys(token)); 131 132 setCombo(algoSuiteCombo, AlgoSuiteModelHelper.getAlgorithmSuite(secBinding)); 133 setCombo(layoutCombo, SecurityPolicyModelHelper.getMessageLayout(secBinding)); 134 135 if (secConv) { 136 tokenKind = SecurityTokensModelHelper.getSupportingToken(secBinding.getParent(), SecurityTokensModelHelper.ENDORSING); 137 } else { 138 tokenKind = SecurityTokensModelHelper.getSupportingToken(comp, SecurityTokensModelHelper.ENDORSING); 139 } 140 token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind); 141 142 setChBox(reqDerivedKeysIssued, SecurityPolicyModelHelper.isRequireDerivedKeys(token)); 143 144 setCombo(tokenTypeCombo, SecurityTokensModelHelper.getIssuedTokenType(token)); 145 setCombo(keyTypeCombo, SecurityTokensModelHelper.getIssuedKeyType(token)); 146 setCombo(keySizeCombo, SecurityTokensModelHelper.getIssuedKeySize(token)); 147 148 issuerAddressField.setText(SecurityTokensModelHelper.getIssuedIssuerAddress(token)); 149 issuerMetadataField.setText(SecurityTokensModelHelper.getIssuedIssuerMetadataAddress(token)); 150 151 enableDisable(); 152 153 inSync = false; 154 } 155 156 public void setValue(javax.swing.JComponent source) { 157 158 if (inSync) return; 159 160 WSDLComponent secBinding = null; 161 WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp); 162 WSDLComponent protTokenKind = SecurityTokensModelHelper.getTokenElement(topSecBinding, ProtectionToken.class); 163 WSDLComponent protToken = SecurityTokensModelHelper.getTokenTypeElement(protTokenKind); 164 165 boolean secConv = (protToken instanceof SecureConversationToken); 166 167 if (source.equals(secConvChBox)) { 168 ProfilesModelHelper.enableSecureConversation(comp, secConvChBox.isSelected(), ComboConstants.PROF_MSGAUTHSSL); 169 } 170 171 if (secConv) { 172 WSDLComponent bootPolicy = SecurityTokensModelHelper.getTokenElement(protToken, BootstrapPolicy.class); 173 secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(bootPolicy); 174 Policy p = (Policy) secBinding.getParent(); 175 if (source.equals(derivedKeysChBox)) { 176 SecurityPolicyModelHelper.enableRequireDerivedKeys(protToken, derivedKeysChBox.isSelected()); 177 } 178 if (source.equals(reqSigConfChBox)) { 179 SecurityPolicyModelHelper.enableRequireSignatureConfirmation( 180 SecurityPolicyModelHelper.getWss11(p), reqSigConfChBox.isSelected()); 181 } 182 } else { 183 secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp); 184 if (source.equals(reqSigConfChBox)) { 185 SecurityPolicyModelHelper.enableRequireSignatureConfirmation(SecurityPolicyModelHelper.getWss11(comp), reqSigConfChBox.isSelected()); 186 } 187 } 188 189 WSDLComponent tokenKind = SecurityTokensModelHelper.getTokenElement(secBinding, ProtectionToken.class); 190 WSDLComponent token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind); 191 192 if (source.equals(encryptSignatureChBox)) { 193 SecurityPolicyModelHelper.enableEncryptSignature(secBinding, encryptSignatureChBox.isSelected()); 194 if (secConv) { 195 SecurityPolicyModelHelper.enableEncryptSignature(topSecBinding, encryptSignatureChBox.isSelected()); 196 } 197 } 198 if (source.equals(encryptOrderChBox)) { 199 SecurityPolicyModelHelper.enableEncryptBeforeSigning(secBinding, encryptOrderChBox.isSelected()); 200 if (secConv) { 201 SecurityPolicyModelHelper.enableEncryptBeforeSigning(topSecBinding, encryptOrderChBox.isSelected()); 202 } 203 } 204 if (source.equals(layoutCombo)) { 205 SecurityPolicyModelHelper.setLayout(secBinding, (String ) layoutCombo.getSelectedItem()); 206 if (secConv) { 207 SecurityPolicyModelHelper.setLayout(topSecBinding, (String ) layoutCombo.getSelectedItem()); 208 } 209 } 210 if (source.equals(algoSuiteCombo)) { 211 AlgoSuiteModelHelper.setAlgorithmSuite(secBinding, (String ) algoSuiteCombo.getSelectedItem()); 212 if (secConv) { 213 AlgoSuiteModelHelper.setAlgorithmSuite(topSecBinding, (String ) algoSuiteCombo.getSelectedItem()); 214 } 215 } 216 if (source.equals(reqDerivedKeys)) { 217 SecurityPolicyModelHelper.enableRequireDerivedKeys(token, reqDerivedKeys.isSelected()); 218 return; 219 } 220 221 tokenKind = SecurityTokensModelHelper.getSupportingToken(secBinding.getParent(), SecurityTokensModelHelper.ENDORSING); 222 token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind); 223 224 if (source.equals(reqDerivedKeysIssued)) { 225 SecurityPolicyModelHelper.enableRequireDerivedKeys(token, reqDerivedKeysIssued.isSelected()); 226 return; 227 } 228 if (source.equals(tokenTypeCombo) || source.equals(keyTypeCombo) || source.equals(keySizeCombo)) { 229 SecurityTokensModelHelper.setIssuedTokenRSTAttributes(token, 230 (String )tokenTypeCombo.getSelectedItem(), 231 (String )keyTypeCombo.getSelectedItem(), 232 (String )keySizeCombo.getSelectedItem()); 233 } 234 235 if (source.equals(issuerAddressField) || source.equals(issuerMetadataField)) { 236 SecurityTokensModelHelper.setIssuedTokenAddressAttributes(token, 237 issuerAddressField.getText(), 238 issuerMetadataField.getText()); 239 } 240 241 enableDisable(); 242 } 243 244 private void enableDisable() { 245 boolean secConvEnabled = secConvChBox.isSelected(); 246 derivedKeysChBox.setEnabled(secConvEnabled); 247 boolean rmEnabled = RMModelHelper.isRMEnabled(comp); 248 if (rmEnabled) { 249 secConvChBox.setEnabled(!secConvEnabled); 250 } else { 251 secConvChBox.setEnabled(true); 252 } 253 } 254 255 private void setCombo(JComboBox combo, String item) { 256 if (item == null) { 257 combo.setSelectedIndex(0); 258 } else { 259 combo.setSelectedItem(item); 260 } 261 } 262 263 private void setCombo(JComboBox combo, boolean second) { 264 combo.setSelectedIndex(second ? 1 : 0); 265 } 266 267 private void setChBox(JCheckBox chBox, Boolean enable) { 268 if (enable == null) { 269 chBox.setSelected(false); 270 } else { 271 chBox.setSelected(enable); 272 } 273 } 274 275 280 private void initComponents() { 282 283 secConvChBox = new javax.swing.JCheckBox (); 284 reqSigConfChBox = new javax.swing.JCheckBox (); 285 derivedKeysChBox = new javax.swing.JCheckBox (); 286 algoSuiteLabel = new javax.swing.JLabel (); 287 algoSuiteCombo = new javax.swing.JComboBox (); 288 layoutLabel = new javax.swing.JLabel (); 289 layoutCombo = new javax.swing.JComboBox (); 290 encryptSignatureChBox = new javax.swing.JCheckBox (); 291 reqDerivedKeysIssued = new javax.swing.JCheckBox (); 292 encryptOrderChBox = new javax.swing.JCheckBox (); 293 issuerAddressLabel = new javax.swing.JLabel (); 294 issuerAddressField = new javax.swing.JTextField (); 295 issuerMetadataLabel = new javax.swing.JLabel (); 296 issuerMetadataField = new javax.swing.JTextField (); 297 tokenTypeLabel = new javax.swing.JLabel (); 298 keyTypeLabel = new javax.swing.JLabel (); 299 keySizeLabel = new javax.swing.JLabel (); 300 tokenTypeCombo = new javax.swing.JComboBox (); 301 keyTypeCombo = new javax.swing.JComboBox (); 302 keySizeCombo = new javax.swing.JComboBox (); 303 reqDerivedKeys = new javax.swing.JCheckBox (); 304 305 org.openide.awt.Mnemonics.setLocalizedText(secConvChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_SecConvLabel")); secConvChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 307 secConvChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 308 secConvChBox.addActionListener(new java.awt.event.ActionListener () { 309 public void actionPerformed(java.awt.event.ActionEvent evt) { 310 secConvChBoxActionPerformed(evt); 311 } 312 }); 313 314 org.openide.awt.Mnemonics.setLocalizedText(reqSigConfChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireSigConfirmation")); reqSigConfChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 316 reqSigConfChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 317 reqSigConfChBox.addActionListener(new java.awt.event.ActionListener () { 318 public void actionPerformed(java.awt.event.ActionEvent evt) { 319 reqSigConfChBoxActionPerformed(evt); 320 } 321 }); 322 323 org.openide.awt.Mnemonics.setLocalizedText(derivedKeysChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireDerivedKeysForSecConv")); derivedKeysChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 325 derivedKeysChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 326 derivedKeysChBox.addActionListener(new java.awt.event.ActionListener () { 327 public void actionPerformed(java.awt.event.ActionEvent evt) { 328 derivedKeysChBoxActionPerformed(evt); 329 } 330 }); 331 332 algoSuiteLabel.setLabelFor(algoSuiteCombo); 333 org.openide.awt.Mnemonics.setLocalizedText(algoSuiteLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_AlgoSuiteLabel")); 335 algoSuiteCombo.addActionListener(new java.awt.event.ActionListener () { 336 public void actionPerformed(java.awt.event.ActionEvent evt) { 337 algoSuiteComboActionPerformed(evt); 338 } 339 }); 340 341 layoutLabel.setLabelFor(layoutCombo); 342 org.openide.awt.Mnemonics.setLocalizedText(layoutLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_LayoutLabel")); 344 layoutCombo.addActionListener(new java.awt.event.ActionListener () { 345 public void actionPerformed(java.awt.event.ActionEvent evt) { 346 layoutComboActionPerformed(evt); 347 } 348 }); 349 350 org.openide.awt.Mnemonics.setLocalizedText(encryptSignatureChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_EncryptSignatureLabel")); encryptSignatureChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 352 encryptSignatureChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 353 encryptSignatureChBox.addActionListener(new java.awt.event.ActionListener () { 354 public void actionPerformed(java.awt.event.ActionEvent evt) { 355 encryptSignatureChBox(evt); 356 } 357 }); 358 359 org.openide.awt.Mnemonics.setLocalizedText(reqDerivedKeysIssued, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireDerivedKeysIssued")); reqDerivedKeysIssued.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 361 reqDerivedKeysIssued.setMargin(new java.awt.Insets (0, 0, 0, 0)); 362 reqDerivedKeysIssued.addActionListener(new java.awt.event.ActionListener () { 363 public void actionPerformed(java.awt.event.ActionEvent evt) { 364 reqDerivedKeysIssuedActionPerformed(evt); 365 } 366 }); 367 368 org.openide.awt.Mnemonics.setLocalizedText(encryptOrderChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_EncryptOrderLabel")); encryptOrderChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 370 encryptOrderChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 371 encryptOrderChBox.addActionListener(new java.awt.event.ActionListener () { 372 public void actionPerformed(java.awt.event.ActionEvent evt) { 373 encryptOrderChBoxActionPerformed(evt); 374 } 375 }); 376 377 issuerAddressLabel.setLabelFor(issuerAddressField); 378 org.openide.awt.Mnemonics.setLocalizedText(issuerAddressLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_IssuerAddress")); 380 issuerAddressField.addKeyListener(new java.awt.event.KeyAdapter () { 381 public void keyReleased(java.awt.event.KeyEvent evt) { 382 issuerAddressFieldKeyReleased(evt); 383 } 384 }); 385 386 issuerMetadataLabel.setLabelFor(issuerMetadataField); 387 org.openide.awt.Mnemonics.setLocalizedText(issuerMetadataLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_IssuerMetadataAddress")); 389 issuerMetadataField.addKeyListener(new java.awt.event.KeyAdapter () { 390 public void keyReleased(java.awt.event.KeyEvent evt) { 391 issuerMetadataFieldKeyReleased(evt); 392 } 393 }); 394 395 tokenTypeLabel.setLabelFor(tokenTypeCombo); 396 org.openide.awt.Mnemonics.setLocalizedText(tokenTypeLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RSTTokenType")); 398 keyTypeLabel.setLabelFor(keyTypeCombo); 399 org.openide.awt.Mnemonics.setLocalizedText(keyTypeLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RSTKeyType")); 401 keySizeLabel.setLabelFor(keySizeCombo); 402 org.openide.awt.Mnemonics.setLocalizedText(keySizeLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RSTKeySize")); 404 tokenTypeCombo.addActionListener(new java.awt.event.ActionListener () { 405 public void actionPerformed(java.awt.event.ActionEvent evt) { 406 tokenTypeComboActionPerformed(evt); 407 } 408 }); 409 410 keyTypeCombo.addActionListener(new java.awt.event.ActionListener () { 411 public void actionPerformed(java.awt.event.ActionEvent evt) { 412 keyTypeComboActionPerformed(evt); 413 } 414 }); 415 416 keySizeCombo.addActionListener(new java.awt.event.ActionListener () { 417 public void actionPerformed(java.awt.event.ActionEvent evt) { 418 keySizeComboActionPerformed(evt); 419 } 420 }); 421 422 org.openide.awt.Mnemonics.setLocalizedText(reqDerivedKeys, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireDerivedKeysX509")); reqDerivedKeys.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 424 reqDerivedKeys.setMargin(new java.awt.Insets (0, 0, 0, 0)); 425 reqDerivedKeys.addActionListener(new java.awt.event.ActionListener () { 426 public void actionPerformed(java.awt.event.ActionEvent evt) { 427 reqDerivedKeysActionPerformed(evt); 428 } 429 }); 430 431 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 432 this.setLayout(layout); 433 layout.setHorizontalGroup( 434 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 435 .add(layout.createSequentialGroup() 436 .addContainerGap() 437 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 438 .add(layout.createSequentialGroup() 439 .add(issuerAddressLabel) 440 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 441 .add(issuerAddressField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)) 442 .add(reqSigConfChBox) 443 .add(secConvChBox) 444 .add(derivedKeysChBox) 445 .add(encryptSignatureChBox) 446 .add(encryptOrderChBox) 447 .add(reqDerivedKeys) 448 .add(reqDerivedKeysIssued) 449 .add(layout.createSequentialGroup() 450 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 451 .add(issuerMetadataLabel) 452 .add(layoutLabel) 453 .add(algoSuiteLabel) 454 .add(tokenTypeLabel) 455 .add(keyTypeLabel) 456 .add(keySizeLabel)) 457 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 458 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 459 .add(tokenTypeCombo, 0, 134, Short.MAX_VALUE) 460 .add(layout.createSequentialGroup() 461 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 462 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 463 .add(keySizeCombo, 0, 134, Short.MAX_VALUE) 464 .add(keyTypeCombo, 0, 134, Short.MAX_VALUE))) 465 .add(algoSuiteCombo, 0, 134, Short.MAX_VALUE) 466 .add(layoutCombo, 0, 134, Short.MAX_VALUE) 467 .add(issuerMetadataField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)))) 468 .addContainerGap()) 469 ); 470 471 layout.linkSize(new java.awt.Component [] {algoSuiteCombo, keySizeCombo, keyTypeCombo, layoutCombo, tokenTypeCombo}, org.jdesktop.layout.GroupLayout.HORIZONTAL); 472 473 layout.setVerticalGroup( 474 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 475 .add(layout.createSequentialGroup() 476 .addContainerGap() 477 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 478 .add(issuerAddressLabel) 479 .add(issuerAddressField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 480 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 481 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 482 .add(issuerMetadataLabel) 483 .add(issuerMetadataField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 484 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 485 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 486 .add(tokenTypeLabel) 487 .add(tokenTypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 488 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 489 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 490 .add(keyTypeLabel) 491 .add(keyTypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 492 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 493 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 494 .add(keySizeLabel) 495 .add(keySizeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 496 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 497 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 498 .add(algoSuiteLabel) 499 .add(algoSuiteCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 500 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 501 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 502 .add(layoutLabel) 503 .add(layoutCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 504 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 505 .add(reqDerivedKeys) 506 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 507 .add(reqDerivedKeysIssued) 508 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 509 .add(secConvChBox) 510 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 511 .add(derivedKeysChBox) 512 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 513 .add(reqSigConfChBox) 514 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 515 .add(encryptSignatureChBox) 516 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 517 .add(encryptOrderChBox) 518 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 519 ); 520 521 layout.linkSize(new java.awt.Component [] {algoSuiteCombo, keySizeCombo, keyTypeCombo, layoutCombo, tokenTypeCombo}, org.jdesktop.layout.GroupLayout.VERTICAL); 522 523 } 525 private void reqDerivedKeysActionPerformed(java.awt.event.ActionEvent evt) { setValue(reqDerivedKeys); 527 } 529 private void keySizeComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(keySizeCombo); 531 } 533 private void keyTypeComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(keyTypeCombo); 535 } 537 private void tokenTypeComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(tokenTypeCombo); 539 } 541 private void issuerMetadataFieldKeyReleased(java.awt.event.KeyEvent evt) { setValue(issuerMetadataField); 543 } 545 private void issuerAddressFieldKeyReleased(java.awt.event.KeyEvent evt) { setValue(issuerAddressField); 547 } 549 private void encryptOrderChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(encryptOrderChBox); 551 } 553 private void reqDerivedKeysIssuedActionPerformed(java.awt.event.ActionEvent evt) { setValue(reqDerivedKeysIssued); 555 } 557 private void reqSigConfChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(reqSigConfChBox); 559 } 561 private void derivedKeysChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(derivedKeysChBox); 563 } 565 private void secConvChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(secConvChBox); 567 } 569 private void encryptSignatureChBox(java.awt.event.ActionEvent evt) { setValue(encryptSignatureChBox); 571 } 573 private void layoutComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(layoutCombo); 575 } 577 private void algoSuiteComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(algoSuiteCombo); 579 } 581 private javax.swing.JComboBox algoSuiteCombo; 583 private javax.swing.JLabel algoSuiteLabel; 584 private javax.swing.JCheckBox derivedKeysChBox; 585 private javax.swing.JCheckBox encryptOrderChBox; 586 private javax.swing.JCheckBox encryptSignatureChBox; 587 private javax.swing.JTextField issuerAddressField; 588 private javax.swing.JLabel issuerAddressLabel; 589 private javax.swing.JTextField issuerMetadataField; 590 private javax.swing.JLabel issuerMetadataLabel; 591 private javax.swing.JComboBox keySizeCombo; 592 private javax.swing.JLabel keySizeLabel; 593 private javax.swing.JComboBox keyTypeCombo; 594 private javax.swing.JLabel keyTypeLabel; 595 private javax.swing.JComboBox layoutCombo; 596 private javax.swing.JLabel layoutLabel; 597 private javax.swing.JCheckBox reqDerivedKeys; 598 private javax.swing.JCheckBox reqDerivedKeysIssued; 599 private javax.swing.JCheckBox reqSigConfChBox; 600 private javax.swing.JCheckBox secConvChBox; 601 private javax.swing.JComboBox tokenTypeCombo; 602 private javax.swing.JLabel tokenTypeLabel; 603 605 } 606 | Popular Tags |