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 STSIssued extends javax.swing.JPanel { 42 43 private boolean inSync = false; 44 45 private WSDLComponent comp; 46 private WSDLModel model; 47 48 51 public STSIssued(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 setCombo(tokenTypeCombo, SecurityTokensModelHelper.getIssuedTokenType(token)); 131 setCombo(keyTypeCombo, SecurityTokensModelHelper.getIssuedKeyType(token)); 132 setCombo(keySizeCombo, SecurityTokensModelHelper.getIssuedKeySize(token)); 133 134 issuerAddressField.setText(SecurityTokensModelHelper.getIssuedIssuerAddress(token)); 135 issuerMetadataField.setText(SecurityTokensModelHelper.getIssuedIssuerMetadataAddress(token)); 136 137 setChBox(reqDerivedKeys, SecurityPolicyModelHelper.isRequireDerivedKeys(token)); 138 139 setCombo(algoSuiteCombo, AlgoSuiteModelHelper.getAlgorithmSuite(secBinding)); 140 setCombo(layoutCombo, SecurityPolicyModelHelper.getMessageLayout(secBinding)); 141 142 enableDisable(); 143 144 inSync = false; 145 } 146 147 public void setValue(javax.swing.JComponent source) { 148 149 if (inSync) return; 150 151 WSDLComponent secBinding = null; 152 WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp); 153 WSDLComponent protTokenKind = SecurityTokensModelHelper.getTokenElement(topSecBinding, ProtectionToken.class); 154 WSDLComponent protToken = SecurityTokensModelHelper.getTokenTypeElement(protTokenKind); 155 156 boolean secConv = (protToken instanceof SecureConversationToken); 157 158 if (source.equals(secConvChBox)) { 159 ProfilesModelHelper.enableSecureConversation(comp, secConvChBox.isSelected(), ComboConstants.PROF_MSGAUTHSSL); 160 } 161 162 if (secConv) { 163 WSDLComponent bootPolicy = SecurityTokensModelHelper.getTokenElement(protToken, BootstrapPolicy.class); 164 secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(bootPolicy); 165 Policy p = (Policy) secBinding.getParent(); 166 if (source.equals(derivedKeysChBox)) { 167 SecurityPolicyModelHelper.enableRequireDerivedKeys(protToken, derivedKeysChBox.isSelected()); 168 } 169 if (source.equals(reqSigConfChBox)) { 170 SecurityPolicyModelHelper.enableRequireSignatureConfirmation( 171 SecurityPolicyModelHelper.getWss11(p), reqSigConfChBox.isSelected()); 172 } 173 } else { 174 secBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp); 175 if (source.equals(reqSigConfChBox)) { 176 SecurityPolicyModelHelper.enableRequireSignatureConfirmation(SecurityPolicyModelHelper.getWss11(comp), reqSigConfChBox.isSelected()); 177 } 178 } 179 180 WSDLComponent tokenKind = SecurityTokensModelHelper.getTokenElement(secBinding, ProtectionToken.class); 181 WSDLComponent token = SecurityTokensModelHelper.getTokenTypeElement(tokenKind); 182 183 if (source.equals(tokenTypeCombo) || source.equals(keyTypeCombo) || source.equals(keySizeCombo)) { 184 SecurityTokensModelHelper.setIssuedTokenRSTAttributes(token, 185 (String )tokenTypeCombo.getSelectedItem(), 186 (String )keyTypeCombo.getSelectedItem(), 187 (String )keySizeCombo.getSelectedItem()); 188 } 189 190 if (source.equals(issuerAddressField) || source.equals(issuerMetadataField)) { 191 SecurityTokensModelHelper.setIssuedTokenAddressAttributes(token, 192 issuerAddressField.getText(), 193 issuerMetadataField.getText()); 194 } 195 196 if (source.equals(encryptSignatureChBox)) { 197 SecurityPolicyModelHelper.enableEncryptSignature(secBinding, encryptSignatureChBox.isSelected()); 198 if (secConv) { 199 SecurityPolicyModelHelper.enableEncryptSignature(topSecBinding, encryptSignatureChBox.isSelected()); 200 } 201 } 202 if (source.equals(encryptOrderChBox)) { 203 SecurityPolicyModelHelper.enableEncryptBeforeSigning(secBinding, encryptOrderChBox.isSelected()); 204 if (secConv) { 205 SecurityPolicyModelHelper.enableEncryptBeforeSigning(topSecBinding, encryptOrderChBox.isSelected()); 206 } 207 } 208 if (source.equals(layoutCombo)) { 209 SecurityPolicyModelHelper.setLayout(secBinding, (String ) layoutCombo.getSelectedItem()); 210 if (secConv) { 211 SecurityPolicyModelHelper.setLayout(topSecBinding, (String ) layoutCombo.getSelectedItem()); 212 } 213 } 214 if (source.equals(algoSuiteCombo)) { 215 AlgoSuiteModelHelper.setAlgorithmSuite(secBinding, (String ) algoSuiteCombo.getSelectedItem()); 216 if (secConv) { 217 AlgoSuiteModelHelper.setAlgorithmSuite(topSecBinding, (String ) algoSuiteCombo.getSelectedItem()); 218 } 219 } 220 if (source.equals(reqDerivedKeys)) { 221 SecurityPolicyModelHelper.enableRequireDerivedKeys(token, reqDerivedKeys.isSelected()); 222 return; 223 } 224 225 enableDisable(); 226 } 227 228 private void enableDisable() { 229 boolean secConvEnabled = secConvChBox.isSelected(); 230 derivedKeysChBox.setEnabled(secConvEnabled); 231 boolean rmEnabled = RMModelHelper.isRMEnabled(comp); 232 if (rmEnabled) { 233 secConvChBox.setEnabled(!secConvEnabled); 234 } else { 235 secConvChBox.setEnabled(true); 236 } 237 } 238 239 private void setCombo(JComboBox combo, String item) { 240 if (item == null) { 241 combo.setSelectedIndex(0); 242 } else { 243 combo.setSelectedItem(item); 244 } 245 } 246 247 private void setCombo(JComboBox combo, boolean second) { 248 combo.setSelectedIndex(second ? 1 : 0); 249 } 250 251 private void setChBox(JCheckBox chBox, Boolean enable) { 252 if (enable == null) { 253 chBox.setSelected(false); 254 } else { 255 chBox.setSelected(enable); 256 } 257 } 258 259 264 private void initComponents() { 266 267 secConvChBox = new javax.swing.JCheckBox (); 268 reqSigConfChBox = new javax.swing.JCheckBox (); 269 derivedKeysChBox = new javax.swing.JCheckBox (); 270 algoSuiteLabel = new javax.swing.JLabel (); 271 algoSuiteCombo = new javax.swing.JComboBox (); 272 layoutLabel = new javax.swing.JLabel (); 273 layoutCombo = new javax.swing.JComboBox (); 274 encryptSignatureChBox = new javax.swing.JCheckBox (); 275 reqDerivedKeys = new javax.swing.JCheckBox (); 276 encryptOrderChBox = new javax.swing.JCheckBox (); 277 issuerAddressLabel = new javax.swing.JLabel (); 278 issuerAddressField = new javax.swing.JTextField (); 279 issuerMetadataLabel = new javax.swing.JLabel (); 280 issuerMetadataField = new javax.swing.JTextField (); 281 tokenTypeLabel = new javax.swing.JLabel (); 282 keyTypeLabel = new javax.swing.JLabel (); 283 keySizeLabel = new javax.swing.JLabel (); 284 tokenTypeCombo = new javax.swing.JComboBox (); 285 keyTypeCombo = new javax.swing.JComboBox (); 286 keySizeCombo = new javax.swing.JComboBox (); 287 288 org.openide.awt.Mnemonics.setLocalizedText(secConvChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_SecConvLabel")); secConvChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 290 secConvChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 291 secConvChBox.addActionListener(new java.awt.event.ActionListener () { 292 public void actionPerformed(java.awt.event.ActionEvent evt) { 293 secConvChBoxActionPerformed(evt); 294 } 295 }); 296 297 org.openide.awt.Mnemonics.setLocalizedText(reqSigConfChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RequireSigConfirmation")); reqSigConfChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 299 reqSigConfChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 300 reqSigConfChBox.addActionListener(new java.awt.event.ActionListener () { 301 public void actionPerformed(java.awt.event.ActionEvent evt) { 302 reqSigConfChBoxActionPerformed(evt); 303 } 304 }); 305 306 org.openide.awt.Mnemonics.setLocalizedText(derivedKeysChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RequireDerivedKeysForSecConv")); derivedKeysChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 308 derivedKeysChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 309 derivedKeysChBox.addActionListener(new java.awt.event.ActionListener () { 310 public void actionPerformed(java.awt.event.ActionEvent evt) { 311 derivedKeysChBoxActionPerformed(evt); 312 } 313 }); 314 315 algoSuiteLabel.setLabelFor(algoSuiteCombo); 316 org.openide.awt.Mnemonics.setLocalizedText(algoSuiteLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_AlgoSuiteLabel")); 318 algoSuiteCombo.addActionListener(new java.awt.event.ActionListener () { 319 public void actionPerformed(java.awt.event.ActionEvent evt) { 320 algoSuiteComboActionPerformed(evt); 321 } 322 }); 323 324 layoutLabel.setLabelFor(layoutCombo); 325 org.openide.awt.Mnemonics.setLocalizedText(layoutLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_LayoutLabel")); 327 layoutCombo.addActionListener(new java.awt.event.ActionListener () { 328 public void actionPerformed(java.awt.event.ActionEvent evt) { 329 layoutComboActionPerformed(evt); 330 } 331 }); 332 333 org.openide.awt.Mnemonics.setLocalizedText(encryptSignatureChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_EncryptSignatureLabel")); encryptSignatureChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 335 encryptSignatureChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 336 encryptSignatureChBox.addActionListener(new java.awt.event.ActionListener () { 337 public void actionPerformed(java.awt.event.ActionEvent evt) { 338 encryptSignatureChBox(evt); 339 } 340 }); 341 342 org.openide.awt.Mnemonics.setLocalizedText(reqDerivedKeys, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RequireDerivedKeysIssued")); reqDerivedKeys.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 344 reqDerivedKeys.setMargin(new java.awt.Insets (0, 0, 0, 0)); 345 reqDerivedKeys.addActionListener(new java.awt.event.ActionListener () { 346 public void actionPerformed(java.awt.event.ActionEvent evt) { 347 reqDerivedKeysActionPerformed(evt); 348 } 349 }); 350 351 org.openide.awt.Mnemonics.setLocalizedText(encryptOrderChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_EncryptOrderLabel")); encryptOrderChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 353 encryptOrderChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 354 encryptOrderChBox.addActionListener(new java.awt.event.ActionListener () { 355 public void actionPerformed(java.awt.event.ActionEvent evt) { 356 encryptOrderChBoxActionPerformed(evt); 357 } 358 }); 359 360 issuerAddressLabel.setLabelFor(issuerAddressField); 361 org.openide.awt.Mnemonics.setLocalizedText(issuerAddressLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_IssuerAddress")); 363 issuerAddressField.addKeyListener(new java.awt.event.KeyAdapter () { 364 public void keyReleased(java.awt.event.KeyEvent evt) { 365 issuerAddressFieldKeyReleased(evt); 366 } 367 }); 368 369 issuerMetadataLabel.setLabelFor(issuerMetadataField); 370 org.openide.awt.Mnemonics.setLocalizedText(issuerMetadataLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_IssuerMetadataAddress")); 372 issuerMetadataField.addKeyListener(new java.awt.event.KeyAdapter () { 373 public void keyReleased(java.awt.event.KeyEvent evt) { 374 issuerMetadataFieldKeyReleased(evt); 375 } 376 }); 377 378 tokenTypeLabel.setLabelFor(tokenTypeCombo); 379 org.openide.awt.Mnemonics.setLocalizedText(tokenTypeLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RSTTokenType")); 381 keyTypeLabel.setLabelFor(keyTypeCombo); 382 org.openide.awt.Mnemonics.setLocalizedText(keyTypeLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RSTKeyType")); 384 keySizeLabel.setLabelFor(keySizeCombo); 385 org.openide.awt.Mnemonics.setLocalizedText(keySizeLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RSTKeySize")); 387 tokenTypeCombo.addActionListener(new java.awt.event.ActionListener () { 388 public void actionPerformed(java.awt.event.ActionEvent evt) { 389 tokenTypeComboActionPerformed(evt); 390 } 391 }); 392 393 keyTypeCombo.addActionListener(new java.awt.event.ActionListener () { 394 public void actionPerformed(java.awt.event.ActionEvent evt) { 395 keyTypeComboActionPerformed(evt); 396 } 397 }); 398 399 keySizeCombo.addActionListener(new java.awt.event.ActionListener () { 400 public void actionPerformed(java.awt.event.ActionEvent evt) { 401 keySizeComboActionPerformed(evt); 402 } 403 }); 404 405 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 406 this.setLayout(layout); 407 layout.setHorizontalGroup( 408 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 409 .add(layout.createSequentialGroup() 410 .addContainerGap() 411 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 412 .add(layout.createSequentialGroup() 413 .add(issuerAddressLabel) 414 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 415 .add(issuerAddressField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)) 416 .add(reqDerivedKeys) 417 .add(reqSigConfChBox) 418 .add(secConvChBox) 419 .add(derivedKeysChBox) 420 .add(encryptSignatureChBox) 421 .add(encryptOrderChBox) 422 .add(layoutLabel) 423 .add(algoSuiteLabel) 424 .add(layout.createSequentialGroup() 425 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 426 .add(issuerMetadataLabel) 427 .add(tokenTypeLabel) 428 .add(keyTypeLabel) 429 .add(keySizeLabel)) 430 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 431 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 432 .add(layout.createSequentialGroup() 433 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 434 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 435 .add(keySizeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 436 .add(keyTypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 437 .add(algoSuiteCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 438 .add(layoutCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 439 .add(issuerMetadataField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE) 440 .add(tokenTypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 143, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) 441 .addContainerGap()) 442 ); 443 444 layout.linkSize(new java.awt.Component [] {algoSuiteCombo, keySizeCombo, keyTypeCombo, layoutCombo, tokenTypeCombo}, org.jdesktop.layout.GroupLayout.HORIZONTAL); 445 446 layout.setVerticalGroup( 447 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 448 .add(layout.createSequentialGroup() 449 .addContainerGap() 450 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 451 .add(issuerAddressLabel) 452 .add(issuerAddressField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 453 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 454 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 455 .add(issuerMetadataLabel) 456 .add(issuerMetadataField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 457 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 458 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 459 .add(tokenTypeLabel) 460 .add(tokenTypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 461 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 462 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 463 .add(keyTypeLabel) 464 .add(keyTypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 465 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 466 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 467 .add(keySizeLabel) 468 .add(keySizeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 469 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 470 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 471 .add(algoSuiteLabel) 472 .add(algoSuiteCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 473 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 474 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 475 .add(layoutLabel) 476 .add(layoutCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 477 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 478 .add(reqDerivedKeys) 479 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 480 .add(secConvChBox) 481 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 482 .add(derivedKeysChBox) 483 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 484 .add(reqSigConfChBox) 485 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 486 .add(encryptSignatureChBox) 487 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 488 .add(encryptOrderChBox) 489 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 490 ); 491 492 layout.linkSize(new java.awt.Component [] {algoSuiteCombo, keySizeCombo, keyTypeCombo, layoutCombo, tokenTypeCombo}, org.jdesktop.layout.GroupLayout.VERTICAL); 493 494 } 496 private void keySizeComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(keySizeCombo); 498 } 500 private void keyTypeComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(keyTypeCombo); 502 } 504 private void tokenTypeComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(tokenTypeCombo); 506 } 508 private void issuerMetadataFieldKeyReleased(java.awt.event.KeyEvent evt) { setValue(issuerMetadataField); 510 } 512 private void issuerAddressFieldKeyReleased(java.awt.event.KeyEvent evt) { setValue(issuerAddressField); 514 } 516 private void encryptOrderChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(encryptOrderChBox); 518 } 520 private void reqDerivedKeysActionPerformed(java.awt.event.ActionEvent evt) { setValue(reqDerivedKeys); 522 } 524 private void reqSigConfChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(reqSigConfChBox); 526 } 528 private void derivedKeysChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(derivedKeysChBox); 530 } 532 private void secConvChBoxActionPerformed(java.awt.event.ActionEvent evt) { setValue(secConvChBox); 534 } 536 private void encryptSignatureChBox(java.awt.event.ActionEvent evt) { setValue(encryptSignatureChBox); 538 } 540 private void layoutComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(layoutCombo); 542 } 544 private void algoSuiteComboActionPerformed(java.awt.event.ActionEvent evt) { setValue(algoSuiteCombo); 546 } 548 private javax.swing.JComboBox algoSuiteCombo; 550 private javax.swing.JLabel algoSuiteLabel; 551 private javax.swing.JCheckBox derivedKeysChBox; 552 private javax.swing.JCheckBox encryptOrderChBox; 553 private javax.swing.JCheckBox encryptSignatureChBox; 554 private javax.swing.JTextField issuerAddressField; 555 private javax.swing.JLabel issuerAddressLabel; 556 private javax.swing.JTextField issuerMetadataField; 557 private javax.swing.JLabel issuerMetadataLabel; 558 private javax.swing.JComboBox keySizeCombo; 559 private javax.swing.JLabel keySizeLabel; 560 private javax.swing.JComboBox keyTypeCombo; 561 private javax.swing.JLabel keyTypeLabel; 562 private javax.swing.JComboBox layoutCombo; 563 private javax.swing.JLabel layoutLabel; 564 private javax.swing.JCheckBox reqDerivedKeys; 565 private javax.swing.JCheckBox reqSigConfChBox; 566 private javax.swing.JCheckBox secConvChBox; 567 private javax.swing.JComboBox tokenTypeCombo; 568 private javax.swing.JLabel tokenTypeLabel; 569 571 } 572 | Popular Tags |