/** * Get the mechanism info for the gui. */ public MechanismInfo getMechanismInfo() { List<ParameterInfo> params = new ArrayList<ParameterInfo>(); params.add(new ParameterInfo("responses", "Number of evaluated certificate responses " + "(must all be equal, use 1 for bootstrapping, use <1 to disable)", int.class, Integer.valueOf(responses))); MechanismInfo ret = new MechanismInfo("Decentralized", getClass(), params); return ret; }
public void actionPerformed(ActionEvent e) { AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cb.isSelected()? Boolean.TRUE: Boolean.FALSE); } });
Class<?> cl = mi.getClazz(); if(ocl.getComponent(cl)==null) List<ParameterInfo> pis = mi.getParameterInfos(); for(final ParameterInfo pi: pis)
Class<?> cl = mi.getClazz(); if(ocl.getComponent(cl)==null) List<ParameterInfo> pis = mi.getParameterInfos(); for(final ParameterInfo pi: pis)
public void actionPerformed(ActionEvent e) { AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cb.isSelected()? Boolean.TRUE: Boolean.FALSE); } });
/** * Get the mechanism info for the gui. */ public MechanismInfo getMechanismInfo() { List<ParameterInfo> params = new ArrayList<ParameterInfo>(); params.add(new ParameterInfo("responses", "Number of evaluated certificate responses " + "(must all be equal, use 1 for bootstrapping, use <1 to disable)", int.class, Integer.valueOf(responses))); MechanismInfo ret = new MechanismInfo("Decentralized", getClass(), params); return ret; }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String val = value instanceof MechanismInfo? SReflect.getInnerClassName(((MechanismInfo)value).getClazz()): (String)value; return super.getListCellRendererComponent(list, val, index, isSelected, cellHasFocus); } });
/** * Get the mechanism info for the gui. */ public MechanismInfo getMechanismInfo() { List<ParameterInfo> params = new ArrayList<ParameterInfo>(); params.add(new ParameterInfo("verify", "If turned on, the ttp is verify (its certificate must be in local keystore)", boolean.class, verify)); params.add(new ParameterInfo("ttpcid", "The component identifier (or name) of the trusted third party", IComponentIdentifier.class, ttpcid)); MechanismInfo ret = new MechanismInfo("Trusted Third Party", getClass(), params); return ret; }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String val = value instanceof MechanismInfo? SReflect.getInnerClassName(((MechanismInfo)value).getClazz()): (String)value; return super.getListCellRendererComponent(list, val, index, isSelected, cellHasFocus); } });
/** * Get the mechanism info for the gui. */ public MechanismInfo getMechanismInfo() { List<ParameterInfo> params = new ArrayList<ParameterInfo>(); params.add(new ParameterInfo("verify", "If turned on, the ttp is verify (its certificate must be in local keystore)", boolean.class, verify)); params.add(new ParameterInfo("ttpcid", "The component identifier (or name) of the trusted third party", IComponentIdentifier.class, ttpcid)); MechanismInfo ret = new MechanismInfo("Trusted Third Party", getClass(), params); return ret; }
public void run() { String name = tf.getText(); IComponentIdentifier cid = name.length()>0? new BasicComponentIdentifier(name): null; AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cid); } }, tf);
public void run() { String name = tf.getText(); IComponentIdentifier cid = name.length()>0? new ComponentIdentifier(name): null; AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cid); } }, tf);
public void itemStateChanged(ItemEvent e) { Object o = cbmechs.getSelectedItem(); final MechanismInfo mi = o instanceof MechanismInfo? (MechanismInfo)o: null; AcquireCertificatePanel.this.secser.setAcquisitionMechanism(mi!=null? mi.getClazz(): null); if(mi==null) { if(ocl.getComponent("none")==null) { JPanel p = new JPanel(new BorderLayout()); p.add(new JLabel("Deactivated", JLabel.CENTER), BorderLayout.CENTER); pdetail.add(p, "none"); } ocl.show("none"); } else { createMechanismPanel(mi); ocl.show(mi.getClazz()); } } });
public void itemStateChanged(ItemEvent e) { Object o = cbmechs.getSelectedItem(); final MechanismInfo mi = o instanceof MechanismInfo? (MechanismInfo)o: null; AcquireCertificatePanel.this.secser.setAcquisitionMechanism(mi!=null? mi.getClazz(): null); if(mi==null) { if(ocl.getComponent("none")==null) { JPanel p = new JPanel(new BorderLayout()); p.add(new JLabel("Deactivated", JLabel.CENTER), BorderLayout.CENTER); pdetail.add(p, "none"); } ocl.show("none"); } else { createMechanismPanel(mi); ocl.show(mi.getClazz()); } } });
public void actionPerformed(ActionEvent e) { IComponentIdentifier cid = csd.selectAgent(null); if(cid!=null) { // tf.setText(cid.getName()); AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cid); } } });
public void actionPerformed(ActionEvent e) { IComponentIdentifier cid = csd.selectAgent(null); if(cid!=null) { // tf.setText(cid.getName()); AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cid); } } });
/** * Create checkbox for boolean choices. */ protected void createCheckBox(PropertiesPanel pp, final ParameterInfo pi, final MechanismInfo mi) { final JCheckBox cb = pp.createCheckBox(pi.getName(), ((Boolean)pi.getValue()).booleanValue(), true); cb.setToolTipText(pi.getDescription()); cb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cb.isSelected()? Boolean.TRUE: Boolean.FALSE); } }); updateactions.put(mi.getClazz().getName()+"."+pi.getName(), new ICommand<Object>() { public void execute(Object val) { cb.setSelected(((Boolean)val).booleanValue()); } }); }
/** * Create checkbox for boolean choices. */ protected void createCheckBox(PropertiesPanel pp, final ParameterInfo pi, final MechanismInfo mi) { final JCheckBox cb = pp.createCheckBox(pi.getName(), ((Boolean)pi.getValue()).booleanValue(), true); cb.setToolTipText(pi.getDescription()); cb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cb.isSelected()? Boolean.TRUE: Boolean.FALSE); } }); updateactions.put(mi.getClazz().getName()+"."+pi.getName(), new ICommand<Object>() { public void execute(Object val) { cb.setSelected(((Boolean)val).booleanValue()); } }); }
public void run() { Object val = tf.getText(); Class<?> cl = pi.getType(); if(!String.class.equals(cl)) { IStringObjectConverter conv = BasicTypeConverter.getBasicStringConverter(cl); if(conv==null) // todo: return; try { val = conv.convertString((String)val, null); } catch(Exception ex) { throw new RuntimeException(ex); } } AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), val); } };
public void run() { Object val = tf.getText(); Class<?> cl = pi.getType(); if(!String.class.equals(cl)) { IStringObjectConverter conv = BasicTypeConverter.getBasicStringConverter(cl); if(conv==null) // todo: return; try { val = conv.convertString((String)val, null); } catch(Exception ex) { throw new RuntimeException(ex); } } AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), val); } };