Search in sources :

Example 1 with NewAction

use of org.kse.gui.actions.NewAction in project keystore-explorer by kaikramer.

the class JQuickStartPane method initComponents.

private void initComponents() {
    jqslHeading = new JQuickStartLabel(res.getString("JQuickStartPane.jqslHeading.text"));
    jqslHeading.setForeground(TEXT_COLOR);
    jqslHeading.setFont(jqslHeading.getFont().deriveFont(20f));
    Toolkit toolKit = Toolkit.getDefaultToolkit();
    ImageIcon newImage = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbNewKeyStore.image"))));
    ImageIcon newImageRollOver = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbNewKeyStore.rollover.image"))));
    jqsbNewKeyStore = new JQuickStartButton(new NewAction(kseFrame), res.getString("JQuickStartPane.jqsbNewKeyStore.text"), newImage, newImageRollOver, TEXT_COLOR, TEXT_ROLLOVER_COLOR);
    jqsbNewKeyStore.setOpaque(false);
    ImageIcon openImage = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbOpenKeyStore.image"))));
    ImageIcon openImageRollOver = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbOpenKeyStore.rollover.image"))));
    jqsbOpenKeyStore = new JQuickStartButton(new OpenAction(kseFrame), res.getString("JQuickStartPane.jqsbOpenKeyStore.text"), openImage, openImageRollOver, TEXT_COLOR, TEXT_ROLLOVER_COLOR);
    jqsbOpenKeyStore.setOpaque(false);
    ImageIcon openDefaultImage = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbOpenDefaultKeyStore.image"))));
    ImageIcon openDefaultImageRollOver = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbOpenDefaultKeyStore.rollover.image"))));
    jqsbOpenDefaultKeyStore = new JQuickStartButton(new OpenDefaultAction(kseFrame), res.getString("JQuickStartPane.jqsbOpenDefaultKeyStore.text"), openDefaultImage, openDefaultImageRollOver, TEXT_COLOR, TEXT_ROLLOVER_COLOR);
    jqsbOpenDefaultKeyStore.setOpaque(false);
    ImageIcon openCaCertificatesImage = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbOpenCaCertificatesKeyStore.image"))));
    ImageIcon openCaCertificatesImageRollOver = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbOpenCaCertificatesKeyStore.rollover.image"))));
    jqsbOpenCaCertificatesKeyStore = new JQuickStartButton(new OpenCaCertificatesAction(kseFrame), res.getString("JQuickStartPane.jqsbOpenCaCertificatesKeyStore.text"), openCaCertificatesImage, openCaCertificatesImageRollOver, TEXT_COLOR, TEXT_ROLLOVER_COLOR);
    jqsbOpenCaCertificatesKeyStore.setOpaque(false);
    ImageIcon examineCertificateImage = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbExamineCertificate.image"))));
    ImageIcon examineCertificateImageRollOver = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbExamineCertificate.rollover.image"))));
    jqsbExamineCertificate = new JQuickStartButton(new ExamineFileAction(kseFrame), res.getString("JQuickStartPane.jqsbExamineCertificate.text"), examineCertificateImage, examineCertificateImageRollOver, TEXT_COLOR, TEXT_ROLLOVER_COLOR);
    jqsbExamineCertificate.setOpaque(false);
    ImageIcon helpImage = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbHelp.image"))));
    ImageIcon helpImageRollOver = new ImageIcon(toolKit.createImage(getClass().getResource(res.getString("JQuickStartPane.jqsbHelp.rollover.image"))));
    jqsbHelp = new JQuickStartButton(new HelpAction(kseFrame), res.getString("JQuickStartPane.jqsbHelp.text"), helpImage, helpImageRollOver, TEXT_COLOR, TEXT_ROLLOVER_COLOR);
    jqsbHelp.setOpaque(false);
    GridBagConstraints gbc_jqslHeading = new GridBagConstraints();
    gbc_jqslHeading.gridheight = 1;
    gbc_jqslHeading.gridwidth = 3;
    gbc_jqslHeading.gridx = 0;
    gbc_jqslHeading.gridy = 0;
    gbc_jqslHeading.insets = new Insets(0, 0, 20, 0);
    GridBagConstraints gbc_jqsbNewKeyStore = new GridBagConstraints();
    gbc_jqsbNewKeyStore.gridheight = 1;
    gbc_jqsbNewKeyStore.gridwidth = 1;
    gbc_jqsbNewKeyStore.gridx = 0;
    gbc_jqsbNewKeyStore.gridy = 1;
    gbc_jqsbNewKeyStore.insets = new Insets(0, 0, 10, 10);
    GridBagConstraints gbc_jqsbOpenKeyStore = new GridBagConstraints();
    gbc_jqsbOpenKeyStore.gridheight = 1;
    gbc_jqsbOpenKeyStore.gridwidth = 1;
    gbc_jqsbOpenKeyStore.gridx = 1;
    gbc_jqsbOpenKeyStore.gridy = 1;
    gbc_jqsbOpenKeyStore.insets = new Insets(0, 10, 10, 10);
    GridBagConstraints gbc_jqsbOpenDefaultKeyStore = new GridBagConstraints();
    gbc_jqsbOpenDefaultKeyStore.gridheight = 1;
    gbc_jqsbOpenDefaultKeyStore.gridwidth = 1;
    gbc_jqsbOpenDefaultKeyStore.gridx = 2;
    gbc_jqsbOpenDefaultKeyStore.gridy = 1;
    gbc_jqsbOpenDefaultKeyStore.insets = new Insets(0, 10, 10, 10);
    GridBagConstraints gbc_jqsbOpenCaCertificatesKeyStore = new GridBagConstraints();
    gbc_jqsbOpenCaCertificatesKeyStore.gridheight = 1;
    gbc_jqsbOpenCaCertificatesKeyStore.gridwidth = 1;
    gbc_jqsbOpenCaCertificatesKeyStore.gridx = 0;
    gbc_jqsbOpenCaCertificatesKeyStore.gridy = 2;
    gbc_jqsbOpenCaCertificatesKeyStore.insets = new Insets(10, 0, 0, 10);
    GridBagConstraints gbc_jqsbExamineCertificate = new GridBagConstraints();
    gbc_jqsbExamineCertificate.gridheight = 1;
    gbc_jqsbExamineCertificate.gridwidth = 1;
    gbc_jqsbExamineCertificate.gridx = 1;
    gbc_jqsbExamineCertificate.gridy = 2;
    gbc_jqsbExamineCertificate.insets = new Insets(10, 10, 0, 10);
    GridBagConstraints gbc_jqsbHelp = new GridBagConstraints();
    gbc_jqsbHelp.gridheight = 1;
    gbc_jqsbHelp.gridwidth = 1;
    gbc_jqsbHelp.gridx = 2;
    gbc_jqsbHelp.gridy = 2;
    gbc_jqsbHelp.insets = new Insets(10, 10, 0, 0);
    jpQuickStart = new JPanel(new GridBagLayout());
    jpQuickStart.setOpaque(false);
    jpQuickStart.add(jqslHeading, gbc_jqslHeading);
    jpQuickStart.add(jqsbNewKeyStore, gbc_jqsbNewKeyStore);
    jpQuickStart.add(jqsbOpenKeyStore, gbc_jqsbOpenKeyStore);
    jpQuickStart.add(jqsbOpenDefaultKeyStore, gbc_jqsbOpenDefaultKeyStore);
    jpQuickStart.add(jqsbOpenCaCertificatesKeyStore, gbc_jqsbOpenCaCertificatesKeyStore);
    jpQuickStart.add(jqsbExamineCertificate, gbc_jqsbExamineCertificate);
    jpQuickStart.add(jqsbHelp, gbc_jqsbHelp);
    // Put in panel to prevent resize of controls and center them
    // horizontally
    jpNonResizeCenterHorizontally = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
    jpNonResizeCenterHorizontally.setOpaque(false);
    jpNonResizeCenterHorizontally.add(jpQuickStart);
    // Set pane's layout to center controls vertically
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    add(Box.createVerticalGlue());
    add(jpNonResizeCenterHorizontally);
}
Also used : ImageIcon(javax.swing.ImageIcon) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) HelpAction(org.kse.gui.actions.HelpAction) Insets(java.awt.Insets) FlowLayout(java.awt.FlowLayout) ExamineFileAction(org.kse.gui.actions.ExamineFileAction) GridBagLayout(java.awt.GridBagLayout) BoxLayout(javax.swing.BoxLayout) OpenCaCertificatesAction(org.kse.gui.actions.OpenCaCertificatesAction) OpenAction(org.kse.gui.actions.OpenAction) OpenDefaultAction(org.kse.gui.actions.OpenDefaultAction) Toolkit(java.awt.Toolkit) NewAction(org.kse.gui.actions.NewAction)

Aggregations

FlowLayout (java.awt.FlowLayout)1 GridBagConstraints (java.awt.GridBagConstraints)1 GridBagLayout (java.awt.GridBagLayout)1 Insets (java.awt.Insets)1 Toolkit (java.awt.Toolkit)1 BoxLayout (javax.swing.BoxLayout)1 ImageIcon (javax.swing.ImageIcon)1 JPanel (javax.swing.JPanel)1 ExamineFileAction (org.kse.gui.actions.ExamineFileAction)1 HelpAction (org.kse.gui.actions.HelpAction)1 NewAction (org.kse.gui.actions.NewAction)1 OpenAction (org.kse.gui.actions.OpenAction)1 OpenCaCertificatesAction (org.kse.gui.actions.OpenCaCertificatesAction)1 OpenDefaultAction (org.kse.gui.actions.OpenDefaultAction)1