package nxm.sys.test;

/** Test for NXM-2841.
 *  @author J. Czechowski IV
 */
public class test_plot_flicker extends javax.swing.JFrame {

  private static final long serialVersionUID = -3696557643804505486L;

  /**
   * Creates new form test_plot_flicker
   */
  public test_plot_flicker () {
    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() {

    main = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    pass = new javax.swing.JButton();
    fail = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jPanel4 = new javax.swing.JPanel();
    plotLine = new nxm.sys.libg.MidasDisplay();
    plotRaster = new nxm.sys.libg.MidasDisplay();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jPanel1.setLayout(new java.awt.BorderLayout());

    jPanel3.setLayout(new java.awt.BorderLayout());

    jPanel2.setLayout(new java.awt.GridLayout(2, 1));

    pass.setForeground(new java.awt.Color(0, 102, 0));
    pass.setText("PASS");
    main.add(pass);
    jPanel2.add(pass);

    fail.setForeground(new java.awt.Color(153, 0, 0));
    fail.setText("FAIL");
    main.add(fail);
    jPanel2.add(fail);

    jPanel3.add(jPanel2, java.awt.BorderLayout.EAST);

    jLabel1.setText("Exit with Status:  ");
    jPanel3.add(jLabel1, java.awt.BorderLayout.WEST);

    jPanel1.add(jPanel3, java.awt.BorderLayout.NORTH);

    jTextArea1.setColumns(20);
    jTextArea1.setLineWrap(true);
    jTextArea1.setRows(5);
    jTextArea1.setText("This test runs with GRAPHICS set to Swing|SwingDB, which is the new default. "
        + "\n\nIn the top line plot, LMB and drag as if to zoom in but don't release the LMB yet. Verify that "
        + "the zoom box does NOT flicker. \n\nDo the same to the bottom raster plot. \nZoom in a few times in both plots."
        + "\n\nIf the zoom box does NOT flicker in either plots PASS the test.");
    jTextArea1.setWrapStyleWord(true);
    jScrollPane1.setViewportView(jTextArea1);

    jPanel1.add(jScrollPane1, java.awt.BorderLayout.CENTER);

    getContentPane().add(jPanel1, java.awt.BorderLayout.WEST);

    jPanel4.setLayout(new java.awt.GridLayout(2, 1));

    plotLine.setMinimumSize(new java.awt.Dimension(500, 300));
    plotLine.setPreferredSize(new java.awt.Dimension(500, 300));
    jPanel4.add(plotLine);

    plotRaster.setMinimumSize(new java.awt.Dimension(500, 300));
    plotRaster.setPreferredSize(new java.awt.Dimension(500, 300));
    jPanel4.add(plotRaster);

    getContentPane().add(jPanel4, java.awt.BorderLayout.CENTER);

    setTitle("TEST_PLOT_FLICKER");

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

  // Variables declaration - do not modify//GEN-BEGIN:variables
  /** The FAIL status button */
  private javax.swing.JButton fail;
  /** The exit-status label */
  private javax.swing.JLabel jLabel1;
  /** The left-side panel containing the status panel and the instructions scroll pane */
  private javax.swing.JPanel jPanel1;
  /** The status-button panel containing the PASS/FAIL status buttons */
  private javax.swing.JPanel jPanel2;
  /** The status panel containing the exit-status label and the status-button panel */
  private javax.swing.JPanel jPanel3;
  /** The right-side plot panel containing the line plot and raster plot */
  private javax.swing.JPanel jPanel4;
  /** The instructions scroll pane containing the instructions text area */
  private javax.swing.JScrollPane jScrollPane1;
  /** The instructions text area */
  private javax.swing.JTextArea jTextArea1;
  /** The main button group containing the PASS/FAIL status buttons */
  private javax.swing.ButtonGroup main;
  /** The PASS status button */
  private javax.swing.JButton pass;
  /** The line plot display */
  private nxm.sys.libg.MidasDisplay plotLine;
  /** The raster plot display */
  private nxm.sys.libg.MidasDisplay plotRaster;
  // End of variables declaration//GEN-END:variables
}
