/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * BranchView.java
 *
 * Created on Nov 21, 2009, 5:35:30 PM
 */

package cstutor.quizcreation;

/**
 *
 * @author Josh Robinson
 */
public class BranchView extends javax.swing.JFrame {

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

    /** 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() {

        cancelB = new javax.swing.JButton();
        failDialogueL = new javax.swing.JLabel();
        relatedSectionL = new javax.swing.JLabel();
        belowL = new javax.swing.JLabel();
        pageBranchL = new javax.swing.JLabel();
        quizBranchingL = new javax.swing.JLabel();
        relatedSectionCB = new javax.swing.JComboBox();
        okB = new javax.swing.JButton();
        belowTF = new javax.swing.JTextField();
        pageBranchCB = new javax.swing.JComboBox();
        failDialogueSP = new javax.swing.JScrollPane();
        failDialogueTA = new javax.swing.JTextArea();

        setResizable(false);

        cancelB.setText("Cancel");
        cancelB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelBActionPerformed(evt);
            }
        });

        failDialogueL.setText("Fail Dialogue");

        relatedSectionL.setText("Related Section");

        belowL.setText("Below");

        pageBranchL.setText("Page to Branch to");

        quizBranchingL.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        quizBranchingL.setText("Quiz Branching");

        okB.setText("OK");
        okB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okBActionPerformed(evt);
            }
        });

        belowTF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                belowTFActionPerformed(evt);
            }
        });

        failDialogueTA.setColumns(20);
        failDialogueSP.setViewportView(failDialogueTA);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(131, 131, 131)
                        .addComponent(quizBranchingL))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pageBranchCB, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(pageBranchL))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(belowTF, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(belowL))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(relatedSectionL)
                            .addComponent(relatedSectionCB, 0, 165, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(cancelB)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 268, Short.MAX_VALUE)
                        .addComponent(okB))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(failDialogueL))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(failDialogueSP, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(quizBranchingL)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(belowL)
                    .addComponent(relatedSectionL)
                    .addComponent(pageBranchL))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pageBranchCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(belowTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(relatedSectionCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(failDialogueL)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(failDialogueSP, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(okB)
                    .addComponent(cancelB))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void belowTFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_belowTFActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_belowTFActionPerformed

    private void cancelBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelBActionPerformed
        // TODO add your handling code here:
        this.setVisible(false);
    }//GEN-LAST:event_cancelBActionPerformed

    private void okBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBActionPerformed
        // TODO add your handling code here:
        this.setVisible(false);
    }//GEN-LAST:event_okBActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new BranchView().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel belowL;
    private javax.swing.JTextField belowTF;
    private javax.swing.JButton cancelB;
    private javax.swing.JLabel failDialogueL;
    private javax.swing.JScrollPane failDialogueSP;
    private javax.swing.JTextArea failDialogueTA;
    private javax.swing.JButton okB;
    private javax.swing.JComboBox pageBranchCB;
    private javax.swing.JLabel pageBranchL;
    private javax.swing.JLabel quizBranchingL;
    private javax.swing.JComboBox relatedSectionCB;
    private javax.swing.JLabel relatedSectionL;
    // End of variables declaration//GEN-END:variables

}