KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > websvc > wsitconf > ui > service > profiles > STSIssued


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.websvc.wsitconf.ui.service.profiles;
21
22 import javax.swing.JCheckBox JavaDoc;
23 import javax.swing.JComboBox JavaDoc;
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 /**
38  *
39  * @author Martin Grebac
40  */

41 public class STSIssued extends javax.swing.JPanel JavaDoc {
42
43     private boolean inSync = false;
44
45     private WSDLComponent comp;
46     private WSDLModel model;
47     
48     /**
49      * Creates new form STSIssued
50      */

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 // algoSuiteCombo.addItem(ComboConstants.BASIC256SHA256);
88
// algoSuiteCombo.addItem(ComboConstants.BASIC192SHA256);
89
// algoSuiteCombo.addItem(ComboConstants.BASIC128SHA256);
90
// algoSuiteCombo.addItem(ComboConstants.TRIPLEDESSHA256);
91
// algoSuiteCombo.addItem(ComboConstants.BASIC256SHA256RSA15);
92
// algoSuiteCombo.addItem(ComboConstants.BASIC192SHA256RSA15);
93
// algoSuiteCombo.addItem(ComboConstants.BASIC128SHA256RSA15);
94
// algoSuiteCombo.addItem(ComboConstants.TRIPLEDESSHA256RSA15);
95

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 JavaDoc 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 JavaDoc)tokenTypeCombo.getSelectedItem(),
186                     (String JavaDoc)keyTypeCombo.getSelectedItem(),
187                     (String JavaDoc)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 JavaDoc) layoutCombo.getSelectedItem());
210             if (secConv) {
211                 SecurityPolicyModelHelper.setLayout(topSecBinding, (String JavaDoc) layoutCombo.getSelectedItem());
212             }
213         }
214         if (source.equals(algoSuiteCombo)) {
215             AlgoSuiteModelHelper.setAlgorithmSuite(secBinding, (String JavaDoc) algoSuiteCombo.getSelectedItem());
216             if (secConv) {
217                 AlgoSuiteModelHelper.setAlgorithmSuite(topSecBinding, (String JavaDoc) 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 JavaDoc combo, String JavaDoc item) {
240         if (item == null) {
241             combo.setSelectedIndex(0);
242         } else {
243             combo.setSelectedItem(item);
244         }
245     }
246
247     private void setCombo(JComboBox JavaDoc combo, boolean second) {
248         combo.setSelectedIndex(second ? 1 : 0);
249     }
250         
251     private void setChBox(JCheckBox JavaDoc chBox, Boolean JavaDoc enable) {
252         if (enable == null) {
253             chBox.setSelected(false);
254         } else {
255             chBox.setSelected(enable);
256         }
257     }
258     
259     /** This method is called from within the constructor to
260      * initialize the form.
261      * WARNING: Do NOT modify this code. The content of this method is
262      * always regenerated by the Form Editor.
263      */

264     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
265
private void initComponents() {
266
267         secConvChBox = new javax.swing.JCheckBox JavaDoc();
268         reqSigConfChBox = new javax.swing.JCheckBox JavaDoc();
269         derivedKeysChBox = new javax.swing.JCheckBox JavaDoc();
270         algoSuiteLabel = new javax.swing.JLabel JavaDoc();
271         algoSuiteCombo = new javax.swing.JComboBox JavaDoc();
272         layoutLabel = new javax.swing.JLabel JavaDoc();
273         layoutCombo = new javax.swing.JComboBox JavaDoc();
274         encryptSignatureChBox = new javax.swing.JCheckBox JavaDoc();
275         reqDerivedKeys = new javax.swing.JCheckBox JavaDoc();
276         encryptOrderChBox = new javax.swing.JCheckBox JavaDoc();
277         issuerAddressLabel = new javax.swing.JLabel JavaDoc();
278         issuerAddressField = new javax.swing.JTextField JavaDoc();
279         issuerMetadataLabel = new javax.swing.JLabel JavaDoc();
280         issuerMetadataField = new javax.swing.JTextField JavaDoc();
281         tokenTypeLabel = new javax.swing.JLabel JavaDoc();
282         keyTypeLabel = new javax.swing.JLabel JavaDoc();
283         keySizeLabel = new javax.swing.JLabel JavaDoc();
284         tokenTypeCombo = new javax.swing.JComboBox JavaDoc();
285         keyTypeCombo = new javax.swing.JComboBox JavaDoc();
286         keySizeCombo = new javax.swing.JComboBox JavaDoc();
287
288         org.openide.awt.Mnemonics.setLocalizedText(secConvChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_SecConvLabel")); // NOI18N
289
secConvChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
290         secConvChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
291         secConvChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
292             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
293                 secConvChBoxActionPerformed(evt);
294             }
295         });
296
297         org.openide.awt.Mnemonics.setLocalizedText(reqSigConfChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RequireSigConfirmation")); // NOI18N
298
reqSigConfChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
299         reqSigConfChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
300         reqSigConfChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
301             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
302                 reqSigConfChBoxActionPerformed(evt);
303             }
304         });
305
306         org.openide.awt.Mnemonics.setLocalizedText(derivedKeysChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RequireDerivedKeysForSecConv")); // NOI18N
307
derivedKeysChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
308         derivedKeysChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
309         derivedKeysChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
310             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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")); // NOI18N
317

318         algoSuiteCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
319             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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")); // NOI18N
326

327         layoutCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
328             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
329                 layoutComboActionPerformed(evt);
330             }
331         });
332
333         org.openide.awt.Mnemonics.setLocalizedText(encryptSignatureChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_EncryptSignatureLabel")); // NOI18N
334
encryptSignatureChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
335         encryptSignatureChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
336         encryptSignatureChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
337             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
338                 encryptSignatureChBox(evt);
339             }
340         });
341
342         org.openide.awt.Mnemonics.setLocalizedText(reqDerivedKeys, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RequireDerivedKeysIssued")); // NOI18N
343
reqDerivedKeys.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
344         reqDerivedKeys.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
345         reqDerivedKeys.addActionListener(new java.awt.event.ActionListener JavaDoc() {
346             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
347                 reqDerivedKeysActionPerformed(evt);
348             }
349         });
350
351         org.openide.awt.Mnemonics.setLocalizedText(encryptOrderChBox, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_EncryptOrderLabel")); // NOI18N
352
encryptOrderChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
353         encryptOrderChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
354         encryptOrderChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
355             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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")); // NOI18N
362

363         issuerAddressField.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
364             public void keyReleased(java.awt.event.KeyEvent JavaDoc 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")); // NOI18N
371

372         issuerMetadataField.addKeyListener(new java.awt.event.KeyAdapter JavaDoc() {
373             public void keyReleased(java.awt.event.KeyEvent JavaDoc 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")); // NOI18N
380

381         keyTypeLabel.setLabelFor(keyTypeCombo);
382         org.openide.awt.Mnemonics.setLocalizedText(keyTypeLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RSTKeyType")); // NOI18N
383

384         keySizeLabel.setLabelFor(keySizeCombo);
385         org.openide.awt.Mnemonics.setLocalizedText(keySizeLabel, org.openide.util.NbBundle.getMessage(STSIssued.class, "LBL_RSTKeySize")); // NOI18N
386

387         tokenTypeCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
388             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
389                 tokenTypeComboActionPerformed(evt);
390             }
391         });
392
393         keyTypeCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
394             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
395                 keyTypeComboActionPerformed(evt);
396             }
397         });
398
399         keySizeCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
400             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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 JavaDoc[] {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 JavaDoc[] {algoSuiteCombo, keySizeCombo, keyTypeCombo, layoutCombo, tokenTypeCombo}, org.jdesktop.layout.GroupLayout.VERTICAL);
493
494     }// </editor-fold>//GEN-END:initComponents
495

