/*
 * PicHistogramMainView.java
 */
package gui.newGui;

//import com.sun.xml.internal.fastinfoset.util.StringArray;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import util.simpleIO.Out;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Image;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
//import org.jdesktop.application.TaskMonitor;


import data.Data;
import data.DataList;
import data.bins.Bins;
import data.bins.Bins.TYPE_BIN_VALUES;
import data.bins.quantizer.AbstractQuantizer;
import data.bins.quantizer.AbstractQuantizer.TYPE_QUANTIZER;
import data.bins.distance.*;
import data.bins.distance.AbstractDistance.TYPE_DISTANCE;


import data.search.AbstractSearch;
import data.search.Search;
import gui.charts.ChartFactory;
import gui.charts.ChartFactory.TYPES_CHART;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileFilter;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import org.jfree.chart.ChartPanel;
import util.io.FilesAndFolders;
//import util.simpleIO.Out;

/**
 * The application's main frame.
 */
public class PicHistogramMainView extends FrameView {
    private DefaultTableModel dtmAttributes;

    /**
     * @return the firstImageOnFirstTab
     */
    public String getFirstImageOnFirstTab() {
        return firstImageOnFirstTab;
    }

    /**
     * @return the firstImageOnSecondTab
     */
    public String getFirstImageOnSecondTab() {
        return firstImageOnSecondTab;
    }

    /**
     * @return the secondImageOnSecondTab
     */
    public String getSecondImageOnSecondTab() {
        return secondImageOnSecondTab;
    }

