GEN-LAST:event_addMappingButtonActionPerformed
190727
private void addMapping() {
		String id = IDGenerator.getNextUniqueID("MAPID-");

		JDialog dialog = new JDialog();
		dialog.setTitle("New Mapping");
		dialog.setModal(true);

		NewMappingDialogPanel panel = new NewMappingDialogPanel(apic, dialog, selectedSource);
		panel.setID(id);
		dialog.setContentPane(panel);
		dialog.setSize(600, 500);
		dialog.setLocationRelativeTo(this);
		dialog.setVisible(true);
	}
768782
private void backgroundButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backgroundButtonActionPerformed
        Color color = ScreenUtil.getColor(ScreenUtil.BACKGROUND_COLOR, null, properties);
        color = JColorChooser.showDialog(this, java.util.ResourceBundle.getBundle(DIALOG_BUNDLE).getString("choosebackgroundcolor"), color);
        if (color != null)
            ScreenUtil.setColor(ScreenUtil.BACKGROUND_COLOR, new ColorUIResource(color), null, properties);
        else
            properties.remove(ScreenUtil.BACKGROUND_COLOR);
        
        ScreenUtil.updateLookAndFeel(this, null, properties);
        this.setSampleStyle();
    }
952640
private void buttonOpenShortcutEditorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonOpenShortcutEditorActionPerformed
    final List<KeyShortcut> list = new ArrayList<>();
    for (final Map.Entry<String, KeyShortcut> e : this.mapKeyShortCuts.entrySet()) {
      list.add(e.getValue());
    }
    final KeyShortCutEditPanel panel = new KeyShortCutEditPanel(list);
    if (DialogProviderManager.getInstance().getDialogProvider().msgOkCancel(this, "Edit shortcuts", panel)) {
      for (final KeyShortcut s : panel.getResult()) {
        this.mapKeyShortCuts.put(s.getID(), s);
      }
      if (this.changeNotificationAllowed) {
        this.changed = true;
      }
    }
  }
1151419
private void cmdExportResultActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_buttonSaveResultsActionPerformed
		JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));
		fileChooser.setDialogTitle("Export to...");
		int response = fileChooser.showSaveDialog(this);
		if (response == JFileChooser.APPROVE_OPTION) {
			File targetFile = fileChooser.getSelectedFile();
			final String fileLocation = targetFile.getPath();
			if (canWrite(targetFile)) {
				Thread thread = new Thread() {
					public void run() {						
						getOBDASaveQueryToFileAction().run(fileLocation);
					}
				};
				thread.start();
			}
		}
	}
1340431
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
        feedback = UserFeedback.Cancel;
        synchronized (WAITER_LOCK) {
            okButton.setEnabled(false);
            cancelButton.setEnabled(false);
            WAITER_LOCK.notifyAll();
        }
    }
297797
private void buttonRedrawMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_buttonRedrawMouseClicked
        if (visualizer != null) 
            visualizer.redraw();
    }
1288797
private void cmdAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdAddActionPerformed
    	// Open a save dialog if it is a new query
		JDialog saveDialog = new JDialog();
		saveDialog.setTitle("New Query");
		saveDialog.setModalityType(ModalityType.MODELESS);
		
		SaveQueryPanel savePanel = new SaveQueryPanel("", saveDialog, queryController);
		saveDialog.getContentPane().add(savePanel, java.awt.BorderLayout.CENTER);
		saveDialog.pack();
		
		DialogUtils.centerDialogWRTParent(this, saveDialog);
		DialogUtils.installEscapeCloseOperation(saveDialog);
		
		saveDialog.setVisible(true);
    }
