package event.editor; import java.awt.event.*; /** * * @author nathaniellehrer */ public class ParamicsPanel extends javax.swing.JPanel implements RemoveablePanel { private ActionListener removeListener; /** Creates new form ParamicsPanel */ public ParamicsPanel() { initComponents(); } public void setRemoveListener(ActionListener listener) { removeListener = listener; } /** 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") // //GEN-BEGIN:initComponents private void initComponents() { removeButton = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox(); jComboBox2 = new javax.swing.JComboBox(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jCheckBox1 = new javax.swing.JCheckBox(); jCheckBox2 = new javax.swing.JCheckBox(); jCheckBox3 = new javax.swing.JCheckBox(); jCheckBox4 = new javax.swing.JCheckBox(); jCheckBox5 = new javax.swing.JCheckBox(); jCheckBox6 = new javax.swing.JCheckBox(); jCheckBox7 = new javax.swing.JCheckBox(); jCheckBox8 = new javax.swing.JCheckBox(); jCheckBox9 = new javax.swing.JCheckBox(); jCheckBox10 = new javax.swing.JCheckBox(); jComboBox3 = new javax.swing.JComboBox(); removeButton.setText("Remove"); removeButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { removeThisProperty(evt); } }); jLabel1.setText("Location"); jLabel2.setText("Status"); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "New", "Changed", "Cleared" })); jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Lane Breakdown", "Lane Obstruction" })); jLabel3.setText("Incident Type"); jLabel4.setText("Lanes affected:"); jCheckBox1.setText("Lane 1"); jCheckBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox1ActionPerformed(evt); } }); jCheckBox2.setText("Lane 2"); jCheckBox2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox2ActionPerformed(evt); } }); jCheckBox3.setText("Lane 3"); jCheckBox3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox3ActionPerformed(evt); } }); jCheckBox4.setText("Lane 4"); jCheckBox4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox4ActionPerformed(evt); } }); jCheckBox5.setText("Lane 5"); jCheckBox5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox5ActionPerformed(evt); } }); jCheckBox6.setText("Lane 8"); jCheckBox6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox6ActionPerformed(evt); } }); jCheckBox7.setText("Lane 6"); jCheckBox7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox7ActionPerformed(evt); } }); jCheckBox8.setText("Lane 7"); jCheckBox8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox8ActionPerformed(evt); } }); jCheckBox9.setText("Lane 10"); jCheckBox9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox9ActionPerformed(evt); } }); jCheckBox10.setText("Lane 9"); jCheckBox10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox10ActionPerformed(evt); } }); jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "187_S_55_ML", "187_N_405_HV" })); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel3) .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .add(jLabel4) .add(18, 18, 18) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jCheckBox2) .add(jCheckBox1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jCheckBox3) .add(jCheckBox4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jCheckBox7) .add(jCheckBox5)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jCheckBox8) .add(jCheckBox6)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jCheckBox10) .add(jCheckBox9))) .add(removeButton) .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel1) .add(jLabel2)) .add(36, 36, 36) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBox2, 0, 597, Short.MAX_VALUE) .add(jComboBox1, 0, 597, Short.MAX_VALUE) .add(jComboBox3, 0, 597, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(removeButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel1) .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel2)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4) .add(jCheckBox1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jCheckBox2)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(jCheckBox5) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jCheckBox7)) .add(layout.createSequentialGroup() .add(jCheckBox3) .add(2, 2, 2) .add(jCheckBox4)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(layout.createSequentialGroup() .add(jCheckBox10) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jCheckBox9)) .add(layout.createSequentialGroup() .add(jCheckBox8) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jCheckBox6))))) .addContainerGap(116, Short.MAX_VALUE)) ); }// //GEN-END:initComponents private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty if (removeListener != null) { removeListener.actionPerformed(new ActionEvent(this, 0, "")); } }//GEN-LAST:event_removeThisProperty private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox1ActionPerformed private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox2ActionPerformed private void jCheckBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox3ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox3ActionPerformed private void jCheckBox4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox4ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox4ActionPerformed private void jCheckBox5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox5ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox5ActionPerformed private void jCheckBox6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox6ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox6ActionPerformed private void jCheckBox7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox7ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox7ActionPerformed private void jCheckBox8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox8ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox8ActionPerformed private void jCheckBox9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox9ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox9ActionPerformed private void jCheckBox10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox10ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jCheckBox10ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox jCheckBox1; private javax.swing.JCheckBox jCheckBox10; private javax.swing.JCheckBox jCheckBox2; private javax.swing.JCheckBox jCheckBox3; private javax.swing.JCheckBox jCheckBox4; private javax.swing.JCheckBox jCheckBox5; private javax.swing.JCheckBox jCheckBox6; private javax.swing.JCheckBox jCheckBox7; private javax.swing.JCheckBox jCheckBox8; private javax.swing.JCheckBox jCheckBox9; private javax.swing.JComboBox jComboBox1; private javax.swing.JComboBox jComboBox2; private javax.swing.JComboBox jComboBox3; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JButton removeButton; // End of variables declaration//GEN-END:variables }