use of org.kse.gui.oid.JObjectId in project keystore-explorer by kaikramer.
the class DPolicyMappingChooser method initComponents.
private void initComponents(PolicyMapping policyMapping) {
jlIssuerDomainPolicy = new JLabel(res.getString("DPolicyMappingChooser.jlIssuerDomainPolicy.text"));
GridBagConstraints gbc_jlIssuerDomainPolicy = new GridBagConstraints();
gbc_jlIssuerDomainPolicy.gridx = 0;
gbc_jlIssuerDomainPolicy.gridy = 0;
gbc_jlIssuerDomainPolicy.gridwidth = 1;
gbc_jlIssuerDomainPolicy.gridheight = 1;
gbc_jlIssuerDomainPolicy.insets = new Insets(5, 5, 5, 5);
gbc_jlIssuerDomainPolicy.anchor = GridBagConstraints.EAST;
joiIssuerDomainPolicy = new JObjectId(res.getString("DPolicyMappingChooser.IssuerDomainPolicy.Title"));
joiIssuerDomainPolicy.setToolTipText(res.getString("DPolicyMappingChooser.joiIssuerDomainPolicy.tooltip"));
GridBagConstraints gbc_joiIssuerDomainPolicy = new GridBagConstraints();
gbc_joiIssuerDomainPolicy.gridx = 1;
gbc_joiIssuerDomainPolicy.gridy = 0;
gbc_joiIssuerDomainPolicy.gridwidth = 1;
gbc_joiIssuerDomainPolicy.gridheight = 1;
gbc_joiIssuerDomainPolicy.insets = new Insets(5, 5, 5, 5);
gbc_joiIssuerDomainPolicy.anchor = GridBagConstraints.WEST;
jlSubjectDomainPolicy = new JLabel(res.getString("DPolicyMappingChooser.jlSubjectDomainPolicy.text"));
GridBagConstraints gbc_jlSubjectDomainPolicy = new GridBagConstraints();
gbc_jlSubjectDomainPolicy.gridx = 0;
gbc_jlSubjectDomainPolicy.gridy = 1;
gbc_jlSubjectDomainPolicy.gridwidth = 1;
gbc_jlSubjectDomainPolicy.gridheight = 1;
gbc_jlSubjectDomainPolicy.insets = new Insets(5, 5, 5, 5);
gbc_jlSubjectDomainPolicy.anchor = GridBagConstraints.EAST;
joiSubjectDomainPolicy = new JObjectId(res.getString("DPolicyMappingChooser.SubjectDomainPolicy.Title"));
joiSubjectDomainPolicy.setToolTipText(res.getString("DPolicyMappingChooser.joiSubjectDomainPolicy.tooltip"));
GridBagConstraints gbc_joiSubjectDomainPolicy = new GridBagConstraints();
gbc_joiSubjectDomainPolicy.gridx = 1;
gbc_joiSubjectDomainPolicy.gridy = 1;
gbc_joiSubjectDomainPolicy.gridwidth = 1;
gbc_joiSubjectDomainPolicy.gridheight = 1;
gbc_joiSubjectDomainPolicy.insets = new Insets(5, 5, 5, 5);
gbc_joiSubjectDomainPolicy.anchor = GridBagConstraints.WEST;
jpPolicyMapping = new JPanel(new GridBagLayout());
jpPolicyMapping.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpPolicyMapping.add(jlIssuerDomainPolicy, gbc_jlIssuerDomainPolicy);
jpPolicyMapping.add(joiIssuerDomainPolicy, gbc_joiIssuerDomainPolicy);
jpPolicyMapping.add(jlSubjectDomainPolicy, gbc_jlSubjectDomainPolicy);
jpPolicyMapping.add(joiSubjectDomainPolicy, gbc_joiSubjectDomainPolicy);
jbOK = new JButton(res.getString("DPolicyMappingChooser.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DPolicyMappingChooser.jbCancel.text"));
jbCancel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jbCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_KEY);
jbCancel.getActionMap().put(CANCEL_KEY, new AbstractAction() {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jpButtons = PlatformUtil.createDialogButtonPanel(jbOK, jbCancel, false);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(BorderLayout.CENTER, jpPolicyMapping);
getContentPane().add(BorderLayout.SOUTH, jpButtons);
populate(policyMapping);
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
use of org.kse.gui.oid.JObjectId in project keystore-explorer by kaikramer.
the class DAccessDescriptionChooser method initComponents.
private void initComponents(AccessDescription accessDescription) {
jlAccessMethod = new JLabel(res.getString("DAccessDescriptionChooser.jlAccessMethod.text"));
GridBagConstraints gbc_jlAccessMethod = new GridBagConstraints();
gbc_jlAccessMethod.gridx = 0;
gbc_jlAccessMethod.gridy = 0;
gbc_jlAccessMethod.gridwidth = 1;
gbc_jlAccessMethod.gridheight = 1;
gbc_jlAccessMethod.insets = new Insets(5, 5, 5, 5);
gbc_jlAccessMethod.anchor = GridBagConstraints.EAST;
joiAccessMethod = new JObjectId(res.getString("DAccessDescriptionChooser.AccessMethod.Text"));
joiAccessMethod.setToolTipText(res.getString("DAccessDescriptionChooser.joiAccessMethod.tooltip"));
GridBagConstraints gbc_joiAccessMethod = new GridBagConstraints();
gbc_joiAccessMethod.gridx = 1;
gbc_joiAccessMethod.gridy = 0;
gbc_joiAccessMethod.gridwidth = 1;
gbc_joiAccessMethod.gridheight = 1;
gbc_joiAccessMethod.insets = new Insets(5, 5, 5, 5);
gbc_joiAccessMethod.anchor = GridBagConstraints.WEST;
jlAccessLocation = new JLabel(res.getString("DAccessDescriptionChooser.jlAccessLocation.text"));
GridBagConstraints gbc_jlAccessLocation = new GridBagConstraints();
gbc_jlAccessLocation.gridx = 0;
gbc_jlAccessLocation.gridy = 1;
gbc_jlAccessLocation.gridwidth = 1;
gbc_jlAccessLocation.gridheight = 1;
gbc_jlAccessLocation.insets = new Insets(5, 5, 5, 5);
gbc_jlAccessLocation.anchor = GridBagConstraints.EAST;
jgnAccessLocation = new JGeneralName(res.getString("DAccessDescriptionChooser.AccessLocation.Title"));
jgnAccessLocation.setToolTipText(res.getString("DAccessDescriptionChooser.jgnAccessLocation.tooltip"));
GridBagConstraints gbc_jgnAccessLocation = new GridBagConstraints();
gbc_jgnAccessLocation.gridx = 1;
gbc_jgnAccessLocation.gridy = 1;
gbc_jgnAccessLocation.gridwidth = 1;
gbc_jgnAccessLocation.gridheight = 1;
gbc_jgnAccessLocation.insets = new Insets(5, 5, 5, 5);
gbc_jgnAccessLocation.anchor = GridBagConstraints.WEST;
jpAccessDescription = new JPanel(new GridBagLayout());
jpAccessDescription.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpAccessDescription.add(jlAccessMethod, gbc_jlAccessMethod);
jpAccessDescription.add(joiAccessMethod, gbc_joiAccessMethod);
jpAccessDescription.add(jlAccessLocation, gbc_jlAccessLocation);
jpAccessDescription.add(jgnAccessLocation, gbc_jgnAccessLocation);
jbOK = new JButton(res.getString("DAccessDescriptionChooser.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DAccessDescriptionChooser.jbCancel.text"));
jbCancel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jbCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_KEY);
jbCancel.getActionMap().put(CANCEL_KEY, new AbstractAction() {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jpButtons = PlatformUtil.createDialogButtonPanel(jbOK, jbCancel, false);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(BorderLayout.CENTER, jpAccessDescription);
getContentPane().add(BorderLayout.SOUTH, jpButtons);
populate(accessDescription);
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
use of org.kse.gui.oid.JObjectId in project keystore-explorer by kaikramer.
the class DGeneralNameChooser method initComponents.
private void initComponents(GeneralName generalName) {
jrbDirectoryName = new JRadioButton(res.getString("DGeneralNameChooser.jrbDirectoryName.text"));
jrbDirectoryName.setToolTipText(res.getString("DGeneralNameChooser.jrbDirectoryName.tooltip"));
jrbDnsName = new JRadioButton(res.getString("DGeneralNameChooser.jrbDnsName.text"));
jrbDnsName.setToolTipText(res.getString("DGeneralNameChooser.jrbDnsName.tooltip"));
jrbIpAddress = new JRadioButton(res.getString("DGeneralNameChooser.jrbIpAddress.text"));
jrbIpAddress.setToolTipText(res.getString("DGeneralNameChooser.jrbIpAddress.tooltip"));
jrbRegisteredId = new JRadioButton(res.getString("DGeneralNameChooser.jrbRegisteredId.text"));
jrbRegisteredId.setToolTipText(res.getString("DGeneralNameChooser.jrbRegisteredId.tooltip"));
jrbRfc822Name = new JRadioButton(res.getString("DGeneralNameChooser.jrbRfc822Name.text"));
jrbRfc822Name.setToolTipText(res.getString("DGeneralNameChooser.jrbRfc822Name.tooltip"));
jrbUniformResourceIdentifier = new JRadioButton(res.getString("DGeneralNameChooser.jrbUniformResourceIdentifier.text"));
jrbUniformResourceIdentifier.setToolTipText(res.getString("DGeneralNameChooser.jrbUniformResourceIdentifier.tooltip"));
jrbPrincipalName = new JRadioButton(res.getString("DGeneralNameChooser.jrbPrincipalName.text"));
jrbPrincipalName.setToolTipText(res.getString("DGeneralNameChooser.jrbPrincipalName.tooltip"));
ButtonGroup bgGeneralName = new ButtonGroup();
bgGeneralName.add(jrbDirectoryName);
bgGeneralName.add(jrbDnsName);
bgGeneralName.add(jrbIpAddress);
bgGeneralName.add(jrbRegisteredId);
bgGeneralName.add(jrbRfc822Name);
bgGeneralName.add(jrbUniformResourceIdentifier);
bgGeneralName.add(jrbPrincipalName);
jlGeneralNameType = new JLabel(res.getString("DGeneralNameChooser.jlGeneralNameType.text"));
jlGeneralNameValue = new JLabel(res.getString("DGeneralNameChooser.jlGeneralNameValue.text"));
jpGeneralNameValue = new JPanel(new FlowLayout(FlowLayout.LEFT));
jdnDirectoryName = new JDistinguishedName(res.getString("DGeneralNameChooser.DirectoryName.Title"), 20, true);
jtfDnsName = new JTextField(30);
jtfIpAddress = new JTextField(30);
joiRegisteredId = new JObjectId(res.getString("DGeneralNameChooser.RegisteredId.Title"));
jtfRfc822Name = new JTextField(30);
jtfUniformResourceIdentifier = new JTextField(30);
jtfPrincipalName = new JTextField(30);
jbOK = new JButton(res.getString("DGeneralNameChooser.jbOK.text"));
jbCancel = new JButton(res.getString("DGeneralNameChooser.jbCancel.text"));
jbCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_KEY);
jpButtons = PlatformUtil.createDialogButtonPanel(jbOK, jbCancel);
Container pane = getContentPane();
pane.setLayout(new MigLayout("insets dialog, fill", "[]rel[]", ""));
pane.add(jlGeneralNameType, "spanx, wrap");
pane.add(jrbDirectoryName, "");
pane.add(jrbDnsName, "");
pane.add(jrbIpAddress, "");
pane.add(jrbRegisteredId, "wrap");
pane.add(jrbRfc822Name, "");
pane.add(jrbUniformResourceIdentifier, "");
pane.add(jrbPrincipalName, "wrap");
pane.add(jlGeneralNameValue, "spanx");
pane.add(jpGeneralNameValue, "spanx, wrap");
pane.add(new JSeparator(), "spanx, growx, wrap para");
pane.add(jpButtons, "right, spanx");
// actions
jrbDirectoryName.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jrbDnsName.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jrbRegisteredId.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jrbIpAddress.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jrbRfc822Name.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jrbUniformResourceIdentifier.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jrbPrincipalName.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent evt) {
generalNameTypeChanged();
}
});
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jbCancel.getActionMap().put(CANCEL_KEY, new AbstractAction() {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
populate(generalName);
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
use of org.kse.gui.oid.JObjectId in project keystore-explorer by kaikramer.
the class DPolicyInformationChooser method initComponents.
private void initComponents(PolicyInformation policyInformation) throws IOException {
jlPolicyIdentifier = new JLabel(res.getString("DPolicyInformationChooser.jlPolicyIdentifier.text"));
GridBagConstraints gbc_jlPolicyIdentifier = new GridBagConstraints();
gbc_jlPolicyIdentifier.gridx = 0;
gbc_jlPolicyIdentifier.gridy = 0;
gbc_jlPolicyIdentifier.gridwidth = 1;
gbc_jlPolicyIdentifier.gridheight = 1;
gbc_jlPolicyIdentifier.insets = new Insets(5, 5, 5, 5);
gbc_jlPolicyIdentifier.anchor = GridBagConstraints.EAST;
joiPolicyIdentifier = new JObjectId(res.getString("DPolicyInformationChooser.PolicyIdentifier.Text"));
joiPolicyIdentifier.setToolTipText(res.getString("DPolicyInformationChooser.joiPolicyIdentifier.tooltip"));
GridBagConstraints gbc_joiPolicyIdentifier = new GridBagConstraints();
gbc_joiPolicyIdentifier.gridx = 1;
gbc_joiPolicyIdentifier.gridy = 0;
gbc_joiPolicyIdentifier.gridwidth = 1;
gbc_joiPolicyIdentifier.gridheight = 1;
gbc_joiPolicyIdentifier.insets = new Insets(5, 5, 5, 5);
gbc_joiPolicyIdentifier.anchor = GridBagConstraints.WEST;
jlPolicyQualifiers = new JLabel(res.getString("DPolicyInformationChooser.jlPolicyQualifiers.text"));
GridBagConstraints gbc_jlPolicyQualifiers = new GridBagConstraints();
gbc_jlPolicyQualifiers.gridx = 0;
gbc_jlPolicyQualifiers.gridy = 1;
gbc_jlPolicyQualifiers.gridwidth = 1;
gbc_jlPolicyQualifiers.gridheight = 1;
gbc_jlPolicyQualifiers.insets = new Insets(5, 5, 5, 5);
gbc_jlPolicyQualifiers.anchor = GridBagConstraints.NORTHEAST;
jpqPolicyQualifiers = new JPolicyQualifierInfo(res.getString("DPolicyInformationChooser.PolicyQualifierInfo.Title"));
jpqPolicyQualifiers.setPreferredSize(new Dimension(400, 150));
GridBagConstraints gbc_jpqPolicyQualifiers = new GridBagConstraints();
gbc_jpqPolicyQualifiers.gridx = 1;
gbc_jpqPolicyQualifiers.gridy = 1;
gbc_jpqPolicyQualifiers.gridwidth = 1;
gbc_jpqPolicyQualifiers.gridheight = 1;
gbc_jpqPolicyQualifiers.insets = new Insets(5, 5, 5, 5);
gbc_jpqPolicyQualifiers.anchor = GridBagConstraints.WEST;
jpPolicyInformation = new JPanel(new GridBagLayout());
jpPolicyInformation.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpPolicyInformation.add(jlPolicyIdentifier, gbc_jlPolicyIdentifier);
jpPolicyInformation.add(joiPolicyIdentifier, gbc_joiPolicyIdentifier);
jpPolicyInformation.add(jlPolicyQualifiers, gbc_jlPolicyQualifiers);
jpPolicyInformation.add(jpqPolicyQualifiers, gbc_jpqPolicyQualifiers);
jbOK = new JButton(res.getString("DPolicyInformationChooser.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DPolicyInformationChooser.jbCancel.text"));
jbCancel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jbCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_KEY);
jbCancel.getActionMap().put(CANCEL_KEY, new AbstractAction() {
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent evt) {
cancelPressed();
}
});
jpButtons = PlatformUtil.createDialogButtonPanel(jbOK, jbCancel, false);
getContentPane().setLayout(new BorderLayout());
getContentPane().add(BorderLayout.CENTER, jpPolicyInformation);
getContentPane().add(BorderLayout.SOUTH, jpButtons);
populate(policyInformation);
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
Aggregations