package nxm.sys.test;

/** Swing UI to accompany test macro associated with NXM-2981.
 *  @author J. Czechowski IV
 *  @since  NeXtMidas 3.7.1
 */
@SuppressWarnings({"all","rawtypes","serial"}) // the code below is all auto-generated
public class test_plot_jinternalframe extends javax.swing.JFrame {

  /**
   * Creates new form test_plot_jinternalframe
   */
  public test_plot_jinternalframe () {
    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();
    desktopPane = new javax.swing.JDesktopPane();
    northWestFrame = new javax.swing.JInternalFrame();
    northWestPlot = new nxm.sys.libg.MidasDisplay();
    northEastFrame = new javax.swing.JInternalFrame();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTable1 = new javax.swing.JTable();
    southWestFrame = new javax.swing.JInternalFrame();
    southWestPlot = new nxm.sys.libg.MidasDisplay();
    southEastFrame = new javax.swing.JInternalFrame();
    southEastPlot = new nxm.sys.libg.MidasDisplay();
    topFrame = new javax.swing.JInternalFrame();
    topPlot = new nxm.sys.libg.MidasDisplay();
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    pass = new javax.swing.JButton();
    fail = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    instructions = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
    setTitle("%TEST_PLOT_JINTERNALFRAME");

    northWestFrame.setIconifiable(true);
    northWestFrame.setResizable(true);
    northWestFrame.setTitle("North West Frame");
    northWestFrame.setMinimumSize(new java.awt.Dimension(400, 200));
    northWestFrame.setVisible(true);
    northWestFrame.getContentPane().add(northWestPlot, java.awt.BorderLayout.CENTER);

    northEastFrame.setIconifiable(true);
    northEastFrame.setResizable(true);
    northEastFrame.setTitle("North East Frame");
    northEastFrame.setMinimumSize(new java.awt.Dimension(400, 200));
    northEastFrame.setVisible(true);

    jTable1.setModel(new javax.swing.table.DefaultTableModel(
      new Object [][] {
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null},
        {null, null, null, null}
      },
      new String [] {
        "A", "B", "C", "D"
      }
    ) {
      Class[] types = new Class [] {
        java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
      };

      public Class getColumnClass(int columnIndex) {
        return types [columnIndex];
      }
    });
    jScrollPane2.setViewportView(jTable1);

    northEastFrame.getContentPane().add(jScrollPane2, java.awt.BorderLayout.CENTER);

    southWestFrame.setIconifiable(true);
    southWestFrame.setResizable(true);
    southWestFrame.setTitle("South West Frame");
    southWestFrame.setMinimumSize(new java.awt.Dimension(400, 200));
    southWestFrame.setVisible(true);
    southWestFrame.getContentPane().add(southWestPlot, java.awt.BorderLayout.CENTER);

    southEastFrame.setIconifiable(true);
    southEastFrame.setResizable(true);
    southEastFrame.setTitle("South East Frame");
    southEastFrame.setMinimumSize(new java.awt.Dimension(400, 200));
    southEastFrame.setVisible(true);
    southEastFrame.getContentPane().add(southEastPlot, java.awt.BorderLayout.CENTER);

    topFrame.setIconifiable(true);
    topFrame.setResizable(true);
    topFrame.setTitle("Top Frame");
    topFrame.setLayer(1);
    topFrame.setMinimumSize(new java.awt.Dimension(400, 200));
    try {
      topFrame.setSelected(true);
    } catch (java.beans.PropertyVetoException e1) {
      e1.printStackTrace();
    }
    topFrame.setVisible(true);
    topFrame.getContentPane().add(topPlot, java.awt.BorderLayout.CENTER);

    desktopPane.setLayer(northWestFrame, javax.swing.JLayeredPane.DEFAULT_LAYER);
    desktopPane.setLayer(northEastFrame, javax.swing.JLayeredPane.DEFAULT_LAYER);
    desktopPane.setLayer(southWestFrame, javax.swing.JLayeredPane.DEFAULT_LAYER);
    desktopPane.setLayer(southEastFrame, javax.swing.JLayeredPane.DEFAULT_LAYER);
    desktopPane.setLayer(topFrame, javax.swing.JLayeredPane.POPUP_LAYER);

