Search in sources :

Example 41 with EtchedBorder

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

the class DNetscapeCertificateType method initComponents.

private void initComponents() {
    jlNetscapeCertificateType = new JLabel(res.getString("DNetscapeCertificateType.jlNetscapeCertificateType.text"));
    jlNetscapeCertificateType.setBorder(new EmptyBorder(5, 5, 0, 5));
    jcbObjectSigning = new JCheckBox(res.getString("DNetscapeCertificateType.jcbObjectSigning.text"));
    jcbObjectSigningCa = new JCheckBox(res.getString("DNetscapeCertificateType.jcbObjectSigningCa.text"));
    jcbReserved = new JCheckBox(res.getString("DNetscapeCertificateType.jcbReserved.text"));
    jcbSmime = new JCheckBox(res.getString("DNetscapeCertificateType.jcbSmime.text"));
    jcbSmimeCa = new JCheckBox(res.getString("DNetscapeCertificateType.jcbSmimeCa.text"));
    jcbSslCa = new JCheckBox(res.getString("DNetscapeCertificateType.jcbSslCa.text"));
    jcbSslClient = new JCheckBox(res.getString("DNetscapeCertificateType.jcbSslClient.text"));
    jcbSslServer = new JCheckBox(res.getString("DNetscapeCertificateType.jcbSslServer.text"));
    JPanel jpFirstColumn = new JPanel();
    jpFirstColumn.setLayout(new BoxLayout(jpFirstColumn, BoxLayout.Y_AXIS));
    jpFirstColumn.add(jcbObjectSigning);
    jpFirstColumn.add(jcbObjectSigningCa);
    jpFirstColumn.add(jcbReserved);
    JPanel jpSecondColumn = new JPanel();
    jpSecondColumn.setLayout(new BoxLayout(jpSecondColumn, BoxLayout.Y_AXIS));
    jpSecondColumn.add(jcbSmime);
    jpSecondColumn.add(jcbSmimeCa);
    jpSecondColumn.add(jcbSslCa);
    JPanel jpThirdColumn = new JPanel();
    jpThirdColumn.setLayout(new BoxLayout(jpThirdColumn, BoxLayout.Y_AXIS));
    jpThirdColumn.add(jcbSslClient);
    jpThirdColumn.add(jcbSslServer);
    jpThirdColumn.add(Box.createVerticalGlue());
    jpNetscapeCertificateTypes = new JPanel();
    jpNetscapeCertificateTypes.setLayout(new BoxLayout(jpNetscapeCertificateTypes, BoxLayout.X_AXIS));
    jpNetscapeCertificateTypes.add(jpFirstColumn);
    jpNetscapeCertificateTypes.add(jpSecondColumn);
    jpNetscapeCertificateTypes.add(jpThirdColumn);
    jpNetscapeCertificateType = new JPanel(new BorderLayout(5, 5));
    jpNetscapeCertificateType.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpNetscapeCertificateType.add(jlNetscapeCertificateType, BorderLayout.NORTH);
    jpNetscapeCertificateType.add(jpNetscapeCertificateTypes, BorderLayout.CENTER);
    jbOK = new JButton(res.getString("DNetscapeCertificateType.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

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

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

the class DNetscapeComment method initComponents.

private void initComponents() {
    jlNetscapeComment = new JLabel(res.getString("DNetscapeComment.jlNetscapeComment.text"));
    jtaNetscapeComment = new JTextArea();
    jtaNetscapeComment.setFont(new Font(Font.MONOSPACED, Font.PLAIN, LnfUtil.getDefaultFontSize()));
    jspNetscapeComment = PlatformUtil.createScrollPane(jtaNetscapeComment, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    jspNetscapeComment.setPreferredSize(new Dimension(300, 200));
    jpNetscapeComment = new JPanel(new BorderLayout(5, 5));
    jpNetscapeComment.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new CompoundBorder(new EtchedBorder(), new EmptyBorder(5, 5, 5, 5))));
    jpNetscapeComment.add(jlNetscapeComment, BorderLayout.NORTH);
    jpNetscapeComment.add(jspNetscapeComment, BorderLayout.CENTER);
    jbOK = new JButton(res.getString("DNetscapeComment.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DNetscapeComment.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(jpNetscapeComment, 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) JTextArea(javax.swing.JTextArea) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) WindowAdapter(java.awt.event.WindowAdapter) Dimension(java.awt.Dimension) Font(java.awt.Font) 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 43 with EtchedBorder

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

the class DNetscapeRevocationUrl method initComponents.

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

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

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

the class DNetscapeSslServerName method initComponents.

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

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

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

the class DPrivateKeyUsagePeriod method initComponents.

private void initComponents() {
    jlNotBefore = new JLabel(res.getString("DPrivateKeyUsagePeriod.jlNotBefore.text"));
    GridBagConstraints gbc_jlNotBefore = new GridBagConstraints();
    gbc_jlNotBefore.gridx = 0;
    gbc_jlNotBefore.gridy = 0;
    gbc_jlNotBefore.gridwidth = 1;
    gbc_jlNotBefore.gridheight = 1;
    gbc_jlNotBefore.insets = new Insets(5, 5, 5, 5);
    gbc_jlNotBefore.anchor = GridBagConstraints.EAST;
    jdtNotBefore = new JDateTime(res.getString("DPrivateKeyUsagePeriod.jdtNotBefore.text"));
    jdtNotBefore.setToolTipText(res.getString("DPrivateKeyUsagePeriod.jdtNotBefore.tooltip"));
    GridBagConstraints gbc_jdtNotBefore = new GridBagConstraints();
    gbc_jdtNotBefore.gridx = 1;
    gbc_jdtNotBefore.gridy = 0;
    gbc_jdtNotBefore.gridwidth = 1;
    gbc_jdtNotBefore.gridheight = 1;
    gbc_jdtNotBefore.insets = new Insets(5, 5, 5, 5);
    gbc_jdtNotBefore.anchor = GridBagConstraints.WEST;
    jlNotAfter = new JLabel(res.getString("DPrivateKeyUsagePeriod.jlNotAfter.text"));
    GridBagConstraints gbc_jlNotAfter = new GridBagConstraints();
    gbc_jlNotAfter.gridx = 0;
    gbc_jlNotAfter.gridy = 1;
    gbc_jlNotAfter.gridwidth = 1;
    gbc_jlNotAfter.gridheight = 1;
    gbc_jlNotAfter.insets = new Insets(5, 5, 5, 5);
    gbc_jlNotAfter.anchor = GridBagConstraints.EAST;
    jdtNotAfter = new JDateTime(res.getString("DPrivateKeyUsagePeriod.jdtNotAfter.text"));
    jdtNotAfter.setToolTipText(res.getString("DPrivateKeyUsagePeriod.jdtNotAfter.tooltip"));
    GridBagConstraints gbc_jdtNotAfter = new GridBagConstraints();
    gbc_jdtNotAfter.gridx = 1;
    gbc_jdtNotAfter.gridy = 1;
    gbc_jdtNotAfter.gridwidth = 1;
    gbc_jdtNotAfter.gridheight = 1;
    gbc_jdtNotAfter.insets = new Insets(5, 5, 5, 5);
    gbc_jdtNotAfter.anchor = GridBagConstraints.WEST;
    jpPrivateKeyUsagePeriod = new JPanel(new FlowLayout());
    jpPrivateKeyUsagePeriod.add(jlNotBefore);
    jpPrivateKeyUsagePeriod.add(jdtNotBefore);
    jpPrivateKeyUsagePeriod.add(jlNotAfter);
    jpPrivateKeyUsagePeriod.add(jdtNotAfter);
    jpPrivateKeyUsagePeriod = new JPanel(new GridBagLayout());
    jpPrivateKeyUsagePeriod.add(jlNotBefore, gbc_jlNotBefore);
    jpPrivateKeyUsagePeriod.add(jdtNotBefore, gbc_jdtNotBefore);
    jpPrivateKeyUsagePeriod.add(jlNotAfter, gbc_jlNotAfter);
    jpPrivateKeyUsagePeriod.add(jdtNotAfter, gbc_jdtNotAfter);
    jpPrivateKeyUsagePeriod.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));
    jbOK = new JButton(res.getString("DPrivateKeyUsagePeriod.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DPrivateKeyUsagePeriod.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(jpPrivateKeyUsagePeriod, 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) FlowLayout(java.awt.FlowLayout) 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) JDateTime(org.kse.gui.datetime.JDateTime) 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