/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.jlayer.app;

/**
 *
 * @author gko
 */
@SuppressWarnings("serial")
public class EncoderFrame extends javax.swing.JFrame {

    /**
     * Creates new form EncoderFrame
     */
    public EncoderFrame() {
        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.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        encoderActions = new EncoderActions(this);
        jToolBar1 = new javax.swing.JToolBar();
        jButton1 = new javax.swing.JButton(encoderActions.createAction);
        jButton2 = new javax.swing.JButton(encoderActions.initAction);
        jButton3 = new javax.swing.JButton(encoderActions.forwardAction);
        jButton4 = new javax.swing.JButton(encoderActions.runAction);
        jButton5 = new javax.swing.JButton(encoderActions.stopAction);
        jScrollPane1 = new javax.swing.JScrollPane();
        encoderPanel = new EncoderPanel(encoderActions.encoderNetwork);
        encoderStatusBar = new org.jlayer.app.EncoderStatusBar();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem(encoderActions.createAction);
        jMenuItem2 = new javax.swing.JMenuItem(encoderActions.initAction);
        jMenuItem3 = new javax.swing.JMenuItem(encoderActions.forwardAction);
        jMenuItem4 = new javax.swing.JMenuItem(encoderActions.runAction);
        jMenuItem6 = new javax.swing.JMenuItem(encoderActions.stopAction);
        jMenu2 = new javax.swing.JMenu();
        jMenuItem5 = new javax.swing.JMenuItem(encoderActions.editAction);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("JLayer - Encoder Application");
        setPreferredSize(new java.awt.Dimension(1200, 800));

        jToolBar1.setRollover(true);

        jButton1.setText("Create");
        jButton1.setFocusable(false);
        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton1.setText("");
        jToolBar1.add(jButton1);

        jButton2.setText("Init");
        jButton2.setFocusable(false);
        jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton2.setText("");
        jToolBar1.add(jButton2);

        jButton3.setText("Forward");
        jButton3.setFocusable(false);
        jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton3.setText("");
        jToolBar1.add(jButton3);

        jButton4.setText("Run");
        jButton4.setFocusable(false);
        jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton4.setText("");
        jToolBar1.add(jButton4);

        jButton5.setText("Stop");
        jButton5.setFocusable(false);
        jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton5.setText("");
        jToolBar1.add(jButton5);

        javax.swing.GroupLayout encoderPanelLayout = new javax.swing.GroupLayout(encoderPanel);
        encoderPanel.setLayout(encoderPanelLayout);
        encoderPanelLayout.setHorizontalGroup(
            encoderPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1042, Short.MAX_VALUE)
        );
        encoderPanelLayout.setVerticalGroup(
            encoderPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 662, Short.MAX_VALUE)
        );

        jScrollPane1.setViewportView(encoderPanel);

        javax.swing.GroupLayout encoderStatusBarLayout = new javax.swing.GroupLayout(encoderStatusBar);
        encoderStatusBar.setLayout(encoderStatusBarLayout);
        encoderStatusBarLayout.setHorizontalGroup(
            encoderStatusBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        encoderStatusBarLayout.setVerticalGroup(
            encoderStatusBarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 78, Short.MAX_VALUE)
        );

        jMenu1.setText("Network");

        jMenuItem1.setText("Create");
        jMenuItem1.setIcon(null);
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Init");
        jMenuItem2.setIcon(null);
        jMenu1.add(jMenuItem2);

        jMenuItem3.setText("Forward");
        jMenuItem3.setIcon(null);
        jMenu1.add(jMenuItem3);

        jMenuItem4.setText("Run");
        jMenuItem4.setIcon(null);
        jMenu1.add(jMenuItem4);

        jMenuItem6.setText("Stop");
        jMenuItem6.setIcon(null);
        jMenu1.add(jMenuItem6);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Options");

        jMenuItem5.setText("Parameters");
        jMenuItem5.setIcon(null);
        jMenu2.add(jMenuItem5);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1061, Short.MAX_VALUE)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(encoderStatusBar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 629, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(encoderStatusBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

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

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(EncoderFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(EncoderFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(EncoderFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(EncoderFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new EncoderFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    javax.swing.JPanel encoderPanel;
    org.jlayer.app.EncoderStatusBar encoderStatusBar;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar jToolBar1;
    // End of variables declaration//GEN-END:variables

    // my variable declarations
    EncoderActions encoderActions;
}