496     private void keySizeComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_keySizeComboActionPerformed
497
setValue(keySizeCombo);
498     }//GEN-LAST:event_keySizeComboActionPerformed
499

500     private void keyTypeComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_keyTypeComboActionPerformed
501
setValue(keyTypeCombo);
502     }//GEN-LAST:event_keyTypeComboActionPerformed
503

504     private void tokenTypeComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_tokenTypeComboActionPerformed
505
setValue(tokenTypeCombo);
506     }//GEN-LAST:event_tokenTypeComboActionPerformed
507

508     private void issuerMetadataFieldKeyReleased(java.awt.event.KeyEvent JavaDoc evt) {//GEN-FIRST:event_issuerMetadataFieldKeyReleased
509
setValue(issuerMetadataField);
510     }//GEN-LAST:event_issuerMetadataFieldKeyReleased
511

512     private void issuerAddressFieldKeyReleased(java.awt.event.KeyEvent JavaDoc evt) {//GEN-FIRST:event_issuerAddressFieldKeyReleased
513
setValue(issuerAddressField);
514     }//GEN-LAST:event_issuerAddressFieldKeyReleased
515

516     private void encryptOrderChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_encryptOrderChBoxActionPerformed
517
setValue(encryptOrderChBox);
518     }//GEN-LAST:event_encryptOrderChBoxActionPerformed
519

