Search in sources :

Example 1 with JGeneralNames

use of org.kse.gui.crypto.generalname.JGeneralNames in project keystore-explorer by kaikramer.

the class DIssuerAlternativeName method initComponents.

private void initComponents() {
    jlAlternativeName = new JLabel(res.getString("DIssuerAlternativeName.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("DIssuerAlternativeName.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;
    jpIssuerAlternativeName = new JPanel(new GridBagLayout());
    jpIssuerAlternativeName.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));
    jpIssuerAlternativeName.add(jlAlternativeName, gbc_jlAlternativeName);
    jpIssuerAlternativeName.add(jgnAlternativeName, gbc_jgnAlternativeName);
    jbOK = new JButton(res.getString("DIssuerAlternativeName.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

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

use of org.kse.gui.crypto.generalname.JGeneralNames in project keystore-explorer by kaikramer.

the class DAuthorityKeyIdentifier method initComponents.

private void initComponents() {
    jlKeyIdentifier = new JLabel(res.getString("DAuthorityKeyIdentifier.jlKeyIdentifer.text"));
    GridBagConstraints gbc_jlKeyIdentifier = new GridBagConstraints();
    gbc_jlKeyIdentifier.gridx = 0;
    gbc_jlKeyIdentifier.gridy = 0;
    gbc_jlKeyIdentifier.gridwidth = 1;
    gbc_jlKeyIdentifier.gridheight = 1;
    gbc_jlKeyIdentifier.insets = new Insets(5, 5, 5, 5);
    gbc_jlKeyIdentifier.anchor = GridBagConstraints.EAST;
    jkiKeyIdentifier = new JKeyIdentifier(res.getString("DAuthorityKeyIdentifier.KeyIdentifier.Title"), authorityPublicKey);
    GridBagConstraints gbc_jkiKeyIdentifier = new GridBagConstraints();
    gbc_jkiKeyIdentifier.gridx = 1;
    gbc_jkiKeyIdentifier.gridy = 0;
    gbc_jkiKeyIdentifier.gridwidth = 1;
    gbc_jkiKeyIdentifier.gridheight = 1;
    gbc_jkiKeyIdentifier.insets = new Insets(5, 5, 5, 5);
    gbc_jkiKeyIdentifier.anchor = GridBagConstraints.WEST;
    jlAuthorityCertIssuer = new JLabel(res.getString("DAuthorityKeyIdentifier.jlAuthorityCertIssuer.text"));
    GridBagConstraints gbc_jlAuthorityCertIssuer = new GridBagConstraints();
    gbc_jlAuthorityCertIssuer.gridx = 0;
    gbc_jlAuthorityCertIssuer.gridy = 1;
    gbc_jlAuthorityCertIssuer.gridwidth = 1;
    gbc_jlAuthorityCertIssuer.gridheight = 1;
    gbc_jlAuthorityCertIssuer.insets = new Insets(0, 5, 0, 5);
    gbc_jlAuthorityCertIssuer.anchor = GridBagConstraints.NORTHEAST;
    jgnAuthorityCertIssuer = new JGeneralNames(res.getString("DAuthorityKeyIdentifier.AuthorityCertIssuer.Title"));
    jgnAuthorityCertIssuer.setPreferredSize(new Dimension(400, 150));
    GridBagConstraints gbc_jgnAuthorityCertIssuer = new GridBagConstraints();
    gbc_jgnAuthorityCertIssuer.gridx = 1;
    gbc_jgnAuthorityCertIssuer.gridy = 1;
    gbc_jgnAuthorityCertIssuer.gridwidth = 1;
    gbc_jgnAuthorityCertIssuer.gridheight = 1;
    gbc_jgnAuthorityCertIssuer.insets = new Insets(0, 5, 0, 5);
    gbc_jgnAuthorityCertIssuer.anchor = GridBagConstraints.WEST;
    jlAuthorityCertSerialNumber = new JLabel(res.getString("DAuthorityKeyIdentifier.jlAuthorityCertSerialNumber.text"));
    GridBagConstraints gbc_jlAuthorityCertSerialNumber = new GridBagConstraints();
    gbc_jlAuthorityCertSerialNumber.gridx = 0;
    gbc_jlAuthorityCertSerialNumber.gridy = 2;
    gbc_jlAuthorityCertSerialNumber.gridwidth = 1;
    gbc_jlAuthorityCertSerialNumber.gridheight = 1;
    gbc_jlAuthorityCertSerialNumber.insets = new Insets(5, 5, 5, 5);
    gbc_jlAuthorityCertSerialNumber.anchor = GridBagConstraints.EAST;
    jtfAuthorityCertSerialNumber = new JTextField(20);
    GridBagConstraints gbc_jtfAuthorityCertSerialNumber = new GridBagConstraints();
    gbc_jtfAuthorityCertSerialNumber.gridx = 1;
    gbc_jtfAuthorityCertSerialNumber.gridy = 2;
    gbc_jtfAuthorityCertSerialNumber.gridwidth = 1;
    gbc_jtfAuthorityCertSerialNumber.gridheight = 1;
    gbc_jtfAuthorityCertSerialNumber.insets = new Insets(5, 5, 5, 5);
    gbc_jtfAuthorityCertSerialNumber.anchor = GridBagConstraints.WEST;
    jpAuthorityKeyIdentifier = new JPanel(new GridBagLayout());
    jpAuthorityKeyIdentifier.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));
    jpAuthorityKeyIdentifier.add(jlKeyIdentifier, gbc_jlKeyIdentifier);
    jpAuthorityKeyIdentifier.add(jkiKeyIdentifier, gbc_jkiKeyIdentifier);
    jpAuthorityKeyIdentifier.add(jlAuthorityCertIssuer, gbc_jlAuthorityCertIssuer);
    jpAuthorityKeyIdentifier.add(jgnAuthorityCertIssuer, gbc_jgnAuthorityCertIssuer);
    jpAuthorityKeyIdentifier.add(jlAuthorityCertSerialNumber, gbc_jlAuthorityCertSerialNumber);
    jpAuthorityKeyIdentifier.add(jtfAuthorityCertSerialNumber, gbc_jtfAuthorityCertSerialNumber);
    jbOK = new JButton(res.getString("DAuthorityKeyIdentifier.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            okPressed();
        }
    });
    jbCancel = new JButton(res.getString("DAuthorityKeyIdentifier.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(jpAuthorityKeyIdentifier, 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) JTextField(javax.swing.JTextField) EtchedBorder(javax.swing.border.EtchedBorder) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) JKeyIdentifier(org.kse.gui.crypto.JKeyIdentifier) 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 3 with JGeneralNames

use of org.kse.gui.crypto.generalname.JGeneralNames 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)

Aggregations

BorderLayout (java.awt.BorderLayout)3 Dimension (java.awt.Dimension)3 GridBagConstraints (java.awt.GridBagConstraints)3 GridBagLayout (java.awt.GridBagLayout)3 Insets (java.awt.Insets)3 ActionEvent (java.awt.event.ActionEvent)3 ActionListener (java.awt.event.ActionListener)3 WindowAdapter (java.awt.event.WindowAdapter)3 WindowEvent (java.awt.event.WindowEvent)3 AbstractAction (javax.swing.AbstractAction)3 JButton (javax.swing.JButton)3 JLabel (javax.swing.JLabel)3 JPanel (javax.swing.JPanel)3 CompoundBorder (javax.swing.border.CompoundBorder)3 EmptyBorder (javax.swing.border.EmptyBorder)3 EtchedBorder (javax.swing.border.EtchedBorder)3 JGeneralNames (org.kse.gui.crypto.generalname.JGeneralNames)3 JTextField (javax.swing.JTextField)1 JKeyIdentifier (org.kse.gui.crypto.JKeyIdentifier)1