/**************************************************************************
 Skarynka - software for scan, process scanned images and build books

 Copyright (C) 2016 Aleś Bułojčyk

 This file is part of Skarynka.

 Skarynka is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Skarynka is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **************************************************************************/
package org.alex73.skarynka.scan.ui;

import org.alex73.skarynka.scan.Messages;

/**
 * @author Aleś Bułojčyk <alex73mail@gmail.com>
 */
public class MainFrame extends javax.swing.JFrame {

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

        viewButtonsGroup = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        cbProcess = new javax.swing.JCheckBox();
        tabs = new javax.swing.JTabbedPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        workMenu = new javax.swing.JMenu();
        processScan = new javax.swing.JMenuItem();
        processAdd = new javax.swing.JMenuItem();
        closeBook = new javax.swing.JMenuItem();
        viewMenu = new javax.swing.JMenu();
        viewInc = new javax.swing.JMenuItem();
        viewDec = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        itemAll = new javax.swing.JRadioButtonMenuItem();
        itemSeq = new javax.swing.JRadioButtonMenuItem();
        itemCropErr = new javax.swing.JRadioButtonMenuItem();
        itemOdd = new javax.swing.JRadioButtonMenuItem();
        itemEven = new javax.swing.JRadioButtonMenuItem();
        cameraMenu = new javax.swing.JMenu();
        cameraInit = new javax.swing.JMenuItem();
        cameraFocus = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        cameraBadPixels = new javax.swing.JMenuItem();
        toolsPedal = new javax.swing.JMenuItem();
        toolsMenu = new javax.swing.JMenu();
        addAllFiles = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle(Messages.getString("FRAME_TITLE")); // NOI18N

        jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));

        cbProcess.setSelected(true);
        cbProcess.setText(Messages.getString("PANEL_EDIT_PROCESS")); // NOI18N
        jPanel1.add(cbProcess);

        getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH);
        getContentPane().add(tabs, java.awt.BorderLayout.CENTER);

        workMenu.setText(Messages.getString("MENU_BOOK")); // NOI18N

        processScan.setText(Messages.getString("MENU_BOOK_SCAN")); // NOI18N
        workMenu.add(processScan);

        processAdd.setText(Messages.getString("MENU_BOOK_ADD")); // NOI18N
        workMenu.add(processAdd);

        closeBook.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK));
        closeBook.setText(Messages.getString("MENU_BOOK_CLOSE")); // NOI18N
        workMenu.add(closeBook);

        jMenuBar1.add(workMenu);

        viewMenu.setText(Messages.getString("MENU_VIEW")); // NOI18N

        viewInc.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ADD, java.awt.event.InputEvent.CTRL_MASK));
        viewInc.setText(Messages.getString("MENU_VIEW_INC")); // NOI18N
        viewMenu.add(viewInc);

        viewDec.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SUBTRACT, java.awt.event.InputEvent.CTRL_MASK));
        viewDec.setText(Messages.getString("MENU_VIEW_DEC")); // NOI18N
        viewMenu.add(viewDec);
        viewMenu.add(jSeparator2);

        viewButtonsGroup.add(itemAll);
        itemAll.setSelected(true);
        itemAll.setText(Messages.getString("MENU_VIEW_ALL")); // NOI18N
        viewMenu.add(itemAll);

        viewButtonsGroup.add(itemSeq);
        itemSeq.setText(Messages.getString("MENU_VIEW_SEQ")); // NOI18N
        viewMenu.add(itemSeq);

        viewButtonsGroup.add(itemCropErr);
        itemCropErr.setText(Messages.getString("MENU_VIEW_CROP_ERRORS")); // NOI18N
        viewMenu.add(itemCropErr);

        viewButtonsGroup.add(itemOdd);
        itemOdd.setText(Messages.getString("MENU_VIEW_ODD")); // NOI18N
        viewMenu.add(itemOdd);

        viewButtonsGroup.add(itemEven);
        itemEven.setText(Messages.getString("MENU_VIEW_EVEN")); // NOI18N
        viewMenu.add(itemEven);

        jMenuBar1.add(viewMenu);

        cameraMenu.setText(Messages.getString("MENU_DEVICES")); // NOI18N

        cameraInit.setText(Messages.getString("MENU_TOOLS_CAMERA_INIT")); // NOI18N
        cameraMenu.add(cameraInit);

        cameraFocus.setText(Messages.getString("MENU_TOOLS_CAMERA_FOCUS")); // NOI18N
        cameraMenu.add(cameraFocus);
        cameraMenu.add(jSeparator1);

        cameraBadPixels.setText(Messages.getString("MENU_TOOLS_CAMERA_BADPIXELS")); // NOI18N
        cameraMenu.add(cameraBadPixels);

        toolsPedal.setText(Messages.getString("MENU_TOOLS_PEDAL_TEST")); // NOI18N
        cameraMenu.add(toolsPedal);

        jMenuBar1.add(cameraMenu);

        toolsMenu.setText(Messages.getString("MENU_TOOLS")); // NOI18N

        addAllFiles.setText(Messages.getString("MENU_ADD_ALL")); // NOI18N
        toolsMenu.add(addAllFiles);

        jMenuBar1.add(toolsMenu);

        setJMenuBar(jMenuBar1);

        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(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainFrame.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 MainFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JMenuItem addAllFiles;
    public javax.swing.JMenuItem cameraBadPixels;
    public javax.swing.JMenuItem cameraFocus;
    public javax.swing.JMenuItem cameraInit;
    public javax.swing.JMenu cameraMenu;
    public javax.swing.JCheckBox cbProcess;
    public javax.swing.JMenuItem closeBook;
    public javax.swing.JRadioButtonMenuItem itemAll;
    public javax.swing.JRadioButtonMenuItem itemCropErr;
    public javax.swing.JRadioButtonMenuItem itemEven;
    public javax.swing.JRadioButtonMenuItem itemOdd;
    public javax.swing.JRadioButtonMenuItem itemSeq;
    public javax.swing.JMenuBar jMenuBar1;
    public javax.swing.JPanel jPanel1;
    public javax.swing.JPopupMenu.Separator jSeparator1;
    public javax.swing.JPopupMenu.Separator jSeparator2;
    public javax.swing.JMenuItem processAdd;
    public javax.swing.JMenuItem processScan;
    public javax.swing.JTabbedPane tabs;
    public javax.swing.JMenu toolsMenu;
    public javax.swing.JMenuItem toolsPedal;
    public javax.swing.ButtonGroup viewButtonsGroup;
    public javax.swing.JMenuItem viewDec;
    public javax.swing.JMenuItem viewInc;
    public javax.swing.JMenu viewMenu;
    public javax.swing.JMenu workMenu;
    // End of variables declaration//GEN-END:variables
}