520     private void reqDerivedKeysActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_reqDerivedKeysActionPerformed
521
setValue(reqDerivedKeys);
522     }//GEN-LAST:event_reqDerivedKeysActionPerformed
523

524     private void reqSigConfChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_reqSigConfChBoxActionPerformed
525
setValue(reqSigConfChBox);
526     }//GEN-LAST:event_reqSigConfChBoxActionPerformed
527

528     private void derivedKeysChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_derivedKeysChBoxActionPerformed
529
setValue(derivedKeysChBox);
530     }//GEN-LAST:event_derivedKeysChBoxActionPerformed
531

532     private void secConvChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_secConvChBoxActionPerformed
533
setValue(secConvChBox);
534     }//GEN-LAST:event_secConvChBoxActionPerformed
535

536     private void encryptSignatureChBox(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_encryptSignatureChBox
537
setValue(encryptSignatureChBox);
538     }//GEN-LAST:event_encryptSignatureChBox
539

540     private void layoutComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_layoutComboActionPerformed
541
setValue(layoutCombo);
542     }//GEN-LAST:event_layoutComboActionPerformed
543

544     private void algoSuiteComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_algoSuiteComboActionPerformed
545
setValue(algoSuiteCombo);
546     }//GEN-LAST:event_algoSuiteComboActionPerformed
547

548     // Variables declaration - do not modify//GEN-BEGIN:variables
549
private javax.swing.JComboBox JavaDoc algoSuiteCombo;
550     private javax.swing.JLabel JavaDoc algoSuiteLabel;
551     private javax.swing.JCheckBox JavaDoc derivedKeysChBox;
552     private javax.swing.JCheckBox JavaDoc encryptOrderChBox;
553     private javax.swing.JCheckBox JavaDoc encryptSignatureChBox;
554     private javax.swing.JTextField JavaDoc issuerAddressField;
555     private javax.swing.JLabel JavaDoc issuerAddressLabel;
556     private javax.swing.JTextField JavaDoc issuerMetadataField;
557     private javax.swing.JLabel JavaDoc issuerMetadataLabel;
558     private javax.swing.JComboBox JavaDoc keySizeCombo;
559     private javax.swing.JLabel JavaDoc keySizeLabel;
560     private javax.swing.JComboBox JavaDoc keyTypeCombo;
561     private javax.swing.JLabel JavaDoc keyTypeLabel;
562     private javax.swing.JComboBox JavaDoc layoutCombo;
563     private javax.swing.JLabel JavaDoc layoutLabel;
564     private javax.swing.JCheckBox JavaDoc reqDerivedKeys;
565     private javax.swing.JCheckBox JavaDoc reqSigConfChBox;
566     private javax.swing.JCheckBox JavaDoc secConvChBox;
567     private javax.swing.JComboBox JavaDoc tokenTypeCombo;
568     private javax.swing.JLabel JavaDoc tokenTypeLabel;
569     // End of variables declaration//GEN-END:variables
570

571 }
572
Popular Tags