use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.
the class DGetAlias method initComponents.
private void initComponents(final String alias) {
getContentPane().setLayout(new BorderLayout());
jlAlias = new JLabel(res.getString("DGetAlias.jlAlias.text"));
jtfAlias = new JTextField(15);
if (alias != null) {
jtfAlias.setText(alias);
jtfAlias.setCaretPosition(0);
}
jbOK = new JButton(res.getString("DGetAlias.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DGetAlias.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();
}
});
jpAlias = new JPanel(new FlowLayout(FlowLayout.CENTER));
jpAlias.add(jlAlias);
jpAlias.add(jtfAlias);
jpAlias.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpButtons = PlatformUtil.createDialogButtonPanel(jbOK, jbCancel, false);
getContentPane().add(jpAlias, BorderLayout.CENTER);
getContentPane().add(jpButtons, BorderLayout.SOUTH);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent evt) {
closeDialog();
}
});
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (alias != null) {
jbOK.requestFocus();
} else {
jtfAlias.requestFocus();
}
}
});
}
use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.
the class DPolicyConstraints method initComponents.
private void initComponents() {
jlPolicyConstraints = new JLabel(res.getString("DPolicyConstraints.jlPolicyConstraints.text"));
GridBagConstraints gbc_jlPolicyConstraints = new GridBagConstraints();
gbc_jlPolicyConstraints.gridx = 0;
gbc_jlPolicyConstraints.gridy = 0;
gbc_jlPolicyConstraints.gridwidth = 2;
gbc_jlPolicyConstraints.insets = new Insets(5, 5, 5, 5);
gbc_jlPolicyConstraints.anchor = GridBagConstraints.WEST;
jlRequireExplicitPolicy = new JLabel(res.getString("DPolicyConstraints.jlRequireExplicitPolicy.text"));
GridBagConstraints gbc_jlRequireExplicitPolicy = new GridBagConstraints();
gbc_jlRequireExplicitPolicy.gridx = 0;
gbc_jlRequireExplicitPolicy.gridy = 1;
gbc_jlRequireExplicitPolicy.gridwidth = 1;
gbc_jlRequireExplicitPolicy.insets = new Insets(5, 5, 5, 5);
gbc_jlRequireExplicitPolicy.anchor = GridBagConstraints.EAST;
jtfRequireExplicitPolicy = new JTextField(3);
GridBagConstraints gbc_jtfRequireExplicitPolicy = new GridBagConstraints();
gbc_jtfRequireExplicitPolicy.gridx = 1;
gbc_jtfRequireExplicitPolicy.gridy = 1;
gbc_jtfRequireExplicitPolicy.gridwidth = 1;
gbc_jtfRequireExplicitPolicy.insets = new Insets(5, 5, 5, 5);
gbc_jtfRequireExplicitPolicy.anchor = GridBagConstraints.WEST;
jlInhibitPolicyMapping = new JLabel(res.getString("DPolicyConstraints.jlInhibitPolicyMapping.text"));
GridBagConstraints gbc_jlInhibitPolicyMapping = new GridBagConstraints();
gbc_jlInhibitPolicyMapping.gridx = 0;
gbc_jlInhibitPolicyMapping.gridy = 2;
gbc_jlInhibitPolicyMapping.gridwidth = 1;
gbc_jlInhibitPolicyMapping.insets = new Insets(5, 5, 5, 5);
gbc_jlInhibitPolicyMapping.anchor = GridBagConstraints.EAST;
jtfInhibitPolicyMapping = new JTextField(3);
GridBagConstraints gbc_jtfInhibitPolicyMapping = new GridBagConstraints();
gbc_jtfInhibitPolicyMapping.gridx = 1;
gbc_jtfInhibitPolicyMapping.gridy = 2;
gbc_jtfInhibitPolicyMapping.gridwidth = 1;
gbc_jtfInhibitPolicyMapping.insets = new Insets(5, 5, 5, 5);
gbc_jtfInhibitPolicyMapping.anchor = GridBagConstraints.WEST;
jpPolicyConstraints = new JPanel(new GridBagLayout());
jpPolicyConstraints.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpPolicyConstraints.add(jlPolicyConstraints, gbc_jlPolicyConstraints);
jpPolicyConstraints.add(jlRequireExplicitPolicy, gbc_jlRequireExplicitPolicy);
jpPolicyConstraints.add(jtfRequireExplicitPolicy, gbc_jtfRequireExplicitPolicy);
jpPolicyConstraints.add(jlInhibitPolicyMapping, gbc_jlInhibitPolicyMapping);
jpPolicyConstraints.add(jtfInhibitPolicyMapping, gbc_jtfInhibitPolicyMapping);
jbOK = new JButton(res.getString("DPolicyConstraints.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DPolicyConstraints.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(jpPolicyConstraints, 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 javax.swing.border.EtchedBorder 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();
}
use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.
the class DSubjectAlternativeName method initComponents.
private void initComponents() {
jlAlternativeName = new JLabel(res.getString("DSubjectAlternativeName.jlAlternativeName.text"));
GridBagConstraints gbc_jlAlternativeName = new GridBagConstraints();
gbc_jlAlternativeName.gridx = 0;
gbc_jlAlternativeName.gridy = 1;
gbc_jlAlternativeName.gridwidth = 1;
gbc_jlAlternativeName.gridheight = 1;
gbc_jlAlternativeName.insets = new Insets(5, 5, 5, 5);
gbc_jlAlternativeName.anchor = GridBagConstraints.NORTHEAST;
jgnAlternativeName = new JGeneralNames(res.getString("DSubjectAlternativeName.AlternativeName.Title"));
jgnAlternativeName.setPreferredSize(new Dimension(400, 150));
GridBagConstraints gbc_jgnAlternativeName = new GridBagConstraints();
gbc_jgnAlternativeName.gridx = 1;
gbc_jgnAlternativeName.gridy = 1;
gbc_jgnAlternativeName.gridwidth = 1;
gbc_jgnAlternativeName.gridheight = 1;
gbc_jgnAlternativeName.insets = new Insets(5, 5, 5, 5);
gbc_jgnAlternativeName.anchor = GridBagConstraints.WEST;
jpSubjectAlternativeName = new JPanel(new GridBagLayout());
jpSubjectAlternativeName.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));
jpSubjectAlternativeName.add(jlAlternativeName, gbc_jlAlternativeName);
jpSubjectAlternativeName.add(jgnAlternativeName, gbc_jgnAlternativeName);
jbOK = new JButton(res.getString("DSubjectAlternativeName.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DSubjectAlternativeName.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(jpSubjectAlternativeName, 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 javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.
the class DSubjectInformationAccess method initComponents.
private void initComponents() {
jlAccessDescriptions = new JLabel(res.getString("DSubjectInformationAccess.jlAccessDescriptions.text"));
GridBagConstraints gbc_jlAccessDescriptions = new GridBagConstraints();
gbc_jlAccessDescriptions.gridx = 0;
gbc_jlAccessDescriptions.gridy = 0;
gbc_jlAccessDescriptions.gridwidth = 1;
gbc_jlAccessDescriptions.gridheight = 1;
gbc_jlAccessDescriptions.insets = new Insets(5, 5, 5, 5);
gbc_jlAccessDescriptions.anchor = GridBagConstraints.NORTHEAST;
jadAccessDescriptions = new JAccessDescriptions(res.getString("DSubjectInformationAccess.AccessDescription.Title"));
GridBagConstraints gbc_jadAccessDescriptions = new GridBagConstraints();
gbc_jadAccessDescriptions.gridx = 1;
gbc_jadAccessDescriptions.gridy = 0;
gbc_jadAccessDescriptions.gridwidth = 1;
gbc_jadAccessDescriptions.gridheight = 1;
gbc_jadAccessDescriptions.insets = new Insets(5, 5, 5, 5);
gbc_jadAccessDescriptions.anchor = GridBagConstraints.WEST;
jpAccessDescriptions = new JPanel(new GridBagLayout());
jpAccessDescriptions.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
jpAccessDescriptions.add(jlAccessDescriptions, gbc_jlAccessDescriptions);
jpAccessDescriptions.add(jadAccessDescriptions, gbc_jadAccessDescriptions);
jbOK = new JButton(res.getString("DSubjectInformationAccess.jbOK.text"));
jbOK.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
okPressed();
}
});
jbCancel = new JButton(res.getString("DSubjectInformationAccess.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(jpAccessDescriptions, BorderLayout.CENTER);
getContentPane().add(jpButtons, BorderLayout.SOUTH);
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent evt) {
closeDialog();
}
});
setResizable(false);
getRootPane().setDefaultButton(jbOK);
pack();
}
Aggregations