Search in sources :

Example 1 with JAccessDescriptions

use of org.kse.gui.crypto.accessdescription.JAccessDescriptions in project keystore-explorer by kaikramer.

the class DAuthorityInformationAccess method initComponents.

private void initComponents() {
    jlAccessDescriptions = new JLabel(res.getString("DAuthorityInformationAccess.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("DAuthorityInformationAccess.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("DAuthorityInformationAccess.jbOK.text"));
    jbOK.addActionListener(new ActionListener() {

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

Example 2 with JAccessDescriptions

use of org.kse.gui.crypto.accessdescription.JAccessDescriptions 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

BorderLayout (java.awt.BorderLayout)2 GridBagConstraints (java.awt.GridBagConstraints)2 GridBagLayout (java.awt.GridBagLayout)2 Insets (java.awt.Insets)2 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 WindowAdapter (java.awt.event.WindowAdapter)2 WindowEvent (java.awt.event.WindowEvent)2 AbstractAction (javax.swing.AbstractAction)2 JButton (javax.swing.JButton)2 JLabel (javax.swing.JLabel)2 JPanel (javax.swing.JPanel)2 CompoundBorder (javax.swing.border.CompoundBorder)2 EmptyBorder (javax.swing.border.EmptyBorder)2 EtchedBorder (javax.swing.border.EtchedBorder)2 JAccessDescriptions (org.kse.gui.crypto.accessdescription.JAccessDescriptions)2