KickJava   Java API By Example, From Geeks To Geeks.

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


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 STSIssuedEndorsing 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 STSIssuedEndorsing
50      */

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 // 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         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 JavaDoc 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 JavaDoc) layoutCombo.getSelectedItem());
206             if (secConv) {
207                 SecurityPolicyModelHelper.setLayout(topSecBinding, (String JavaDoc) layoutCombo.getSelectedItem());
208             }
209         }
210         if (source.equals(algoSuiteCombo)) {
211             AlgoSuiteModelHelper.setAlgorithmSuite(secBinding, (String JavaDoc) algoSuiteCombo.getSelectedItem());
212             if (secConv) {
213                 AlgoSuiteModelHelper.setAlgorithmSuite(topSecBinding, (String JavaDoc) 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 JavaDoc)tokenTypeCombo.getSelectedItem(),
231                     (String JavaDoc)keyTypeCombo.getSelectedItem(),
232                     (String JavaDoc)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 JavaDoc combo, String JavaDoc item) {
256         if (item == null) {
257             combo.setSelectedIndex(0);
258         } else {
259             combo.setSelectedItem(item);
260         }
261     }
262
263     private void setCombo(JComboBox JavaDoc combo, boolean second) {
264         combo.setSelectedIndex(second ? 1 : 0);
265     }
266         
267     private void setChBox(JCheckBox JavaDoc chBox, Boolean JavaDoc enable) {
268         if (enable == null) {
269             chBox.setSelected(false);
270         } else {
271             chBox.setSelected(enable);
272         }
273     }
274     
275     /** This method is called from within the constructor to
276      * initialize the form.
277      * WARNING: Do NOT modify this code. The content of this method is
278      * always regenerated by the Form Editor.
279      */

280     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
281
private void initComponents() {
282
283         secConvChBox = new javax.swing.JCheckBox JavaDoc();
284         reqSigConfChBox = new javax.swing.JCheckBox JavaDoc();
285         derivedKeysChBox = new javax.swing.JCheckBox JavaDoc();
286         algoSuiteLabel = new javax.swing.JLabel JavaDoc();
287         algoSuiteCombo = new javax.swing.JComboBox JavaDoc();
288         layoutLabel = new javax.swing.JLabel JavaDoc();
289         layoutCombo = new javax.swing.JComboBox JavaDoc();
290         encryptSignatureChBox = new javax.swing.JCheckBox JavaDoc();
291         reqDerivedKeysIssued = new javax.swing.JCheckBox JavaDoc();
292         encryptOrderChBox = new javax.swing.JCheckBox JavaDoc();
293         issuerAddressLabel = new javax.swing.JLabel JavaDoc();
294         issuerAddressField = new javax.swing.JTextField JavaDoc();
295         issuerMetadataLabel = new javax.swing.JLabel JavaDoc();
296         issuerMetadataField = new javax.swing.JTextField JavaDoc();
297         tokenTypeLabel = new javax.swing.JLabel JavaDoc();
298         keyTypeLabel = new javax.swing.JLabel JavaDoc();
299         keySizeLabel = new javax.swing.JLabel JavaDoc();
300         tokenTypeCombo = new javax.swing.JComboBox JavaDoc();
301         keyTypeCombo = new javax.swing.JComboBox JavaDoc();
302         keySizeCombo = new javax.swing.JComboBox JavaDoc();
303         reqDerivedKeys = new javax.swing.JCheckBox JavaDoc();
304
305         org.openide.awt.Mnemonics.setLocalizedText(secConvChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_SecConvLabel")); // NOI18N
306
secConvChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
307         secConvChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
308         secConvChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
309             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
310                 secConvChBoxActionPerformed(evt);
311             }
312         });
313
314         org.openide.awt.Mnemonics.setLocalizedText(reqSigConfChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireSigConfirmation")); // NOI18N
315
reqSigConfChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
316         reqSigConfChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
317         reqSigConfChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
318             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
319                 reqSigConfChBoxActionPerformed(evt);
320             }
321         });
322
323         org.openide.awt.Mnemonics.setLocalizedText(derivedKeysChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireDerivedKeysForSecConv")); // NOI18N
324
derivedKeysChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
325         derivedKeysChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
326         derivedKeysChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
327             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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")); // NOI18N
334

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

344         layoutCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
345             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
346                 layoutComboActionPerformed(evt);
347             }
348         });
349
350         org.openide.awt.Mnemonics.setLocalizedText(encryptSignatureChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_EncryptSignatureLabel")); // NOI18N
351
encryptSignatureChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
352         encryptSignatureChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
353         encryptSignatureChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
354             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
355                 encryptSignatureChBox(evt);
356             }
357         });
358
359         org.openide.awt.Mnemonics.setLocalizedText(reqDerivedKeysIssued, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireDerivedKeysIssued")); // NOI18N
360
reqDerivedKeysIssued.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
361         reqDerivedKeysIssued.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
362         reqDerivedKeysIssued.addActionListener(new java.awt.event.ActionListener JavaDoc() {
363             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
364                 reqDerivedKeysIssuedActionPerformed(evt);
365             }
366         });
367
368         org.openide.awt.Mnemonics.setLocalizedText(encryptOrderChBox, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_EncryptOrderLabel")); // NOI18N
369
encryptOrderChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
370         encryptOrderChBox.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
371         encryptOrderChBox.addActionListener(new java.awt.event.ActionListener JavaDoc() {
372             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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")); // NOI18N
379

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

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

398         keyTypeLabel.setLabelFor(keyTypeCombo);
399         org.openide.awt.Mnemonics.setLocalizedText(keyTypeLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RSTKeyType")); // NOI18N
400

401         keySizeLabel.setLabelFor(keySizeCombo);
402         org.openide.awt.Mnemonics.setLocalizedText(keySizeLabel, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RSTKeySize")); // NOI18N
403

404         tokenTypeCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
405             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
406                 tokenTypeComboActionPerformed(evt);
407             }
408         });
409
410         keyTypeCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
411             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
412                 keyTypeComboActionPerformed(evt);
413             }
414         });
415
416         keySizeCombo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
417             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
418                 keySizeComboActionPerformed(evt);
419             }
420         });
421
422         org.openide.awt.Mnemonics.setLocalizedText(reqDerivedKeys, org.openide.util.NbBundle.getMessage(STSIssuedEndorsing.class, "LBL_RequireDerivedKeysX509")); // NOI18N
423
reqDerivedKeys.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
424         reqDerivedKeys.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
425         reqDerivedKeys.addActionListener(new java.awt.event.ActionListener JavaDoc() {
426             public void actionPerformed(java.awt.event.ActionEvent JavaDoc 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 JavaDoc[] {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 JavaDoc[] {algoSuiteCombo, keySizeCombo, keyTypeCombo, layoutCombo, tokenTypeCombo}, org.jdesktop.layout.GroupLayout.VERTICAL);
522
523     }// </editor-fold>//GEN-END:initComponents
524

525     private void reqDerivedKeysActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_reqDerivedKeysActionPerformed
526
setValue(reqDerivedKeys);
527     }//GEN-LAST:event_reqDerivedKeysActionPerformed
528

529     private void keySizeComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_keySizeComboActionPerformed
530
setValue(keySizeCombo);
531     }//GEN-LAST:event_keySizeComboActionPerformed
532