845947
private void jButtonAceptGnuPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAceptGnuPActionPerformed

        if (!this.jTextFieldResultPath.getText().equals("")) {
            String outPath = getDirectory("open", JFileChooser.DIRECTORIES_ONLY);
            if(!outPath.equals("")){
                
            File resultFile = new File(this.jTextFieldResultPath.getText());
            String resultDirectory = resultFile.getAbsolutePath();
            String gnuPlotPath = this.jTextFieldGNUPath.getText();
            String gnuplotScriptPath = null;
            File gnuplotDir = new File(gnuPlotPath);
            if (!gnuplotDir.exists()) {
                JOptionPane.showMessageDialog(this, "Gnuplot directory not found: " + gnuPlotPath, "Error", JOptionPane.ERROR_MESSAGE);
                return;
            }
            String algShortName[] = new String[this.jTableAlgoritms.getRowCount()];
            String algName[] = new String[this.jTableAlgoritms.getRowCount()];
            for (int i = 0; i < this.jTableStreams.getRowCount(); i++) {
                String streamName = this.jTableStreams.getModel().getValueAt(i, 0).toString();
                String streamShortName = this.jTableStreams.getModel().getValueAt(i, 1).toString();
                for (int j = 0; j < this.jTableAlgoritms.getRowCount(); j++) {
                    algName[j] = this.jTableAlgoritms.getModel().getValueAt(j, 0).toString();
                    algShortName[j] = this.jTableAlgoritms.getModel().getValueAt(j, 1).toString();
                    File inputFile = new File(FilenameUtils.separatorsToSystem(
                            this.path + "\\" + streamName + "\\" + algName[j]));

                    if (!inputFile.exists()) {
                        JOptionPane.showMessageDialog(this, "File not found: "
                                + inputFile.getAbsolutePath(),
                                "Error", JOptionPane.ERROR_MESSAGE);
                        return;
                    }

                }

                gnuplotScriptPath = resultDirectory + File.separator
                        + resultFile.getName() + ".plt";
                String script = createScript(streamName, algName, algShortName, outPath);
                File scriptFile = writeScriptToFile(gnuplotScriptPath, script);
                String gnuplotCommand = gnuPlotPath + File.separator + "gnuplot \""
                        + gnuplotScriptPath + "\"";
                String line, gnuplotOutput = "";
                try {
                    Process p = Runtime.getRuntime().exec(gnuplotCommand);

                    BufferedReader err = new BufferedReader(new InputStreamReader(p
                            .getErrorStream()));
                    while ((line = err.readLine()) != null) {
                        gnuplotOutput += line + System.getProperty("line.separator");
                    }
                    err.close();
                } catch (IOException ex) {
                    JOptionPane.showMessageDialog(this, "Error while executing gnuplot script",
                            "Error", JOptionPane.ERROR_MESSAGE);
                    throw new RuntimeException("Error while executing gnuplot script:"
                            + scriptFile, ex);

                }
                if (this.jCheckBoxDeleteScript.isSelected()) {
                    scriptFile.delete();
                }
            }

            //Completed
            JOptionPane.showMessageDialog(this, "Figures created at " + (new File(resultFile.getAbsolutePath())).getParent(),
                    "", JOptionPane.INFORMATION_MESSAGE);
        }
        } else {
            JOptionPane.showMessageDialog(this, "Plot output file option not set!",
                    "Error", JOptionPane.ERROR_MESSAGE);
        }

    }
879995
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        QueuJPerfTest test = new QueuJPerfTest();
        System.out.println(test.run());
    }
1214581
private void menuUndoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuUndoActionPerformed
    final TabTitle title = this.getFocusedTab();
    if (title != null) {
      this.menuUndo.setEnabled(title.getProvider().undo());
      this.menuRedo.setEnabled(title.getProvider().isRedo());
    }
  }
1150044
private void buttonEditKeyCodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEditKeyCodeActionPerformed
    if (this.buttonEditKeyCode.isSelected()){
      this.textFieldKeyCode.requestFocus();
    }
  }
1164837
private synchronized void cmdSaveChangesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_buttonSaveActionPerformed
		final String query = queryTextPane.getText();
		if (!currentId.isEmpty()) {
			if (!currentGroup.isEmpty()) {
				qc.addQuery(query, currentId, currentGroup);
			} else {
				qc.addQuery(query, currentId);
			}
		} else {
			JOptionPane.showMessageDialog(QueryInterfacePanel.this,
					"Please select first the query node that you would like to update",
					"Warning",
					JOptionPane.WARNING_MESSAGE);
		}	
	}
501700
private void buttonExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExportActionPerformed
    final File toSave = DialogProviderManager.getInstance().getDialogProvider().msgSaveFileDialog(null, "note-editor", UiUtils.BUNDLE.getString("PlainTextEditor.buttonSaveActionPerformed.saveTitle"), null, true, TEXT_FILE_FILTER, "Save"); //NOI18N
    if (toSave != null) {
      try {
        final String text = getText();
        FileUtils.writeStringToFile(toSave, text, "UTF-8"); //NOI18N
      } catch (Exception ex) {
        LOGGER.error("Error during text file saving", ex); //NOI18N
        DialogProviderManager.getInstance().getDialogProvider().msgError(Main.getApplicationFrame(), UiUtils.BUNDLE.getString("PlainTextEditor.buttonSaveActionPerformed.msgError"));
      }
    }

  }
