1 19 20 package org.netbeans.modules.websvc.wsitconf.ui.service.profiles; 21 22 import org.netbeans.modules.websvc.wsitconf.ui.ComboConstants; 23 import org.netbeans.modules.xml.multiview.ui.SectionVisualTheme; 24 import org.netbeans.modules.xml.wsdl.model.WSDLComponent; 25 import org.netbeans.modules.xml.wsdl.model.WSDLModel; 26 27 31 public class Generic extends javax.swing.JPanel implements ComboConstants { 32 33 private boolean inSync = false; 34 35 private WSDLComponent comp; 36 private WSDLModel model; 37 38 41 public Generic(WSDLComponent comp) { 42 super(); 43 initComponents(); 44 this.model = comp.getModel(); 45 this.comp = comp; 46 47 algoSuiteCombo.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 48 algoSuiteLabel.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 49 authTokenCombo.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 50 authTokenLabel.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 51 confidentCombo.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 52 confidentLabel.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 53 integrityCombo.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 54 integrityLabel.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 55 56 layoutLabel.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 57 layoutCombo.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 58 wssVersionLabel.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 59 wssVersionCombo.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 60 61 derivedKeysChBox.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 62 encryptOrderChBox.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 63 entireSignChBox.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 64 protectTokenChBox.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 65 secConvChBox.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 66 timestampChBox.setBackground(SectionVisualTheme.getDocumentBackgroundColor()); 67 68 inSync = true; 69 layoutCombo.removeAllItems(); 70 layoutCombo.addItem(ComboConstants.STRICT); 71 layoutCombo.addItem(ComboConstants.LAX); 72 layoutCombo.addItem(ComboConstants.LAXTSFIRST); 73 layoutCombo.addItem(ComboConstants.LAXTSLAST); 74 75 confidentCombo.removeAllItems(); 76 confidentCombo.addItem(ComboConstants.NONE); 77 confidentCombo.addItem(ComboConstants.RANDOMSYMMETRIC_KEYS); 78 confidentCombo.addItem(ComboConstants.ISSUEDSYMMETRIC_KEYS); 79 confidentCombo.addItem(ComboConstants.TRANSPORTPROTECTION); 80 81 integrityCombo.removeAllItems(); 82 integrityCombo.addItem(ComboConstants.NONE); 83 integrityCombo.addItem(ComboConstants.ASSYMETRIC_KEYS); 84 integrityCombo.addItem(ComboConstants.RANDOMSYMMETRIC_KEYS); 85 integrityCombo.addItem(ComboConstants.ISSUEDSYMMETRIC_KEYS); 86 87 wssVersionCombo.removeAllItems(); 88 wssVersionCombo.addItem(ComboConstants.WSS10); 89 wssVersionCombo.addItem(ComboConstants.WSS11); 90 91 algoSuiteCombo.removeAllItems(); 92 algoSuiteCombo.addItem(ComboConstants.BASIC256); 93 algoSuiteCombo.addItem(ComboConstants.BASIC192); 94 algoSuiteCombo.addItem(ComboConstants.BASIC128); 95 algoSuiteCombo.addItem(ComboConstants.TRIPLEDES); 96 algoSuiteCombo.addItem(ComboConstants.BASIC256RSA15); 97 algoSuiteCombo.addItem(ComboConstants.BASIC192RSA15); 98 algoSuiteCombo.addItem(ComboConstants.BASIC128RSA15); 99 algoSuiteCombo.addItem(ComboConstants.TRIPLEDESRSA15); 100 109 authTokenCombo.removeAllItems(); 110 authTokenCombo.addItem(ComboConstants.NONE); 111 authTokenCombo.addItem(ComboConstants.USERNAME); 112 authTokenCombo.addItem(ComboConstants.X509); 113 authTokenCombo.addItem(ComboConstants.SAML); 114 authTokenCombo.addItem(ComboConstants.ISSUED); 115 authTokenCombo.addItem(ComboConstants.HTTPS); 116 authTokenCombo.addItem(ComboConstants.KERBEROS); 117 118 inSync = false; 119 120 sync(); 121 } 122 123 private void sync() { 124 inSync = true; 125 126 127 inSync = false; 128 } 129 130 public void setValue(javax.swing.JComponent source, Object value) { 131 132 if (!inSync) { 133 } 148 } 149 150 151 private void setRequireDerivedKeys(Boolean enable) { 152 if (enable == null) { 153 this.derivedKeysChBox.setSelected(false); 154 } else { 155 this.derivedKeysChBox.setSelected(enable); 156 } 157 } 158 159 164 private void initComponents() { 166 167 authTokenLabel = new javax.swing.JLabel (); 168 authTokenCombo = new javax.swing.JComboBox (); 169 integrityLabel = new javax.swing.JLabel (); 170 integrityCombo = new javax.swing.JComboBox (); 171 secConvChBox = new javax.swing.JCheckBox (); 172 timestampChBox = new javax.swing.JCheckBox (); 173 protectTokenChBox = new javax.swing.JCheckBox (); 174 entireSignChBox = new javax.swing.JCheckBox (); 175 derivedKeysChBox = new javax.swing.JCheckBox (); 176 confidentLabel = new javax.swing.JLabel (); 177 confidentCombo = new javax.swing.JComboBox (); 178 algoSuiteLabel = new javax.swing.JLabel (); 179 algoSuiteCombo = new javax.swing.JComboBox (); 180 layoutLabel = new javax.swing.JLabel (); 181 layoutCombo = new javax.swing.JComboBox (); 182 wssVersionLabel = new javax.swing.JLabel (); 183 wssVersionCombo = new javax.swing.JComboBox (); 184 encryptOrderChBox = new javax.swing.JCheckBox (); 185 186 authTokenLabel.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_AuthToken")); 188 integrityLabel.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_IntegrityLabel")); 190 secConvChBox.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_SecConvLabel")); secConvChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 192 secConvChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 193 194 timestampChBox.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_IncludeTimestamp")); timestampChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 196 timestampChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 197 198 protectTokenChBox.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_ProtectTokenLabel")); protectTokenChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 200 protectTokenChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 201 202 entireSignChBox.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_EntireSignLabel")); entireSignChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 204 entireSignChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 205 206 derivedKeysChBox.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_RequireDerivedKeys")); derivedKeysChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 208 derivedKeysChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 209 210 confidentLabel.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_ConfidentialityLabel")); 212 algoSuiteLabel.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_AlgoSuiteLabel")); 214 layoutLabel.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_LayoutLabel")); 216 wssVersionLabel.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_WSSVersionLabel")); 218 encryptOrderChBox.setText(org.openide.util.NbBundle.getMessage(Generic.class, "LBL_EncryptOrderLabel")); encryptOrderChBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); 220 encryptOrderChBox.setMargin(new java.awt.Insets (0, 0, 0, 0)); 221 222 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 223 this.setLayout(layout); 224 layout.setHorizontalGroup( 225 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 226 .add(layout.createSequentialGroup() 227 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 228 .add(layout.createSequentialGroup() 229 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 230 .add(authTokenLabel) 231 .add(integrityLabel) 232 .add(confidentLabel) 233 .add(algoSuiteLabel) 234 .add(layoutLabel) 235 .add(wssVersionLabel)) 236 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 237 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) 238 .add(algoSuiteCombo, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 239 .add(integrityCombo, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 240 .add(confidentCombo, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 241 .add(layoutCombo, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 242 .add(wssVersionCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 243 .add(authTokenCombo, 0, 144, Short.MAX_VALUE))) 244 .add(secConvChBox) 245 .add(derivedKeysChBox) 246 .add(timestampChBox) 247 .add(protectTokenChBox) 248 .add(entireSignChBox) 249 .add(encryptOrderChBox)) 250 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 251 ); 252 253 layout.linkSize(new java.awt.Component [] {algoSuiteCombo, authTokenCombo, confidentCombo, integrityCombo, layoutCombo, wssVersionCombo}, org.jdesktop.layout.GroupLayout.HORIZONTAL); 254 255 layout.setVerticalGroup( 256 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 257 .add(layout.createSequentialGroup() 258 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 259 .add(authTokenLabel) 260 .add(authTokenCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 261 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 262 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 263 .add(integrityLabel) 264 .add(integrityCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 265 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 266 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 267 .add(confidentLabel) 268 .add(confidentCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 269 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 270 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 271 .add(algoSuiteLabel) 272 .add(algoSuiteCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 273 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 274 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 275 .add(layoutLabel) 276 .add(layoutCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 277 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 278 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 279 .add(wssVersionLabel) 280 .add(wssVersionCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 281 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 282 .add(secConvChBox) 283 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 284 .add(derivedKeysChBox) 285 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 286 .add(timestampChBox) 287 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 288 .add(protectTokenChBox) 289 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 290 .add(entireSignChBox) 291 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 292 .add(encryptOrderChBox) 293 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 294 ); 295 296 layout.linkSize(new java.awt.Component [] {algoSuiteCombo, authTokenCombo, confidentCombo, integrityCombo, layoutCombo, wssVersionCombo}, org.jdesktop.layout.GroupLayout.VERTICAL); 297 298 } 300 private javax.swing.JComboBox algoSuiteCombo; 302 private javax.swing.JLabel algoSuiteLabel; 303 private javax.swing.JComboBox authTokenCombo; 304 private javax.swing.JLabel authTokenLabel; 305 private javax.swing.JComboBox confidentCombo; 306 private javax.swing.JLabel confidentLabel; 307 private javax.swing.JCheckBox derivedKeysChBox; 308 private javax.swing.JCheckBox encryptOrderChBox; 309 private javax.swing.JCheckBox entireSignChBox; 310 private javax.swing.JComboBox integrityCombo; 311 private javax.swing.JLabel integrityLabel; 312 private javax.swing.JComboBox layoutCombo; 313 private javax.swing.JLabel layoutLabel; 314 private javax.swing.JCheckBox protectTokenChBox; 315 private javax.swing.JCheckBox secConvChBox; 316 private javax.swing.JCheckBox timestampChBox; 317 private javax.swing.JComboBox wssVersionCombo; 318 private javax.swing.JLabel wssVersionLabel; 319 321 } 322 | Popular Tags |