533     private void keyTypeComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_keyTypeComboActionPerformed
534
setValue(keyTypeCombo);
535     }//GEN-LAST:event_keyTypeComboActionPerformed
536

537     private void tokenTypeComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_tokenTypeComboActionPerformed
538
setValue(tokenTypeCombo);
539     }//GEN-LAST:event_tokenTypeComboActionPerformed
540

541     private void issuerMetadataFieldKeyReleased(java.awt.event.KeyEvent JavaDoc evt) {//GEN-FIRST:event_issuerMetadataFieldKeyReleased
542
setValue(issuerMetadataField);
543     }//GEN-LAST:event_issuerMetadataFieldKeyReleased
544

545     private void issuerAddressFieldKeyReleased(java.awt.event.KeyEvent JavaDoc evt) {//GEN-FIRST:event_issuerAddressFieldKeyReleased
546
setValue(issuerAddressField);
547     }//GEN-LAST:event_issuerAddressFieldKeyReleased
548

549     private void encryptOrderChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_encryptOrderChBoxActionPerformed
550
setValue(encryptOrderChBox);
551     }//GEN-LAST:event_encryptOrderChBoxActionPerformed
552

553     private void reqDerivedKeysIssuedActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_reqDerivedKeysIssuedActionPerformed
554
setValue(reqDerivedKeysIssued);
555     }//GEN-LAST:event_reqDerivedKeysIssuedActionPerformed
556

