| 1 | package event.editor; |
|---|
| 2 | |
|---|
| 3 | import java.awt.event.*; |
|---|
| 4 | |
|---|
| 5 | /** |
|---|
| 6 | * |
|---|
| 7 | * @author nathaniellehrer |
|---|
| 8 | */ |
|---|
| 9 | public class GenericEvaluationPanel extends javax.swing.JPanel implements RemoveablePanel { |
|---|
| 10 | |
|---|
| 11 | private ActionListener removeListener; |
|---|
| 12 | |
|---|
| 13 | /** Creates new form GenericEvaluation */ |
|---|
| 14 | public GenericEvaluationPanel() { |
|---|
| 15 | initComponents(); |
|---|
| 16 | |
|---|
| 17 | GenericTable.genericizeTable( |
|---|
| 18 | jScrollPane1, jComboBox1, addButton, deleteButton, "Scale", "Criteria"); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | public void setRemoveListener(ActionListener listener) |
|---|
| 22 | { |
|---|
| 23 | removeListener = listener; |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | /** This method is called from within the constructor to |
|---|
| 27 | * initialize the form. |
|---|
| 28 | * WARNING: Do NOT modify this code. The content of this method is |
|---|
| 29 | * always regenerated by the Form Editor. |
|---|
| 30 | */ |
|---|
| 31 | @SuppressWarnings("unchecked") |
|---|
| 32 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
|---|
| 33 | private void initComponents() { |
|---|
| 34 | |
|---|
| 35 | addButton = new javax.swing.JButton(); |
|---|
| 36 | deleteButton = new javax.swing.JButton(); |
|---|
| 37 | jScrollPane1 = new javax.swing.JScrollPane(); |
|---|
| 38 | jComboBox1 = new javax.swing.JComboBox(); |
|---|
| 39 | jLabel1 = new javax.swing.JLabel(); |
|---|
| 40 | |
|---|
| 41 | addButton.setText("Add Criteria"); |
|---|
| 42 | addButton.setToolTipText("Adds a new row in the table below"); |
|---|
| 43 | |
|---|
| 44 | deleteButton.setText("Delete Selected Criteria"); |
|---|
| 45 | deleteButton.setToolTipText("Deletes the selected row in the table below"); |
|---|
| 46 | |
|---|
| 47 | jScrollPane1.setToolTipText(""); |
|---|
| 48 | |
|---|
| 49 | jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Yes/No", "1-5", "1-10", "Written" })); |
|---|
| 50 | jComboBox1.setToolTipText("The type of criteria evaluation scale to be used"); |
|---|
| 51 | |
|---|
| 52 | jLabel1.setText("Criteria Evaluation Scale:"); |
|---|
| 53 | |
|---|
| 54 | org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); |
|---|
| 55 | this.setLayout(layout); |
|---|
| 56 | layout.setHorizontalGroup( |
|---|
| 57 | layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
|---|
| 58 | .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() |
|---|
| 59 | .addContainerGap() |
|---|
| 60 | .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) |
|---|
| 61 | .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 598, Short.MAX_VALUE) |
|---|
| 62 | .add(layout.createSequentialGroup() |
|---|
| 63 | .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
|---|
| 64 | .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
|---|
| 65 | .add(jComboBox1, 0, 293, Short.MAX_VALUE)) |
|---|
| 66 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) |
|---|
| 67 | .add(addButton) |
|---|
| 68 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) |
|---|
| 69 | .add(deleteButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 178, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) |
|---|
| 70 | .add(23, 23, 23)) |
|---|
| 71 | ); |
|---|
| 72 | layout.setVerticalGroup( |
|---|
| 73 | layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
|---|
| 74 | .add(layout.createSequentialGroup() |
|---|
| 75 | .addContainerGap() |
|---|
| 76 | .add(jLabel1) |
|---|
| 77 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
|---|
| 78 | .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) |
|---|
| 79 | .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
|---|
| 80 | .add(deleteButton) |
|---|
| 81 | .add(addButton)) |
|---|
| 82 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
|---|
| 83 | .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE) |
|---|
| 84 | .addContainerGap()) |
|---|
| 85 | ); |
|---|
| 86 | }// </editor-fold>//GEN-END:initComponents |
|---|
| 87 | |
|---|
| 88 | |
|---|
| 89 | // Variables declaration - do not modify//GEN-BEGIN:variables |
|---|
| 90 | private javax.swing.JButton addButton; |
|---|
| 91 | private javax.swing.JButton deleteButton; |
|---|
| 92 | private javax.swing.JComboBox jComboBox1; |
|---|
| 93 | private javax.swing.JLabel jLabel1; |
|---|
| 94 | private javax.swing.JScrollPane jScrollPane1; |
|---|
| 95 | // End of variables declaration//GEN-END:variables |
|---|
| 96 | |
|---|
| 97 | } |
|---|