use of org.kse.gui.crypto.policyinformation.JPolicyInformation in project keystore-explorer by kaikramer.
the class DCertificatePolicies method initComponents.
private void initComponents() {
jlCertificatePolicies = new JLabel(res.getString("DCertificatePolicies.jlCertificatePolicies.text"));
GridBagConstraints gbc_jlCertificatePolicies = new GridBagConstraints();
gbc_jlCertificatePolicies.gridx = 0;
gbc_jlCertificatePolicies.gridy = 1;
gbc_jlCertificatePolicies.gridwidth = 1;
gbc_jlCertificatePolicies.gridheight = 1;
gbc_jlCertificatePolicies.insets = new Insets(5, 5, 5, 5);
gbc_jlCertificatePolicies.anchor = GridBagConstraints.NORTHEAST;
jpiCertificatePolicies = new JPolicyInformation(res.getString("DCertificatePolicies.PolicyInformation.Title"));
jpiCertificatePolicies.setPreferredSize(new Dimension(400, 150));
GridBagConstraints gbc_jpiCertificatePolicies = new GridBagConstraints();
gbc_jpiCertificatePolicies.gridx = 1;
gbc_jpiCertificatePolicies.gridy = 1;
gbc_jpiCertificatePolicies.gridwidth = 1;
gbc_jpiCertificatePolicies.gridheight = 1;
gbc_jpiCertificatePolicies.insets = new Insets(5, 5, 5, 5);
gbc_jpiCertificatePolicies.anchor = GridBagConstraints.WEST;
jpCertificatePolicies = new JPanel(new GridBagLayout());
jpCertificatePolicies.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));
jpCertificatePolicies.add(jlCertificatePolicies, gbc_jlCertificatePolicies);
jpCertificatePolicies.add(jpiCertificatePolicies, gbc_jpiCertificatePolicies);
jbOK = new JButton(res.getString("DCertificatePolicies.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DCertificatePolicies.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(jpCertificatePolicies, BorderLayout.CENTER);
getContentPane().add(jpButtons, BorderLayout.SOUTH);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent evt) {
closeDialog();
}
});
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
Aggregations