557     private void reqSigConfChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_reqSigConfChBoxActionPerformed
558
setValue(reqSigConfChBox);
559     }//GEN-LAST:event_reqSigConfChBoxActionPerformed
560

561     private void derivedKeysChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_derivedKeysChBoxActionPerformed
562
setValue(derivedKeysChBox);
563     }//GEN-LAST:event_derivedKeysChBoxActionPerformed
564

565     private void secConvChBoxActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_secConvChBoxActionPerformed
566
setValue(secConvChBox);
567     }//GEN-LAST:event_secConvChBoxActionPerformed
568

569     private void encryptSignatureChBox(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_encryptSignatureChBox
570
setValue(encryptSignatureChBox);
571     }//GEN-LAST:event_encryptSignatureChBox
572

573     private void layoutComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_layoutComboActionPerformed
574
setValue(layoutCombo);
575     }//GEN-LAST:event_layoutComboActionPerformed
576

577     private void algoSuiteComboActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_algoSuiteComboActionPerformed
578
setValue(algoSuiteCombo);
579     }//GEN-LAST:event_algoSuiteComboActionPerformed
580

581     // Variables declaration - do not modify//GEN-BEGIN:variables
582
private javax.swing.JComboBox JavaDoc algoSuiteCombo;
583     private javax.swing.JLabel JavaDoc algoSuiteLabel;
584     private javax.swing.JCheckBox JavaDoc derivedKeysChBox;
585     private javax.swing.JCheckBox JavaDoc encryptOrderChBox;
586     private javax.swing.JCheckBox JavaDoc encryptSignatureChBox;
587     private javax.swing.JTextField JavaDoc issuerAddressField;
588     private javax.swing.JLabel JavaDoc issuerAddressLabel;
589     private javax.swing.JTextField JavaDoc issuerMetadataField;
590     private javax.swing.JLabel JavaDoc issuerMetadataLabel;
591     private javax.swing.JComboBox JavaDoc keySizeCombo;
592     private javax.swing.JLabel JavaDoc keySizeLabel;
593     private javax.swing.JComboBox JavaDoc keyTypeCombo;
594     private javax.swing.JLabel JavaDoc keyTypeLabel;
595     private javax.swing.JComboBox JavaDoc layoutCombo;
596     private javax.swing.JLabel JavaDoc layoutLabel;
597     private javax.swing.JCheckBox JavaDoc reqDerivedKeys;
598     private javax.swing.JCheckBox JavaDoc reqDerivedKeysIssued;
599     private javax.swing.JCheckBox JavaDoc reqSigConfChBox;
600     private javax.swing.JCheckBox JavaDoc secConvChBox;
601     private javax.swing.JComboBox JavaDoc tokenTypeCombo;
602     private javax.swing.JLabel JavaDoc tokenTypeLabel;
603     // End of variables declaration//GEN-END:variables
604

605 }
606
Popular Tags