    javax.swing.GroupLayout desktopPaneLayout = new javax.swing.GroupLayout(desktopPane);
    desktopPane.setLayout(desktopPaneLayout);
    desktopPaneLayout.setHorizontalGroup(
      desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(desktopPaneLayout.createSequentialGroup()
        .addGroup(desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
          .addComponent(southWestFrame, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
          .addComponent(northWestFrame, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addGroup(desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(northEastFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE)
          .addComponent(southEastFrame, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
      .addGroup(desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, desktopPaneLayout.createSequentialGroup()
          .addContainerGap(267, Short.MAX_VALUE)
          .addComponent(topFrame, javax.swing.GroupLayout.PREFERRED_SIZE, 438, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addContainerGap(141, Short.MAX_VALUE)))
    );
    desktopPaneLayout.setVerticalGroup(
      desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(desktopPaneLayout.createSequentialGroup()
        .addGroup(desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
          .addComponent(northEastFrame, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
          .addComponent(northWestFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
        .addGroup(desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(southWestFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
          .addComponent(southEastFrame, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
      .addGroup(desktopPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(desktopPaneLayout.createSequentialGroup()
          .addGap(129, 129, 129)
          .addComponent(topFrame, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addContainerGap(102, Short.MAX_VALUE)))
    );

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

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

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

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

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

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

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

    jLabel1.setText("Exit with Status =  ");
    jPanel2.add(jLabel1, java.awt.BorderLayout.WEST);
    jLabel1.getAccessibleContext().setAccessibleDescription("");

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

    instructions.setColumns(20);
    instructions.setLineWrap(true);
    instructions.setRows(5);
    instructions.setText("Should see the following:\n1. Line plot in North West Frame\n2. Raster plot in South West Frame\n3. JTable in North East Frame\n4. Penny plot in South East Frame\n5. Map in Top Frame which is above the others\n\nThe line and raster plots should be updating with streaming signal data and the map should have a feature that is periodically updating. The drawing of all plots should be smooth and none should draw outside of their natural frames.\n\nThe bug (NXM-2981) is that the line and raster plots would draw on top of the map despite the frame with the map being above them. The issue should be obvious with no clicking in any of the frames or further interaction with the plots required.");
    instructions.setWrapStyleWord(true);
    jScrollPane1.setViewportView(instructions);

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

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

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


  // Variables declaration - do not modify//GEN-BEGIN:variables
  /** The desktop pane containing the northwest frame, the northeast frame, the southwest frame, the southeast frame, and the top frame */
  private javax.swing.JDesktopPane desktopPane;
  /** The FAIL status button */
  private javax.swing.JButton fail;
  /** The instructions text area */
  private javax.swing.JTextArea instructions;
  /** 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 panel containing the exit-status label and the status-button panel */
  private javax.swing.JPanel jPanel2;
  /** The status-button panel containing the PASS/FAIL status buttons */
  private javax.swing.JPanel jPanel3;
  /** The instructions scroll pane containing the instructions text area */
  private javax.swing.JScrollPane jScrollPane1;
  /** The table scroll pane containing the empty table */
  private javax.swing.JScrollPane jScrollPane2;
  /** The empty table */
  private javax.swing.JTable jTable1;
  /** The main button group containing the PASS/FAIL status buttons */
  private javax.swing.ButtonGroup main;
  /** The northeast frame containing the table scroll pane */
  private javax.swing.JInternalFrame northEastFrame;
  /** The northwest frame containing the northwest plot display */
  private javax.swing.JInternalFrame northWestFrame;
  /** The northwest plot display */
  private nxm.sys.libg.MidasDisplay northWestPlot;
  /** The PASS status button */
  private javax.swing.JButton pass;
  /** The southeast frame containing the southeast plot display */
  private javax.swing.JInternalFrame southEastFrame;
  /** The southeast plot display */
  private nxm.sys.libg.MidasDisplay southEastPlot;
  /** The southwest frame containing the southwest plot display */
  private javax.swing.JInternalFrame southWestFrame;
  /** The southwest plot display */
  private nxm.sys.libg.MidasDisplay southWestPlot;
  /** The top frame containing the top plot display */
  private javax.swing.JInternalFrame topFrame;
  /** The top plot display */
  private nxm.sys.libg.MidasDisplay topPlot;
  // End of variables declaration//GEN-END:variables
}
