/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.fhwa.c2cri.gui.wizard;

import java.awt.Dialog;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.UIManager;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
/**
 *
 */
public class C2CRIWizardPanel extends javax.swing.JPanel {

    /**
     * Creates new form C2CRIWizardPanel
     */
    public C2CRIWizardPanel() {
        initComponents();
    }

      /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel");

            
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    JFrame frame = new JFrame("C2CRI Wizard Test");
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    C2CRIWizardPanel dialog = new C2CRIWizardPanel();
                    frame.addWindowListener(new java.awt.event.WindowAdapter() {
                        @Override
                        public void windowClosing(java.awt.event.WindowEvent e) {
                            System.exit(0);
                        }
                    });
                    frame.setTitle("C2CRI Wizard");
                    frame.add(dialog);
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
                }
            });
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(C2CRIWizardPage.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(C2CRIWizardPage.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(C2CRIWizardPage.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(C2CRIWizardPage.class.getName()).log(Level.SEVERE, null, ex);
        }
    }      
    
    
    /**
     * Makes the Wizard Panel visible/Invisible.
     * 
     * @param visible 
     */
    public void setPanelVisible(boolean visible){
        jContainerPanel.setVisible(visible);
    }
    
    public javax.swing.JButton getWizardCreateTestButton(){
        return jWizardCreateTestButton;
    }

    public javax.swing.JButton getWizardExecuteTestButton(){
        return jWizardExecuteTestButton;
    }

    public javax.swing.JButton getWizardCreateReportButton(){
        return jWizardCreateReportButton;
    }

    public JCheckBox getjDisableCheckBox() {
        return jDisableCheckBox;
    }

    public void setjDisableCheckBox(JCheckBox jDisableCheckBox) {
        this.jDisableCheckBox = jDisableCheckBox;
    }

    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        jContainerPanel = new javax.swing.JPanel();
        jWizardCreateTestButton = new javax.swing.JButton();
        jWizardExecuteTestButton = new javax.swing.JButton();
        jWizardCreateReportButton = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jDisableCheckBox = new javax.swing.JCheckBox();
        jLabel2 = new javax.swing.JLabel();

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setBackground(new java.awt.Color(255, 255, 255));
        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 255)));
        setLayout(new java.awt.GridBagLayout());

        jContainerPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jWizardCreateTestButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jWizardCreateTestButton.setForeground(new java.awt.Color(0, 102, 255));
        jWizardCreateTestButton.setText("Create A Test");
        jWizardCreateTestButton.setToolTipText("Create a new test configuration or open an existing configuration file.");
        jWizardCreateTestButton.setName("WizardCreateTestButton"); // NOI18N
        jWizardCreateTestButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jWizardCreateTestButtonActionPerformed(evt);
            }
        });

        jWizardExecuteTestButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jWizardExecuteTestButton.setForeground(new java.awt.Color(0, 102, 204));
        jWizardExecuteTestButton.setText("Execute A Test");
        jWizardExecuteTestButton.setToolTipText("Identify and conduct an iteration of the test suite for a SUT in the RI’s Test Execution mode.");
        jWizardExecuteTestButton.setName("WizardExecuteTestButton"); // NOI18N

        jWizardCreateReportButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jWizardCreateReportButton.setForeground(new java.awt.Color(0, 102, 255));
        jWizardCreateReportButton.setText("Create A Report");
        jWizardCreateReportButton.setToolTipText("Generate different kinds of configuration or log reports to ascertain useful information.");
        jWizardCreateReportButton.setName("WizardCreateReportButton"); // NOI18N

        jPanel2.setBackground(new java.awt.Color(0, 102, 255));

        jLabel1.setBackground(new java.awt.Color(0, 102, 255));
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Wizard");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel1))
        );

        jDisableCheckBox.setText("Disable Wizard Mode");
        jDisableCheckBox.setToolTipText("Check this box to disable the wizard mode viewer from displaying in the future.");
        jDisableCheckBox.setName("WizardModeCheckbox"); // NOI18N

        javax.swing.GroupLayout jContainerPanelLayout = new javax.swing.GroupLayout(jContainerPanel);
        jContainerPanel.setLayout(jContainerPanelLayout);
        jContainerPanelLayout.setHorizontalGroup(
            jContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jContainerPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jContainerPanelLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jDisableCheckBox, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jContainerPanelLayout.createSequentialGroup()
                        .addGroup(jContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jWizardCreateTestButton, javax.swing.GroupLayout.PREFERRED_SIZE, 298, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jWizardExecuteTestButton, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jWizardCreateReportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jContainerPanelLayout.setVerticalGroup(
            jContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jContainerPanelLayout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(28, 28, 28)
                .addComponent(jWizardCreateTestButton, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jWizardExecuteTestButton, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jWizardCreateReportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jDisableCheckBox)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
        add(jContainerPanel, gridBagConstraints);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/fhwa/c2cri/gui/C2C RI Logo-01.png"))); // NOI18N
        jLabel2.setText("jLabel2");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridheight = 2;
        gridBagConstraints.ipadx = -29;
        gridBagConstraints.ipady = -63;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 3, 5);
        add(jLabel2, gridBagConstraints);
    }// </editor-fold>//GEN-END:initComponents

    private void jWizardCreateTestButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jWizardCreateTestButtonActionPerformed
//        C2CRIWizardDialog test = new C2CRIWizardDialog(new javax.swing.JFrame(),true, new C2CRWizardFactory(C2CRWizardFactory.FactoryType.TEST_CONFIGURATION));
//        test.setSize(new Dimension(950, 700));
//        test.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); // prevent user from doing something else
//        test.setLocationRelativeTo(null);
//        test.setVisible(true);      
    }//GEN-LAST:event_jWizardCreateTestButtonActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jContainerPanel;
    private javax.swing.JCheckBox jDisableCheckBox;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JButton jWizardCreateReportButton;
    private javax.swing.JButton jWizardCreateTestButton;
    private javax.swing.JButton jWizardExecuteTestButton;
    // End of variables declaration//GEN-END:variables
}
