use of org.kse.gui.crypto.JKeyIdentifier in project keystore-explorer by kaikramer.
the class DAuthorityKeyIdentifier method initComponents.
private void initComponents() {
jlKeyIdentifier = new JLabel(res.getString("DAuthorityKeyIdentifier.jlKeyIdentifer.text"));
GridBagConstraints gbc_jlKeyIdentifier = new GridBagConstraints();
gbc_jlKeyIdentifier.gridx = 0;
gbc_jlKeyIdentifier.gridy = 0;
gbc_jlKeyIdentifier.gridwidth = 1;
gbc_jlKeyIdentifier.gridheight = 1;
gbc_jlKeyIdentifier.insets = new Insets(5, 5, 5, 5);
gbc_jlKeyIdentifier.anchor = GridBagConstraints.EAST;
jkiKeyIdentifier = new JKeyIdentifier(res.getString("DAuthorityKeyIdentifier.KeyIdentifier.Title"), authorityPublicKey);
GridBagConstraints gbc_jkiKeyIdentifier = new GridBagConstraints();
gbc_jkiKeyIdentifier.gridx = 1;
gbc_jkiKeyIdentifier.gridy = 0;
gbc_jkiKeyIdentifier.gridwidth = 1;
gbc_jkiKeyIdentifier.gridheight = 1;
gbc_jkiKeyIdentifier.insets = new Insets(5, 5, 5, 5);
gbc_jkiKeyIdentifier.anchor = GridBagConstraints.WEST;
jlAuthorityCertIssuer = new JLabel(res.getString("DAuthorityKeyIdentifier.jlAuthorityCertIssuer.text"));
GridBagConstraints gbc_jlAuthorityCertIssuer = new GridBagConstraints();
gbc_jlAuthorityCertIssuer.gridx = 0;
gbc_jlAuthorityCertIssuer.gridy = 1;
gbc_jlAuthorityCertIssuer.gridwidth = 1;
gbc_jlAuthorityCertIssuer.gridheight = 1;
gbc_jlAuthorityCertIssuer.insets = new Insets(0, 5, 0, 5);
gbc_jlAuthorityCertIssuer.anchor = GridBagConstraints.NORTHEAST;
jgnAuthorityCertIssuer = new JGeneralNames(res.getString("DAuthorityKeyIdentifier.AuthorityCertIssuer.Title"));
jgnAuthorityCertIssuer.setPreferredSize(new Dimension(400, 150));
GridBagConstraints gbc_jgnAuthorityCertIssuer = new GridBagConstraints();
gbc_jgnAuthorityCertIssuer.gridx = 1;
gbc_jgnAuthorityCertIssuer.gridy = 1;
gbc_jgnAuthorityCertIssuer.gridwidth = 1;
gbc_jgnAuthorityCertIssuer.gridheight = 1;
gbc_jgnAuthorityCertIssuer.insets = new Insets(0, 5, 0, 5);
gbc_jgnAuthorityCertIssuer.anchor = GridBagConstraints.WEST;
jlAuthorityCertSerialNumber = new JLabel(res.getString("DAuthorityKeyIdentifier.jlAuthorityCertSerialNumber.text"));
GridBagConstraints gbc_jlAuthorityCertSerialNumber = new GridBagConstraints();
gbc_jlAuthorityCertSerialNumber.gridx = 0;
gbc_jlAuthorityCertSerialNumber.gridy = 2;
gbc_jlAuthorityCertSerialNumber.gridwidth = 1;
gbc_jlAuthorityCertSerialNumber.gridheight = 1;
gbc_jlAuthorityCertSerialNumber.insets = new Insets(5, 5, 5, 5);
gbc_jlAuthorityCertSerialNumber.anchor = GridBagConstraints.EAST;
jtfAuthorityCertSerialNumber = new JTextField(20);
GridBagConstraints gbc_jtfAuthorityCertSerialNumber = new GridBagConstraints();
gbc_jtfAuthorityCertSerialNumber.gridx = 1;
gbc_jtfAuthorityCertSerialNumber.gridy = 2;
gbc_jtfAuthorityCertSerialNumber.gridwidth = 1;
gbc_jtfAuthorityCertSerialNumber.gridheight = 1;
gbc_jtfAuthorityCertSerialNumber.insets = new Insets(5, 5, 5, 5);
gbc_jtfAuthorityCertSerialNumber.anchor = GridBagConstraints.WEST;
jpAuthorityKeyIdentifier = new JPanel(new GridBagLayout());
jpAuthorityKeyIdentifier.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));
jpAuthorityKeyIdentifier.add(jlKeyIdentifier, gbc_jlKeyIdentifier);
jpAuthorityKeyIdentifier.add(jkiKeyIdentifier, gbc_jkiKeyIdentifier);
jpAuthorityKeyIdentifier.add(jlAuthorityCertIssuer, gbc_jlAuthorityCertIssuer);
jpAuthorityKeyIdentifier.add(jgnAuthorityCertIssuer, gbc_jgnAuthorityCertIssuer);
jpAuthorityKeyIdentifier.add(jlAuthorityCertSerialNumber, gbc_jlAuthorityCertSerialNumber);
jpAuthorityKeyIdentifier.add(jtfAuthorityCertSerialNumber, gbc_jtfAuthorityCertSerialNumber);
jbOK = new JButton(res.getString("DAuthorityKeyIdentifier.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DAuthorityKeyIdentifier.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(jpAuthorityKeyIdentifier, BorderLayout.CENTER);
getContentPane().add(jpButtons, BorderLayout.SOUTH);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent evt) {
closeDialog();
}
});
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
use of org.kse.gui.crypto.JKeyIdentifier in project keystore-explorer by kaikramer.
the class DSubjectKeyIdentifier method initComponents.
private void initComponents() {
jlKeyIdentifier = new JLabel(res.getString("DSubjectKeyIdentifier.jlKeyIdentifer.text"));
jkiKeyIdentifier = new JKeyIdentifier(res.getString("DSubjectKeyIdentifier.KeyIdentifier.Title"), subjectPublicKey);
jpSubjectKeyIdentifier = new JPanel(new BorderLayout(5, 5));
jpSubjectKeyIdentifier.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpSubjectKeyIdentifier.add(jlKeyIdentifier, BorderLayout.WEST);
jpSubjectKeyIdentifier.add(jkiKeyIdentifier, BorderLayout.CENTER);
jbOK = new JButton(res.getString("DSubjectKeyIdentifier.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DSubjectKeyIdentifier.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(jpSubjectKeyIdentifier, BorderLayout.CENTER);
getContentPane().add(jpButtons, BorderLayout.SOUTH);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent evt) {
closeDialog();
}
});
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
Aggregations