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