Search in sources :

Example 91 with EtchedBorder

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();
            }
        }
    });
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) JTextField(javax.swing.JTextField) EtchedBorder(javax.swing.border.EtchedBorder) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) WindowEvent(java.awt.event.WindowEvent) CompoundBorder(javax.swing.border.CompoundBorder) EmptyBorder(javax.swing.border.EmptyBorder) AbstractAction(javax.swing.AbstractAction)

Example 92 with EtchedBorder

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();
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) JTextField(javax.swing.JTextField) EtchedBorder(javax.swing.border.EtchedBorder) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) WindowEvent(java.awt.event.WindowEvent) CompoundBorder(javax.swing.border.CompoundBorder) EmptyBorder(javax.swing.border.EmptyBorder) AbstractAction(javax.swing.AbstractAction)

Example 93 with EtchedBorder

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();
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) EtchedBorder(javax.swing.border.EtchedBorder) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) WindowEvent(java.awt.event.WindowEvent) JPolicyMappings(org.kse.gui.crypto.policymapping.JPolicyMappings) CompoundBorder(javax.swing.border.CompoundBorder) EmptyBorder(javax.swing.border.EmptyBorder) AbstractAction(javax.swing.AbstractAction)

Example 94 with EtchedBorder

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();
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) Dimension(java.awt.Dimension) EtchedBorder(javax.swing.border.EtchedBorder) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) WindowEvent(java.awt.event.WindowEvent) CompoundBorder(javax.swing.border.CompoundBorder) EmptyBorder(javax.swing.border.EmptyBorder) AbstractAction(javax.swing.AbstractAction) JGeneralNames(org.kse.gui.crypto.generalname.JGeneralNames)

Example 95 with EtchedBorder

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();
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) EtchedBorder(javax.swing.border.EtchedBorder) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) WindowEvent(java.awt.event.WindowEvent) CompoundBorder(javax.swing.border.CompoundBorder) JAccessDescriptions(org.kse.gui.crypto.accessdescription.JAccessDescriptions) EmptyBorder(javax.swing.border.EmptyBorder) AbstractAction(javax.swing.AbstractAction)

Aggregations

EtchedBorder (javax.swing.border.EtchedBorder)116 JPanel (javax.swing.JPanel)92 JButton (javax.swing.JButton)74 JLabel (javax.swing.JLabel)74 ActionEvent (java.awt.event.ActionEvent)73 BorderLayout (java.awt.BorderLayout)72 ActionListener (java.awt.event.ActionListener)70 EmptyBorder (javax.swing.border.EmptyBorder)63 CompoundBorder (javax.swing.border.CompoundBorder)62 AbstractAction (javax.swing.AbstractAction)58 WindowAdapter (java.awt.event.WindowAdapter)55 WindowEvent (java.awt.event.WindowEvent)55 Insets (java.awt.Insets)46 GridBagConstraints (java.awt.GridBagConstraints)43 GridBagLayout (java.awt.GridBagLayout)43 JTextField (javax.swing.JTextField)40 Dimension (java.awt.Dimension)24 TitledBorder (javax.swing.border.TitledBorder)22 FlowLayout (java.awt.FlowLayout)18 JScrollPane (javax.swing.JScrollPane)17