Search in sources :

Example 36 with EtchedBorder

use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.

the class DKeyUsage method initComponents.

private void initComponents() {
    jlKeyUsage = new JLabel(res.getString("DKeyUsage.jlKeyUsage.text"));
    jlKeyUsage.setBorder(new EmptyBorder(5, 5, 0, 5));
    jcbCertificateSigning = new JCheckBox(res.getString("DKeyUsage.jcbCertificateSigning.text"));
    jcbCrlSign = new JCheckBox(res.getString("DKeyUsage.jcbCrlSign.text"));
    jcbDataEncipherment = new JCheckBox(res.getString("DKeyUsage.jcbDataEncipherment.text"));
    jcbDecipherOnly = new JCheckBox(res.getString("DKeyUsage.jcbDecipherOnly.text"));
    jcbDigitalSignature = new JCheckBox(res.getString("DKeyUsage.jcbDigitalSignature.text"));
    jcbEncipherOnly = new JCheckBox(res.getString("DKeyUsage.jcbEncipherOnly.text"));
    jcbKeyAgreement = new JCheckBox(res.getString("DKeyUsage.jcbKeyAgreement.text"));
    jcbKeyEncipherment = new JCheckBox(res.getString("DKeyUsage.jcbKeyEncipherment.text"));
    jcbNonRepudiation = new JCheckBox(res.getString("DKeyUsage.jcbNonRepudiation.text"));
    JPanel jpFirstColumn = new JPanel();
    jpFirstColumn.setLayout(new BoxLayout(jpFirstColumn, BoxLayout.Y_AXIS));
    jpFirstColumn.add(jcbCertificateSigning);
    jpFirstColumn.add(jcbCrlSign);
    jpFirstColumn.add(jcbDataEncipherment);
    JPanel jpSecondColumn = new JPanel();
    jpSecondColumn.setLayout(new BoxLayout(jpSecondColumn, BoxLayout.Y_AXIS));
    jpSecondColumn.add(jcbDecipherOnly);
    jpSecondColumn.add(jcbDigitalSignature);
    jpSecondColumn.add(jcbEncipherOnly);
    JPanel jpThirdColumn = new JPanel();
    jpThirdColumn.setLayout(new BoxLayout(jpThirdColumn, BoxLayout.Y_AXIS));
    jpThirdColumn.add(jcbKeyAgreement);
    jpThirdColumn.add(jcbKeyEncipherment);
    jpThirdColumn.add(jcbNonRepudiation);
    jpKeyUsages = new JPanel();
    jpKeyUsages.setLayout(new BoxLayout(jpKeyUsages, BoxLayout.X_AXIS));
    jpKeyUsages.add(jpFirstColumn);
    jpKeyUsages.add(jpSecondColumn);
    jpKeyUsages.add(jpThirdColumn);
    jpKeyUsage = new JPanel(new BorderLayout(5, 5));
    jpKeyUsage.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpKeyUsage.add(jlKeyUsage, BorderLayout.NORTH);
    jpKeyUsage.add(jpKeyUsages, BorderLayout.CENTER);
    jbOK = new JButton(res.getString("DKeyUsage.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DKeyUsage.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(jpKeyUsage, 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) ActionEvent(java.awt.event.ActionEvent) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) JCheckBox(javax.swing.JCheckBox) 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 37 with EtchedBorder

use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.

the class DNameConstraints method initComponents.

private void initComponents() {
    jlPermittedSubtrees = new JLabel(res.getString("DNameConstraints.jlPermittedSubtrees.text"));
    GridBagConstraints gbc_jlPermittedSubtrees = new GridBagConstraints();
    gbc_jlPermittedSubtrees.gridx = 0;
    gbc_jlPermittedSubtrees.gridy = 0;
    gbc_jlPermittedSubtrees.gridwidth = 1;
    gbc_jlPermittedSubtrees.gridheight = 1;
    gbc_jlPermittedSubtrees.insets = new Insets(5, 5, 5, 5);
    gbc_jlPermittedSubtrees.anchor = GridBagConstraints.NORTHEAST;
    jgsPermittedSubtrees = new JGeneralSubtrees(res.getString("DNameConstraints.PermittedSubtrees.Title"));
    jgsPermittedSubtrees.setToolTipText(res.getString("DNameConstraints.jgsPermittedSubtrees.tooltip"));
    GridBagConstraints gbc_jgsPermittedSubtrees = new GridBagConstraints();
    gbc_jgsPermittedSubtrees.gridx = 1;
    gbc_jgsPermittedSubtrees.gridy = 0;
    gbc_jgsPermittedSubtrees.gridwidth = 1;
    gbc_jgsPermittedSubtrees.gridheight = 1;
    gbc_jgsPermittedSubtrees.insets = new Insets(5, 5, 5, 5);
    gbc_jgsPermittedSubtrees.anchor = GridBagConstraints.WEST;
    jlExcludedSubtrees = new JLabel(res.getString("DNameConstraints.jlExcludedSubtrees.text"));
    GridBagConstraints gbc_jlExcludedSubtrees = new GridBagConstraints();
    gbc_jlExcludedSubtrees.gridx = 0;
    gbc_jlExcludedSubtrees.gridy = 1;
    gbc_jlExcludedSubtrees.gridwidth = 1;
    gbc_jlExcludedSubtrees.gridheight = 1;
    gbc_jlExcludedSubtrees.insets = new Insets(5, 5, 5, 5);
    gbc_jlExcludedSubtrees.anchor = GridBagConstraints.NORTHEAST;
    jgsExcludedSubtrees = new JGeneralSubtrees(res.getString("DNameConstraints.ExcludedSubtrees.Title"));
    jgsExcludedSubtrees.setToolTipText(res.getString("DNameConstraints.jgsExcludedSubtrees.tooltip"));
    GridBagConstraints gbc_jgsExcludedSubtrees = new GridBagConstraints();
    gbc_jgsExcludedSubtrees.gridx = 1;
    gbc_jgsExcludedSubtrees.gridy = 1;
    gbc_jgsExcludedSubtrees.gridwidth = 1;
    gbc_jgsExcludedSubtrees.gridheight = 1;
    gbc_jgsExcludedSubtrees.insets = new Insets(5, 5, 5, 5);
    gbc_jgsExcludedSubtrees.anchor = GridBagConstraints.WEST;
    jpNameConstraints = new JPanel(new GridBagLayout());
    jpNameConstraints.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpNameConstraints.add(jlPermittedSubtrees, gbc_jlPermittedSubtrees);
    jpNameConstraints.add(jgsPermittedSubtrees, gbc_jgsPermittedSubtrees);
    jpNameConstraints.add(jlExcludedSubtrees, gbc_jlExcludedSubtrees);
    jpNameConstraints.add(jgsExcludedSubtrees, gbc_jgsExcludedSubtrees);
    jbOK = new JButton(res.getString("DNameConstraints.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DNameConstraints.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(jpNameConstraints, 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) JGeneralSubtrees(org.kse.gui.crypto.generalsubtree.JGeneralSubtrees) 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 38 with EtchedBorder

use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.

the class DNetscapeCaPolicyUrl method initComponents.

private void initComponents() {
    jlNetscapeCaPolicyUrl = new JLabel(res.getString("DNetscapeCaPolicyUrl.jlNetscapeCaPolicyUrl.text"));
    jtfNetscapeCaPolicyUrl = new JTextField(40);
    jpNetscapeCaPolicyUrl = new JPanel(new BorderLayout(5, 5));
    jpNetscapeCaPolicyUrl.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpNetscapeCaPolicyUrl.add(jlNetscapeCaPolicyUrl, BorderLayout.NORTH);
    jpNetscapeCaPolicyUrl.add(jtfNetscapeCaPolicyUrl, BorderLayout.CENTER);
    jbOK = new JButton(res.getString("DNetscapeCaPolicyUrl.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DNetscapeCaPolicyUrl.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(jpNetscapeCaPolicyUrl, 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) 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 39 with EtchedBorder

use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.

the class DNetscapeCaRevocationUrl method initComponents.

private void initComponents() {
    jlNetscapeCaRevocationUrl = new JLabel(res.getString("DNetscapeCaRevocationUrl.jlNetscapeCaRevocationUrl.text"));
    jtfNetscapeCaRevocationUrl = new JTextField(40);
    jpNetscapeCaRevocationUrl = new JPanel(new BorderLayout(5, 5));
    jpNetscapeCaRevocationUrl.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpNetscapeCaRevocationUrl.add(jlNetscapeCaRevocationUrl, BorderLayout.NORTH);
    jpNetscapeCaRevocationUrl.add(jtfNetscapeCaRevocationUrl, BorderLayout.CENTER);
    jbOK = new JButton(res.getString("DNetscapeCaRevocationUrl.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DNetscapeCaRevocationUrl.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(jpNetscapeCaRevocationUrl, 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) 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 40 with EtchedBorder

use of javax.swing.border.EtchedBorder in project keystore-explorer by kaikramer.

the class DNetscapeCertificateRenewalUrl method initComponents.

private void initComponents() {
    jlNetscapeCertificateRenewalUrl = new JLabel(res.getString("DNetscapeCertificateRenewalUrl.jlNetscapeCertificateRenewalUrl.text"));
    jtfNetscapeCertificateRenewalUrl = new JTextField(40);
    jpNetscapeCertificateRenewalUrl = new JPanel(new BorderLayout(5, 5));
    jpNetscapeCertificateRenewalUrl.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpNetscapeCertificateRenewalUrl.add(jlNetscapeCertificateRenewalUrl, BorderLayout.NORTH);
    jpNetscapeCertificateRenewalUrl.add(jtfNetscapeCertificateRenewalUrl, BorderLayout.CENTER);
    jbOK = new JButton(res.getString("DNetscapeCertificateRenewalUrl.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DNetscapeCertificateRenewalUrl.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(jpNetscapeCertificateRenewalUrl, 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) 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)

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