/*
 * ClassView.java
 *
 * Created on December 7, 2007, 12:16 PM
 */

/**
 *
 * @author  admin
 */
public class ClassView extends javax.swing.JFrame {
    
    private Object table[][] = new Object [][]{
        { "CPE 101", null, null, null,null,null},
        {
            null,"Section 1  10AM-11AM  P.Nico  14-224","Section 5  9:AM-10AM  M.Robinson  2-24",
            "Section 1  10AM-11AM  P.Nico  14-224",
            "Section 5  9:AM-10AM  M.Robinson  2-24","Section 1  10AM-11AM  P.Nico  14-224"         
        },
        {
            null,"Section 1  10AM-11AM  P.Nico  14-224","Section 5  9:AM-10AM  M.Robinson  2-24",
            "Section 1  10AM-11AM  P.Nico  14-224",
            "Section 5  9:AM-10AM  M.Robinson  2-24","Section 1  10AM-11AM  P.Nico  14-224"    
        },
        {
            null,"Section 1  10AM-11AM  P.Nico  14-224","Section 5  9:AM-10AM  M.Robinson  2-24",
            "Section 1  10AM-11AM  P.Nico  14-224",
            "Section 5  9:AM-10AM  M.Robinson  2-24","Section 1  10AM-11AM  P.Nico  14-224"   
        },
        {
            null,"Section 1  10AM-11AM  P.Nico  14-224","Section 5  9:AM-10AM  M.Robinson  2-24",
            "Section 1  10AM-11AM  P.Nico  14-224",
            "Section 5  9:AM-10AM  M.Robinson  2-24","Section 1  10AM-11AM  P.Nico  14-224"   
        },
        {
            null,null,"Section 5  9:AM-10AM  M.Robinson  2-24",
            null,"Section 5  9:AM-10AM  M.Robinson  2-24",null   
        },
        {
            "CPE 102",
            null,null,null,null,null
        },
        {
            null,
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
                    "Section 1 9AM-10AM  A.Spanos  3-102"
        },
        {
            null,
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
                    "Section 1 9AM-10AM  A.Spanos  3-102"
        },
        {
            null,
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
                    "Section 1 9AM-10AM  A.Spanos  3-102"
        },
        {
           null,
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
            "Section 1 9AM-10AM  A.Spanos  3-102","Section 7  11AM-12PM  J.Bellardo  2-11",
                    "Section 1 9AM-10AM  A.Spanos  3-102"
        }
    };
    
    /** Creates new form ClassView */
    public ClassView() {
        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.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Room 14-234", null, null, null, "", ""},
                {"6 AM", "", "", "", "", ""},
                {"7 AM", "", "", "", "", ""},
                {"8 AM", "", "", "", "", ""},
                {"9 AM", "", "CPE 357 Staley", "", "CPE 357 Staley", ""},
                {"10 AM", "CPE 101 Smith", "CPE 101 Johnson", "CPE 101 Smith", "CPE 101 Johnson", ""},
                {"11 AM", "CPE 102 Jones", "", "CPE 102 Jones", "", "CPE 102 Jones"},
                {"12 PM", "", "CPE 357 Fisher", "", "CPE 357 Fisher", ""},
                {"1 PM", "CPE 101 Marks", "", "CPE 101 Marks", "", "CPE 101 Marks"},
                {"2 PM", "", "CPE 357 Staley", "", "CPE 357 Staley", ""},
                {"3 PM", "CPE 357 Fisher", "CPE 101 Rodriguez", "CPE 357 Fisher", "CPE 101 Rodriguez", "CPE 357 Fisher"},
                {"4 PM", "", "CPE 103 Gore", "", "CPE 103 Gore", ""},
                {"5 PM", "", "", "", "", ""},
                {"6 PM", "", "", "", "", ""}
            },
            new String [] {
                "Class", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"
            }
        ));
        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            table,
            new String [] {
                "Class", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"
            }
        ));
        jScrollPane1.setViewportView(jTable2);

        jButton2.setText("Professor View");
        jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jButton2PV_Pressed(evt);
            }
        });

        jButton3.setText("Room View");
        jButton3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jButton3RV_Pressed(evt);
            }
        });

        jButton1.setText("View Schedule Overview");
        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jButton1Overview_pressed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(jButton2)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButton3)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButton1)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton2)
                    .add(jButton3)
                    .add(jButton1))
                .add(3, 3, 3)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 339, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1Overview_pressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1Overview_pressed
        SOverview so = new SOverview();
        so.setVisible(true);
        this.getParent().add(so);
        this.setVisible(false);
    }//GEN-LAST:event_jButton1Overview_pressed

    private void jButton3RV_Pressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3RV_Pressed
        javax.swing.JFrame frame = new RoomView();
        frame.setVisible(true);
    }//GEN-LAST:event_jButton3RV_Pressed

    private void jButton2PV_Pressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2PV_Pressed
        System.out.println("Professor View Pressed");
    }//GEN-LAST:event_jButton2PV_Pressed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ClassView().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable2;
    // End of variables declaration//GEN-END:variables
    
}