605293
private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
        char[] rgchPassword = passwordField.getPassword();
        char[] rgchRePassword = rePasswordField.getPassword();
        if (new String(rgchPassword).length() > 0)
        	if (!new String(rgchPassword).equalsIgnoreCase(new String(rgchRePassword)))
        	{
        		userMessage.setText("Passwords do not match - try again");
        		return;		// Try again
        	}
        loginDialog.setPassword(new String(rgchPassword));
        loginDialog.setUserName(userField.getText());
        loginDialog.setSaveInfo(saveInfoCheckbox.isSelected());
        returnStatus = LoginDialog.NEW_USER_OPTION;
        
        doClose(LoginDialog.NEW_USER_OPTION);
    }
574170
private void directoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_directoryButtonActionPerformed
        // Select save directory
        JFileChooser chooser = new JFileChooser();
        chooser.setDialogTitle("Directory Select");
        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        chooser.setAcceptAllFileFilterUsed(false);
        if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
            folderField.setText(chooser.getSelectedFile().getAbsolutePath()
                    + File.separator);
        }
    }
1145738
private void jButtonAceptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAceptActionPerformed

        int algCount = this.jTableAlgoritms.getRowCount();
        int streamCount = this.jTableStreams.getRowCount();
        chart = new ImageChart[streamCount];

        for (int i = 0; i < streamCount; i++) {
            String streamName = this.jTableStreams.getModel().getValueAt(i, 0).toString();
            String streamID = this.jTableStreams.getModel().getValueAt(i, 1).toString();
            XYSeriesCollection dataset = new XYSeriesCollection();
            for (int j = 0; j < algCount; j++) {
                try {
                    String algName = this.jTableAlgoritms.getModel().getValueAt(j, 0).toString();
                    String algID = this.jTableAlgoritms.getModel().getValueAt(j, 1).toString();
                    String algPath = FilenameUtils.separatorsToSystem(
                            this.path + "\\" + streamName + "\\" + algName);
                    File inputFile = new File(algPath);
                    if (!inputFile.exists()) {
                        JOptionPane.showMessageDialog(this, "File not found: "
                                + inputFile.getAbsolutePath(),
                                "Error", JOptionPane.ERROR_MESSAGE);
                        return;
                    }
                    /*Preparing the graph*/
                    ArrayList<String[]> data = readCSV(algPath);
                    XYSeries series = new XYSeries(algID);
                    int x = ReadFile.getMeasureIndex(algPath,this.jComboBoxXColumn.getSelectedItem().toString());
                    int y = ReadFile.getMeasureIndex(algPath,this.jComboBoxYColumn.getSelectedItem().toString());
                    
                    for (String[] s : data) {
                        series.add(Double.parseDouble(s[x]), Double.parseDouble(s[y]));
                    }

                    dataset.addSeries(series);

                } catch (FileNotFoundException ex) {
                    Logger.getLogger(PlotTab.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IOException ex) {
                    Logger.getLogger(PlotTab.class.getName()).log(Level.SEVERE, null, ex);
                }
            }//end for 
            /*Create chart*/
            JFreeChart imgChart = ChartFactory.createXYLineChart(
                    this.jTextFieldTitle.getText(), // Title
                    this.jTextFieldxTitle.getText(), // x-axis Label
                    this.jTextFieldyTitle.getText(), // y-axis Label
                    dataset, // Dataset
                    PlotOrientation.VERTICAL, // Plot Orientation
                    true, // Show Legend
                    true, // Use tooltips
                    false // Configure chart to generate URLs?
            );
            final XYPlot plot = imgChart.getXYPlot();
            switch (this.jComboBoxGrid.getSelectedItem().toString()) {
                case "White":
                    plot.setBackgroundPaint(Color.white);
                    break;
                case "Default":
                    plot.setBackgroundPaint(Color.lightGray);
            }
            if (this.jCheckBoxShape.isSelected()) {
                final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
                renderer.setSeriesLinesVisible(0, true);
                renderer.setSeriesShapesVisible(1, false);
                for (int k = 0; k < algCount; k++) {
                    renderer.setSeriesPaint(k, Color.black);
                }
                plot.setRenderer(renderer);
            }

            this.chart[i] = new ImageChart(streamID, imgChart,
                    (int) this.jSpinnerWidth.getValue(), (int) this.jSpinnerHeight.getValue());

        }
        this.imgPanel = new ImageTreePanel(chart);
        new ImageViewer(imgPanel, path);

    }
1025198
private void buttonEditLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEditLineActionPerformed
    this.tableExtensions.editCellAt(this.tableExtensions.getSelectedRow(), 0);
  }