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

/*
 * jpnExtraCourse.java
 *
 * Created on May 1, 2010, 10:47:46 PM
 */

package uce.ui.components;

import java.awt.LayoutManager;
import javax.swing.border.TitledBorder;

/**
 *
 * @author chepa
 */
public class jpnExtraCourse extends javax.swing.JPanel {

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

	public jpnExtraCourse(String extraCourseName) {
		this();
		((TitledBorder) jscExtraCourse.getBorder()).setTitle(extraCourseName);
	}

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

        jSplitPane1 = new javax.swing.JSplitPane();
        jpnPrecond = new jpnCondition("Precondition(s)");
        jscExtraCourse = new javax.swing.JScrollPane();
        jtbExtraCourse = new javax.swing.JTable();

        jSplitPane1.setDividerSize(3);
        jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setResizeWeight(0.3);

        LayoutManager manager = jpnPrecond.getLayout();
        jpnPrecond.setLayout(null);
        jpnPrecond.setLayout(manager);
        jSplitPane1.setTopComponent(jpnPrecond);

        jscExtraCourse.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder("")));

        jtbExtraCourse.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null}
            },
            new String [] {
                "Statement #", "Sentence"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jtbExtraCourse.setRowSelectionAllowed(false);
        jtbExtraCourse.getTableHeader().setReorderingAllowed(false);
        jscExtraCourse.setViewportView(jtbExtraCourse);

        jSplitPane1.setRightComponent(jscExtraCourse);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jSplitPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JPanel jpnPrecond;
    private javax.swing.JScrollPane jscExtraCourse;
    private javax.swing.JTable jtbExtraCourse;
    // End of variables declaration//GEN-END:variables

}