    public PicHistogramMainView(SingleFrameApplication app) {
        super(app);
        //  sets window icon
//        Image icon = Toolkit.getDefaultToolkit().createImage("src\\pichistogram\\resources\\icon.png");
//        getFrame().setIconImage(icon);
        getFrame().setTitle("Test");
        initComponents();
        

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        //int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
//        messageTimer = new Timer(messageTimeout, new ActionListener() {
        messageTimer = new Timer(3000, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        //int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        //busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
        busyIconTimer = new Timer(3000, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);


    }

    public void setPicture(JLabel jLabelLoadedImage1, String importOPathOfThePic) {
        try {

            ImageIcon pic = new ImageIcon(ImageIO.read(new File(importOPathOfThePic)));
            int w = pic.getIconWidth();
            int h = pic.getIconHeight();
            double proW = w / jLabelLoadedImage1.getWidth();
            double proH = h / jLabelLoadedImage1.getHeight();
            ImageIcon newpic;
            if (proW > proH) {
                proH = h / proW;
                newpic = new ImageIcon(pic.getImage().getScaledInstance(jLabelLoadedImage1.getWidth(), (int) proH, Image.SCALE_FAST));

            } else {
                proW = w / proH;
                proH = jLabelLoadedImage1.getHeight();
               // proH = proH + (proH/100*20);        
                        newpic = new ImageIcon(pic.getImage().getScaledInstance((int) proW, (int)proH, Image.SCALE_FAST));
            }

            jLabelLoadedImage1.setIcon(newpic);
            jLabelLoadedImage1.validate();
        } catch (IOException ex) {
            Logger.getLogger(PicHistogramMainView.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    /**
     * Execute specified normalization type.
     *
     * @param dataToNormalize
     * @param jcombo
     */
    public void normalizeBins(Data dataToNormalize, JComboBox<TYPE_BIN_VALUES> jcombo) {

        //    "LOG 10", "Power", "Square", "Relative"
        int index = jcombo.getSelectedIndex();
        TYPE_BIN_VALUES type = jcombo.getItemAt(index);

        dataToNormalize.bins.valueAction(type);			// bissi einfacher

    }

    @Action
    public void generateFirstHistogramPanelOfFirstTab() {

        generateHistogramPanel(filePathOfImageOnFirstTab, jPanelHistogram, jComboBoxForHistogramTyp, jTextFieldForNumberOfBins, histogram);

    }

    @Action
    public void generateHistogramPanelsOfSecondTab() {
        generateHistogramPanel(filePathOfFirstImageOnSecondTab, jPanel6, jComboBoxForHistogramTyp2, jTextFieldForNumberOfBins2, histogram1);
        generateHistogramPanel(filePathOfSecondImageOnSecondTab, jPanel7, jComboBoxForHistogramTyp2, jTextFieldForNumberOfBins2, histogram2);

        int index = jComboBoxDistance.getSelectedIndex();
        distanceEnumForSecondTab = TYPE_DISTANCE.values()[index];
        AbstractDistance distance = AbstractDistance.factory(distanceEnumForSecondTab);

        jLabel9.setText(distance.getDistance(data1.bins, data2.bins) + "");

    }

    @Action
    public void generateHistogramPanelsOfThirdTabAndStartSearch() throws IOException {

      //  AbstractSearch.lengthLimit = Integer.getInteger(jTextFieldLimitOfSearchResults.getText());
        //setzt die normalisierung
        int index1 = jComboBoxForNormalization4.getSelectedIndex();
        TYPE_BIN_VALUES type = (TYPE_BIN_VALUES) jComboBoxForNormalization4.getItemAt(index1);
        AbstractSearch.vType = type;


        //setzt die distance
        int index2 = jComboBoxDistance2.getSelectedIndex();
        distanceEnumForThirdTab = TYPE_DISTANCE.values()[index2];
       // AbstractDistance distance = AbstractDistance.factory(distanceEnumForThirdTab);

        //setzt den qType typ
        int index3 = jComboBoxForHistogramTyp3.getSelectedIndex();
        qType = TYPE_QUANTIZER.values()[index3];
        AbstractQuantizer quantizer = AbstractQuantizer.factory(qType, Integer.parseInt(jTextFieldForNumberOfBins3.getText()));


// searchFolder = new File("D:/Diverses/Dropbox/My Dropbox/2012_MMIS/_testFiles_");
	//	 searchFile = new File("D:/Diverses/Dropbox/My Dropbox/2012_MMIS/_testFiles_/1.jpg");
//        //Suchbereich f�r die Suche ;-)
//        searchFolder = new File("_testFiles_");
//
//        // Quellfile nach dem gesucht bzw. verglichen werden soll
//        searchFile = new File("_testFiles_/1.jpg");

        // anlegen des Suchdaten
        Data searchF = new Data(searchFile, quantizer);

        // anlegen der Datenbank
        Data[] dataBase = getData(searchFolder, quantizer);

        // setzt die Distancefunktion
        AbstractSearch.distance = AbstractDistance.factory(distanceEnumForThirdTab);
        
      
        AbstractSearch search = new Search(searchF, dataBase);
          //startet die eigentliche Suche
        DataList list = search.startSearch();

        ArrayList<Data> result = list.getList();
        result.remove(0);
        dtmAttributes = (DefaultTableModel) jTable1.getModel();
       // Vector<Person> friends = new Vector<Person>();

       // friends = aktuellerGraph_.getNeighbours(p);

        if (dtmAttributes.getRowCount() != 0) {
            dtmAttributes.setRowCount(0);
        }

        String[] rowData = {null, null};
        for (int j = 0; j < result.size(); j++) {
            dtmAttributes.addRow(rowData);
            jTable1.setValueAt(result.get(j).file.getName(), j, 0);
            jTable1.setValueAt(result.get(j).distance, j, 1);
            jTable1.setValueAt(result.get(j).file.getAbsolutePath(), j, 2);
            jTable1.setValueAt(result.get(j).file.length()/1024, j, 3);
        }
        
        
        generateHistogramPanel(searchFile, jPanel10, jComboBoxForHistogramTyp3, jTextFieldForNumberOfBins3, histogram1);
    }

    
     
    public static Data[] getData(File folder, AbstractQuantizer quantizer) {

        ArrayList<File> pics = FilesAndFolders.listPicturesRec(folder);
        ArrayList<Data> dataBaseL = new ArrayList<Data>(pics.size());

        Out.pl("Making data list...");
        for (File pic : pics) {

            try {
                Out.p(".");
                Data data = new Data(pic, quantizer);
                dataBaseL.add(data);
            } catch (Exception e) {
                // error
                e.printStackTrace();
                //System.err.println("Problem with file " + pic + ": "+e);
            }
        }
        Out.pl();

        //ArrayList<Data> dataBaseL = getData(searchFolder);
        Data[] dataBase = dataBaseL.toArray(new Data[0]);

        return dataBase;
    }

    /**
     *
     * @param file
     * @param jPanelForHistogram
     * @param selectedQuantizerBox
     * @param numberOfBins
     * @param histo
     */
    
   

    
    private void generateHistogramPanel(File file, JPanel jPanelForHistogram,
            JComboBox<TYPE_QUANTIZER> selectedQuantizerBox, JTextField numberOfBins, String histo) {



        Dimension dimOfJPanel = jPanelForHistogram.getPreferredSize();
        jPanelForHistogram.removeAll();

        int index = selectedQuantizerBox.getSelectedIndex();
        qType = TYPE_QUANTIZER.values()[index];

        try {
            jPanelForHistogram.setLayout(new BorderLayout());
            //Out.println("generateHistogram");

            if (jComboBoxForFastQuanti.getSelectedItem().equals("AN")) {
                Bins.fastQuantization = true;
            } else if (jComboBoxForFastQuanti.getSelectedItem().equals("AUS")) {
                Bins.fastQuantization = false;
            }

            Data tmp = null;	// nicht anlegen, sinnlos
            if (histo.equalsIgnoreCase(this.histogram)) {
                data = new Data(file, AbstractQuantizer.factory(qType, Integer.parseInt(numberOfBins.getText())));
                normalizeBins(data, jComboBoxForNormalization);
                tmp = data;
            } else if (histo.equalsIgnoreCase(histogram1)) {
                data1 = new Data(file, AbstractQuantizer.factory(qType, Integer.parseInt(numberOfBins.getText())));
                normalizeBins(data1, jComboBoxForNormalization3);
                tmp = data1;
            } else if (histo.equalsIgnoreCase(histogram2)) {
                data2 = new Data(file, AbstractQuantizer.factory(qType, Integer.parseInt(numberOfBins.getText())));
                normalizeBins(data2, jComboBoxForNormalization3);
                tmp = data2;
            } else {
                throw new RuntimeException("Unknown type.");
            }

            ChartPanel panel = ChartFactory.makeChart(TYPES_CHART.BarChart3D, tmp);
            jPanelForHistogram.add(panel, BorderLayout.CENTER);
            jPanelForHistogram.setPreferredSize(dimOfJPanel);
            jPanelForHistogram.validate();

        } catch (IOException ex) {
            Logger.getLogger(PicHistogramMainView.class.getName()).log(
                    Level.SEVERE, null, ex);
        }
    }

    @Action
    public void openFirstImageOfFirstTab() {

        JFrame mainFrame = PicHistogramApp.getApplication().getMainFrame();
        importPic = new ImportPic(mainFrame, true, getFirstImageOnFirstTab(), this);
        importPic.setLocationRelativeTo(mainFrame);
        PicHistogramApp.getApplication().show(importPic);

    }

    @Action
    public void openFristImageOnSecondTab() {

        JFrame mainFrame = PicHistogramApp.getApplication().getMainFrame();
        importPic = new ImportPic(mainFrame, true, getFirstImageOnSecondTab(), this);
        importPic.setLocationRelativeTo(mainFrame);
        PicHistogramApp.getApplication().show(importPic);
    }

    @Action
    public void openSecondImageOnSocondTab() {

        JFrame mainFrame = PicHistogramApp.getApplication().getMainFrame();
        importPic = new ImportPic(mainFrame, true, getSecondImageOnSecondTab(), this);
        importPic.setLocationRelativeTo(mainFrame);
        PicHistogramApp.getApplication().show(importPic);
    }
    
      @Action
    public void openFirstImageOnThirdTab() {

        JFrame mainFrame = PicHistogramApp.getApplication().getMainFrame();
        importPic = new ImportPic(mainFrame, true, getFirstImageOnThirdTab(), this);
        importPic.setLocationRelativeTo(mainFrame);
        PicHistogramApp.getApplication().show(importPic);
    }

    private String[] initComboboxForHistogram() {
        int numberOfQTypes = AbstractQuantizer.TYPE_QUANTIZER.values().length;
        String[] tmp = new String[numberOfQTypes];

//      for(TYPE_QUANTIZER c : qType.values()){
        for (int i = 0; i < numberOfQTypes; i++) {
            tmp[i] = AbstractQuantizer.TYPE_QUANTIZER.values()[i].toString();
        }
        return tmp;
    }

    /**
     * @return the standardbild
     */
    public String getImageOnFirstTab() {
        return getFirstImageOnFirstTab();
    }

    /**
     * @return the filePathOfImageOnFirstTab
     */
    public File getFilePathOfImageOnFirstTab() {
        return filePathOfImageOnFirstTab;
    }

    /**
     * @param filePathOfImageOnFirstTab
     *            the filePathOfImageOnFirstTab to set
     */
    public void setFilePathOfImageOnFirstTab(File filePathOfImageOnFirstTab) {
        this.filePathOfImageOnFirstTab = filePathOfImageOnFirstTab;
    }

    /**
     * @return the filePathOfFirstImageOnSecondTab
     */
    public File getFilePathOfFirstImageOnSecondTab() {
        return filePathOfFirstImageOnSecondTab;
    }

    /**
     * @param filePathOfFirstImageOnSecondTab
     *            the filePathOfFirstImageOnSecondTab to set
     */
    public void setFilePathOfFirstImageOnSecondTab(
            File filePathOfFirstImageOnSecondTab) {
        this.filePathOfFirstImageOnSecondTab = filePathOfFirstImageOnSecondTab;
    }

    /**
     * @return the filePathOfSecondImageOnSecondTab
     */
    public File getFilePathOfSecondImageOnSecondTab() {
        return filePathOfSecondImageOnSecondTab;
    }

    /**
     * @param filePathOfSecondImageOnSecondTab
     *            the filePathOfSecondImageOnSecondTab to set
     */
    public void setFilePathOfSecondImageOnSecondTab(
            File filePathOfSecondImageOnSecondTab) {
        this.filePathOfSecondImageOnSecondTab = filePathOfSecondImageOnSecondTab;
    }

    /** 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() {

        mainPanel = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jScrollPane2 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jPanelPic = new javax.swing.JPanel();
        jLabelFirstImageFirstTab = new javax.swing.JLabel();
        jPanelHistogram = new javax.swing.JPanel();
        jButtonTab1GenerateHisto1 = new javax.swing.JButton();
        jButtonTab1Pic1Open = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jTextFieldForNumberOfBins = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jComboBoxForHistogramTyp = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jComboBoxForFastQuanti = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        jComboBoxForNormalization = new javax.swing.JComboBox();
        jScrollPane3 = new javax.swing.JScrollPane();
        jPanel4 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabelFirstImageSecondTab = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jButtonTab2Pic1Open = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jButtonTab2Pic2Open = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jLabelSecondImageSecondTab = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldForNumberOfBins2 = new javax.swing.JTextField();
        jComboBoxForNormalization3 = new javax.swing.JComboBox();
        jComboBoxForHistogramTyp2 = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jComboBoxDistance = new javax.swing.JComboBox();
        jPanel2 = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jLabelFirstImageThirdTab = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jComboBoxForHistogramTyp3 = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jTextFieldForNumberOfBins3 = new javax.swing.JTextField();
        jComboBoxForNormalization4 = new javax.swing.JComboBox();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jTextFieldLimitOfSearchResults = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jComboBoxDistance2 = new javax.swing.JComboBox();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        helpMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        buttonGroup1 = new javax.swing.ButtonGroup();

        mainPanel.setAutoscrolls(true);
        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setPreferredSize(new java.awt.Dimension(400, 300));
        mainPanel.setLayout(new java.awt.GridLayout(1, 0));

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jScrollPane2.setAutoscrolls(true);
        jScrollPane2.setName("jScrollPane2"); // NOI18N
        jScrollPane2.setPreferredSize(new java.awt.Dimension(400, 300));

        jPanel1.setFocusable(false);
        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setPreferredSize(new java.awt.Dimension(400, 300));

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance().getContext().getResourceMap(PicHistogramMainView.class);
        jPanelPic.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanelPic.border.title"))); // NOI18N
        jPanelPic.setName("jPanelPic"); // NOI18N

        jLabelFirstImageFirstTab.setName("jLabelFirstImageFirstTab"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelPicLayout = new org.jdesktop.layout.GroupLayout(jPanelPic);
        jPanelPic.setLayout(jPanelPicLayout);
        jPanelPicLayout.setHorizontalGroup(
            jPanelPicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelPicLayout.createSequentialGroup()
                .add(jLabelFirstImageFirstTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelPicLayout.setVerticalGroup(
            jPanelPicLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanelPicLayout.createSequentialGroup()
                .add(jLabelFirstImageFirstTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanelHistogram.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanelHistogram.border.title"))); // NOI18N
        jPanelHistogram.setName("jPanelHistogram"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanelHistogramLayout = new org.jdesktop.layout.GroupLayout(jPanelHistogram);
        jPanelHistogram.setLayout(jPanelHistogramLayout);
        jPanelHistogramLayout.setHorizontalGroup(
            jPanelHistogramLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 754, Short.MAX_VALUE)
        );
        jPanelHistogramLayout.setVerticalGroup(
            jPanelHistogramLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 617, Short.MAX_VALUE)
        );

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(PicHistogramMainView.class, this);
        jButtonTab1GenerateHisto1.setAction(actionMap.get("generateFirstHistogramPanelOfFirstTab")); // NOI18N
        jButtonTab1GenerateHisto1.setEnabled(false);
        jButtonTab1GenerateHisto1.setName("jButtonTab1GenerateHisto1"); // NOI18N

        jButtonTab1Pic1Open.setAction(actionMap.get("openFirstImageOfFirstTab")); // NOI18N
        jButtonTab1Pic1Open.setText(resourceMap.getString("jButtonTab1Pic1Open.text")); // NOI18N
        jButtonTab1Pic1Open.setFocusable(false);
        jButtonTab1Pic1Open.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonTab1Pic1Open.setName("jButtonTab1Pic1Open"); // NOI18N
        jButtonTab1Pic1Open.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jTextFieldForNumberOfBins.setText(resourceMap.getString("jTextFieldForNumberOfBins.text")); // NOI18N
        jTextFieldForNumberOfBins.setName("jTextFieldForNumberOfBins"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jComboBoxForHistogramTyp.setModel(new javax.swing.DefaultComboBoxModel<TYPE_QUANTIZER>(TYPE_QUANTIZER.values())
        );
        jComboBoxForHistogramTyp.setName("jComboBoxForHistogramTyp"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jComboBoxForFastQuanti.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AN", "AUS"}));
        jComboBoxForFastQuanti.setName("jComboBoxForFastQuanti"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jComboBoxForNormalization.setModel(new javax.swing.DefaultComboBoxModel<TYPE_BIN_VALUES>(TYPE_BIN_VALUES.values())
        );
        jComboBoxForNormalization.setName("jComboBoxForNormalization"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jPanel1Layout.createSequentialGroup()
                            .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                .add(jLabel2)
                                .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1Layout.createSequentialGroup()
                                    .add(42, 42, 42)
                                    .add(jLabel3))
                                .add(jLabel7))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                            .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                .add(jComboBoxForHistogramTyp, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 135, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jComboBoxForNormalization, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jComboBoxForFastQuanti, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 117, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                            .add(41, 41, 41)
                            .add(jLabel6)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                            .add(jTextFieldForNumberOfBins, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanelPic, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(jButtonTab1Pic1Open)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jButtonTab1GenerateHisto1)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanelHistogram, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        jPanel1Layout.linkSize(new java.awt.Component[] {jComboBoxForFastQuanti, jComboBoxForHistogramTyp, jComboBoxForNormalization, jTextFieldForNumberOfBins}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        jPanel1Layout.linkSize(new java.awt.Component[] {jButtonTab1GenerateHisto1, jButtonTab1Pic1Open}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jPanelPic, 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(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                            .add(jButtonTab1GenerateHisto1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(jButtonTab1Pic1Open, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .add(jPanelHistogram, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(18, 18, 18)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jComboBoxForHistogramTyp, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel3))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jComboBoxForNormalization, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel7))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jComboBoxForFastQuanti, 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.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel6)
                    .add(jTextFieldForNumberOfBins, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jScrollPane2.setViewportView(jPanel1);

        jTabbedPane1.addTab("Standard", jScrollPane2);

        jScrollPane3.setAutoscrolls(true);
        jScrollPane3.setName("jScrollPane3"); // NOI18N
        jScrollPane3.setPreferredSize(new java.awt.Dimension(400, 300));

        jPanel4.setFocusable(false);
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setPreferredSize(new java.awt.Dimension(400, 300));

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N

        jLabelFirstImageSecondTab.setName("jLabelFirstImageSecondTab"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel5Layout.createSequentialGroup()
                .add(jLabelFirstImageSecondTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel5Layout.createSequentialGroup()
                .add(jLabelFirstImageSecondTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel6.border.title"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setPreferredSize(new java.awt.Dimension(0, 0));

        org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 855, Short.MAX_VALUE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 280, Short.MAX_VALUE)
        );

        jButtonTab2Pic1Open.setAction(actionMap.get("openFristImageOnSecondTab")); // NOI18N
        jButtonTab2Pic1Open.setText(resourceMap.getString("jButtonTab2Pic1Open.text")); // NOI18N
        jButtonTab2Pic1Open.setFocusable(false);
        jButtonTab2Pic1Open.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonTab2Pic1Open.setName("jButtonTab2Pic1Open"); // NOI18N
        jButtonTab2Pic1Open.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel7.border.title"))); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setPreferredSize(new java.awt.Dimension(0, 0));

        org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 855, Short.MAX_VALUE)
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 271, Short.MAX_VALUE)
        );

        jButtonTab2Pic2Open.setAction(actionMap.get("openSecondImageOnSocondTab")); // NOI18N
        jButtonTab2Pic2Open.setText(resourceMap.getString("jButtonTab2Pic2Open.text")); // NOI18N
        jButtonTab2Pic2Open.setFocusable(false);
        jButtonTab2Pic2Open.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonTab2Pic2Open.setName("jButtonTab2Pic2Open"); // NOI18N
        jButtonTab2Pic2Open.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel8.border.title"))); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N

        jLabelSecondImageSecondTab.setName("jLabelSecondImageSecondTab"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel8Layout.createSequentialGroup()
                .add(jLabelSecondImageSecondTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel8Layout.createSequentialGroup()
                .add(jLabelSecondImageSecondTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton1.setAction(actionMap.get("generateHistogramPanelsOfSecondTab")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jTextFieldForNumberOfBins2.setText(resourceMap.getString("jTextFieldForNumberOfBins2.text")); // NOI18N
        jTextFieldForNumberOfBins2.setName("jTextFieldForNumberOfBins2"); // NOI18N
        jTextFieldForNumberOfBins2.setPreferredSize(new java.awt.Dimension(28, 20));

        jComboBoxForNormalization3.setModel(new javax.swing.DefaultComboBoxModel<TYPE_BIN_VALUES>(TYPE_BIN_VALUES.values())
        );
        jComboBoxForNormalization3.setName("jComboBoxForNormalization3"); // NOI18N

        jComboBoxForHistogramTyp2.setModel(new javax.swing.DefaultComboBoxModel<TYPE_QUANTIZER>(TYPE_QUANTIZER.values()));
        jComboBoxForHistogramTyp2.setMaximumSize(new java.awt.Dimension(28, 20));
        jComboBoxForHistogramTyp2.setName("jComboBoxForHistogramTyp2"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jComboBoxDistance.setModel(new javax.swing.DefaultComboBoxModel<TYPE_DISTANCE>(TYPE_DISTANCE.values()));
        jComboBoxDistance.setName("jComboBoxDistance"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel4Layout.createSequentialGroup()
                        .add(jButtonTab2Pic2Open)
                        .add(18, 18, 18)
                        .add(jButton1)
                        .add(210, 210, 210)
                        .add(jLabel8)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 128, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 58, Short.MAX_VALUE)
                        .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 90, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel10)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel5)))
                    .add(jLabel4))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jComboBoxForHistogramTyp2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jComboBoxForNormalization3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBoxDistance, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 128, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jTextFieldForNumberOfBins2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(10, Short.MAX_VALUE)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 867, Short.MAX_VALUE)
                    .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 867, Short.MAX_VALUE))
                .add(8, 8, 8))
            .add(jPanel4Layout.createSequentialGroup()
                .add(10, 10, 10)
                .add(jButtonTab2Pic1Open)
                .addContainerGap(1089, Short.MAX_VALUE))
        );

        jPanel4Layout.linkSize(new java.awt.Component[] {jButtonTab2Pic1Open, jButtonTab2Pic2Open}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        jPanel4Layout.linkSize(new java.awt.Component[] {jComboBoxDistance, jComboBoxForHistogramTyp2, jComboBoxForNormalization3, jTextFieldForNumberOfBins2}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(9, 9, 9)
                .add(jButtonTab2Pic1Open)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)
                    .add(jPanel8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel4Layout.createSequentialGroup()
                        .add(14, 14, 14)
                        .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel5)
                            .add(jComboBoxForHistogramTyp2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jComboBoxForNormalization3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLabel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(jPanel4Layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jButtonTab2Pic2Open)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jLabel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jLabel8))
                            .add(jButton1))))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel16)
                    .add(jComboBoxDistance, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jTextFieldForNumberOfBins2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel4))
                .add(17, 17, 17))
        );

        jPanel4Layout.linkSize(new java.awt.Component[] {jButtonTab2Pic1Open, jButtonTab2Pic2Open}, org.jdesktop.layout.GroupLayout.VERTICAL);

        jScrollPane3.setViewportView(jPanel4);

        jTabbedPane1.addTab("Erweitert", jScrollPane3);

        jPanel2.setName("jPanel2"); // NOI18N

        jButton2.setAction(actionMap.get("openFirstImageOnThirdTab")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel9.border.title"))); // NOI18N
        jPanel9.setMaximumSize(new java.awt.Dimension(640, 520));
        jPanel9.setName("jPanel9"); // NOI18N

        jLabelFirstImageThirdTab.setName("jLabelFirstImageThirdTab"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel9Layout.createSequentialGroup()
                .add(jLabelFirstImageThirdTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jLabelFirstImageThirdTab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE)
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel10.border.title"))); // NOI18N
        jPanel10.setName("jPanel10"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 787, Short.MAX_VALUE)
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 235, Short.MAX_VALUE)
        );

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(

            new Object [][] {
                null

            },
            new String [] {
                "Dateiname", "Übereinstimmung", "Pfad", "Größe in KB"
            })
            {
                boolean[] canEdit = new boolean [] {
                    false, false
                };

                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit [columnIndex];
                }}
            );
            jTable1.setName("jTable1"); // NOI18N
            jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    jTable1MouseClicked(evt);
                }
            });
            jScrollPane1.setViewportView(jTable1);

            jComboBoxForHistogramTyp3.setModel(new javax.swing.DefaultComboBoxModel<TYPE_QUANTIZER>(TYPE_QUANTIZER.values()));
            jComboBoxForHistogramTyp3.setMaximumSize(new java.awt.Dimension(28, 20));
            jComboBoxForHistogramTyp3.setName("jComboBoxForHistogramTyp3"); // NOI18N

            jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
            jLabel11.setName("jLabel11"); // NOI18N

            jTextFieldForNumberOfBins3.setText(resourceMap.getString("jTextFieldForNumberOfBins3.text")); // NOI18N
            jTextFieldForNumberOfBins3.setName("jTextFieldForNumberOfBins3"); // NOI18N
            jTextFieldForNumberOfBins3.setPreferredSize(new java.awt.Dimension(28, 20));

            jComboBoxForNormalization4.setModel(new javax.swing.DefaultComboBoxModel<TYPE_BIN_VALUES>(TYPE_BIN_VALUES.values())
            );
            jComboBoxForNormalization4.setName("jComboBoxForNormalization4"); // NOI18N

            jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
            jLabel12.setName("jLabel12"); // NOI18N

            jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
            jLabel13.setName("jLabel13"); // NOI18N

            jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
            jLabel1.setName("jLabel1"); // NOI18N

            jTextFieldLimitOfSearchResults.setText(resourceMap.getString("jTextFieldLimitOfSearchResults.text")); // NOI18N
            jTextFieldLimitOfSearchResults.setName("jTextFieldLimitOfSearchResults"); // NOI18N

            jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
            jLabel14.setName("jLabel14"); // NOI18N

            jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
            jLabel15.setName("jLabel15"); // NOI18N

            jComboBoxDistance2.setModel(new javax.swing.DefaultComboBoxModel<TYPE_DISTANCE>(TYPE_DISTANCE.values()));
            jComboBoxDistance2.setName("jComboBoxDistance2"); // NOI18N

            jButton3.setAction(actionMap.get("generateHistogramPanelsOfThirdTabAndStartSearch")); // NOI18N
            jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
            jButton3.setName("jButton3"); // NOI18N

            jButton4.setAction(actionMap.get("verzeichnisWaehlen")); // NOI18N
            jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
            jButton4.setName("jButton4"); // NOI18N

            org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
            jPanel2.setLayout(jPanel2Layout);
            jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1166, Short.MAX_VALUE)
                        .add(jPanel2Layout.createSequentialGroup()
                            .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                        .add(jPanel9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .add(jLabel1))
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(jButton2)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                    .add(jButton4)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 29, Short.MAX_VALUE)
                                    .add(jButton3)
                                    .add(27, 27, 27)))
                            .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                                        .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2Layout.createSequentialGroup()
                                            .add(20, 20, 20)
                                            .add(jLabel15)
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(jComboBoxDistance2, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2Layout.createSequentialGroup()
                                            .add(jLabel14)
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(jTextFieldLimitOfSearchResults, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 119, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 359, Short.MAX_VALUE)
                                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                        .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                            .add(jPanel2Layout.createSequentialGroup()
                                                .add(3, 3, 3)
                                                .add(jLabel12)
                                                .add(4, 4, 4)
                                                .add(jComboBoxForNormalization4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                            .add(jPanel2Layout.createSequentialGroup()
                                                .add(jLabel13)
                                                .add(4, 4, 4)
                                                .add(jTextFieldForNumberOfBins3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                                        .add(jPanel2Layout.createSequentialGroup()
                                            .add(1, 1, 1)
                                            .add(jLabel11)
                                            .add(4, 4, 4)
                                            .add(jComboBoxForHistogramTyp3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                                .add(jPanel10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                    .addContainerGap())
            );
            jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(jPanel2Layout.createSequentialGroup()
                    .addContainerGap()
                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jPanel10, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(jPanel9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jPanel2Layout.createSequentialGroup()
                            .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(3, 3, 3)
                                    .add(jLabel11))
                                .add(jComboBoxForHistogramTyp3, 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(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(3, 3, 3)
                                    .add(jLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .add(jComboBoxForNormalization4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .add(6, 6, 6)
                            .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jTextFieldForNumberOfBins3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(3, 3, 3)
                                    .add(jLabel13))))
                        .add(jPanel2Layout.createSequentialGroup()
                            .add(5, 5, 5)
                            .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                        .add(jPanel2Layout.createSequentialGroup()
                                            .add(3, 3, 3)
                                            .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                                .add(jLabel14)
                                                .add(jButton3)))
                                        .add(jTextFieldLimitOfSearchResults, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                        .add(jPanel2Layout.createSequentialGroup()
                                            .add(9, 9, 9)
                                            .add(jLabel15))
                                        .add(jPanel2Layout.createSequentialGroup()
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(jComboBoxDistance2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                                .add(jPanel2Layout.createSequentialGroup()
                                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                        .add(jButton2)
                                        .add(jButton4))
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 35, Short.MAX_VALUE)
                                    .add(jLabel1)))))
                    .add(18, 18, 18)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
                    .add(16, 16, 16))
            );

            jTabbedPane1.addTab("Suche", jPanel2);

            mainPanel.add(jTabbedPane1);

            menuBar.setName("menuBar"); // NOI18N

            fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
            fileMenu.setName("fileMenu"); // NOI18N

            jMenuItem1.setAction(actionMap.get("showOpenPictureDialog")); // NOI18N
            jMenuItem1.setName("jMenuItem1"); // NOI18N
            fileMenu.add(jMenuItem1);

            exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
            exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N
            exitMenuItem.setName("exitMenuItem"); // NOI18N
            fileMenu.add(exitMenuItem);

            menuBar.add(fileMenu);

            helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
            helpMenu.setName("helpMenu"); // NOI18N

            helpMenuItem.setText(resourceMap.getString("helpMenuItem.text")); // NOI18N
            helpMenuItem.setName("helpMenuItem"); // NOI18N
            helpMenu.add(helpMenuItem);

            aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
            aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N
            aboutMenuItem.setName("aboutMenuItem"); // NOI18N
            helpMenu.add(aboutMenuItem);

            menuBar.add(helpMenu);

            statusPanel.setName("statusPanel"); // NOI18N
            statusPanel.setPreferredSize(new java.awt.Dimension(400, 25));

            statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

            statusMessageLabel.setName("statusMessageLabel"); // NOI18N

            statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
            statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

            progressBar.setName("progressBar"); // NOI18N

            org.jdesktop.layout.GroupLayout statusPanelLayout = new org.jdesktop.layout.GroupLayout(statusPanel);
            statusPanel.setLayout(statusPanelLayout);
            statusPanelLayout.setHorizontalGroup(
                statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1191, Short.MAX_VALUE)
                .add(statusPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .add(statusMessageLabel)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 1021, Short.MAX_VALUE)
                    .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(statusAnimationLabel)
                    .addContainerGap())
            );
            statusPanelLayout.setVerticalGroup(
                statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(statusPanelLayout.createSequentialGroup()
                    .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(statusMessageLabel)
                        .add(statusAnimationLabel)
                        .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(3, 3, 3))
            );

            setComponent(mainPanel);
            setMenuBar(menuBar);
            setStatusBar(statusPanel);
        }// </editor-fold>//GEN-END:initComponents

private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked

   if (evt.getClickCount()==2){
      Point p = evt.getPoint();
      int row = jTable1.rowAtPoint(p);
      PictureViewer fenster = new PictureViewer((String)dtmAttributes.getValueAt(row,2));
      fenster.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    fenster.show();
    fenster.pack();
      
    
      Out.println(dtmAttributes.getValueAt(row,3));
      

   };
    
}//GEN-LAST:event_jTable1MouseClicked

    @Action
    public void exit() {
        ;

    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JMenuItem helpMenuItem;
    protected javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    protected javax.swing.JButton jButtonTab1GenerateHisto1;
    private javax.swing.JButton jButtonTab1Pic1Open;
    protected javax.swing.JButton jButtonTab2Pic1Open;
    private javax.swing.JButton jButtonTab2Pic2Open;
    private javax.swing.JComboBox jComboBoxDistance;
    private javax.swing.JComboBox jComboBoxDistance2;
    private javax.swing.JComboBox jComboBoxForFastQuanti;
    private javax.swing.JComboBox jComboBoxForHistogramTyp;
    private javax.swing.JComboBox jComboBoxForHistogramTyp2;
    private javax.swing.JComboBox jComboBoxForHistogramTyp3;
    private javax.swing.JComboBox jComboBoxForNormalization;
    private javax.swing.JComboBox jComboBoxForNormalization3;
    private javax.swing.JComboBox jComboBoxForNormalization4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    protected javax.swing.JLabel jLabelFirstImageFirstTab;
    protected javax.swing.JLabel jLabelFirstImageSecondTab;
    protected javax.swing.JLabel jLabelFirstImageThirdTab;
    protected javax.swing.JLabel jLabelSecondImageSecondTab;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    protected javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    protected javax.swing.JPanel jPanel6;
    protected javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    protected javax.swing.JPanel jPanelHistogram;
    private javax.swing.JPanel jPanelPic;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextFieldForNumberOfBins;
    private javax.swing.JTextField jTextFieldForNumberOfBins2;
    private javax.swing.JTextField jTextFieldForNumberOfBins3;
    private javax.swing.JTextField jTextFieldLimitOfSearchResults;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    // End of variables declaration//GEN-END:variables
    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;
    private JDialog aboutBox;
    private JDialog importPic;
    private final String firstImageOnFirstTab = "sta";
    private final String firstImageOnSecondTab = "erw1";
    private final String secondImageOnSecondTab = "erw2";
    private final String firstImageOnThirdTab = "search";
    private final String histogram = "histo";
    private final String histogram1 = "histo1";
    private final String histogram2 = "histo2";
    private final String histogram3 = "histo3";
    private File filePathOfImageOnFirstTab;
    private File filePathOfFirstImageOnSecondTab;
    private File filePathOfSecondImageOnSecondTab;
   // private File searchFile;
    protected TYPE_QUANTIZER qType;
    protected TYPE_DISTANCE distanceEnumForSecondTab;
    protected TYPE_DISTANCE distanceEnumForThirdTab;
    private Data data;
    private Data data1;
    private Data data2;
    protected File searchFolder;
    protected File searchFile;

    /**
     * @return the filePathOfSecondImageOnThirdTab
     */
    public File getFilePathOfSecondImageOnThirdTab() {
        return searchFile;
    }

    /**
     * @param filePathOfSecondImageOnThirdTab the filePathOfSecondImageOnThirdTab to set
     */
    public void setFilePathOfFirstImageOnThirdTab(File filePathOfSecondImageOnThirdTab) {
        this.searchFile = filePathOfSecondImageOnThirdTab;
    }

    /**
     * @return the firstImageOnThirdTab
     */
    public String getFirstImageOnThirdTab() {
        return firstImageOnThirdTab;
    }

    @Action
    public void verzeichnisWaehlen() {
        
        JFileChooser jfc = new JFileChooser ();
		jfc.setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY);
		if (jfc.showSaveDialog (null) == JFileChooser.APPROVE_OPTION)
                    searchFolder= new File (jfc.getSelectedFile().getAbsolutePath());
    }
}
