GEN-LAST:event_openButtonActionPerformed
546811
private void origImagePanelComponentResized(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_origImagePanelComponentResized
        origImagePanel.repaint();
		polygonImagePanel.repaint();
    }
715974
private void resetColourButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetColourButtonActionPerformed
        // Put colours back to default black-on-white
        setInk(Color.BLACK);
        setPaper(Color.WHITE);
    }
1146846
private void buttonAddLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAddLineActionPerformed
    ((DefaultTableModel)this.tableExtensions.getModel()).addRow(new String[]{""});
  }
265018
private void resetButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetButtonActionPerformed
        //clear the existing values from the table    
        DefaultTableModel model = (DefaultTableModel) rules.getModel();
        model.setRowCount(0);
        
        //remove existing match rules from the scan
        scan.clearMatchRules();

        //load the defaults
        urlTextField.setText(DEFAULT_URL);
        
        //issue request to URL
        MatchRulesLoader loader = new MatchRulesLoader(DEFAULT_URL);
        loader.start();
    }
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();
			}
		}
	}
931401
private void cmdAttachPrefixActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_buttonAdvancedPropertiesActionPerformed
		SelectPrefixPanel dialog = new SelectPrefixPanel(apic.getMutablePrefixManager(), queryTextPane);
		dialog.show();
	}
855985
private void cmdFontFamilyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdFontFamilyActionPerformed
    	FontChooser2 fe = new FontChooser2(cmdFontFamily, DisposableOBDAPreferences.OBDAPREFS_FONTFAMILY, DisposableOBDAPreferences.OBDAPREFS_FONTSIZE, DisposableOBDAPreferences.OBDAPREFS_ISBOLD);
    }
100385
private void buttonCopyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCopyActionPerformed
    StringSelection stringSelection = new StringSelection(this.editorPane.getSelectedText());
    final Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
    clpbrd.setContents(stringSelection, null);
  }
237465
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

        JavaProcessBuilder pb = SAMPLE_QUEUE.newProcessBuilder(Locale.getDefault());
        pb.setProcessName("Test 2");
        pb.setProcessPersistence(false);

        for (int i = 0; i<=(Integer)jSpinner1.getValue(); i++) {
            pb.setProcessDescription("Test 2");
            pb.setProcessDetails(new TestRunner(), "run", new Class[] {}, new Object[] {});

            RunOnce occurrence = new RunOnce();
            RelativeScheduleBuilder rsb = occurrence.newRelativeScheduleBuilder();
            rsb.setRunDelaySeconds((int)(Math.random() * 60));
            rsb.createSchedule();
            pb.setProcessOccurrence(occurrence);

            pb.newProcess();
        }
    }
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);
        }

    }
385453
private void jButtonGnuoPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonGnuoPathActionPerformed
        this.jTextFieldGNUPath.setText(getDirectory("open", JFileChooser.DIRECTORIES_ONLY));
    }
1032548
private void buttonImportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonImportSettingsActionPerformed

        BaseFileChooser fileChooser = new BaseFileChooser();
        fileChooser.setAcceptAllFileFilterUsed(true);
        fileChooser.addChoosableFileFilter(new FileExtensionFilter("txt"));
        if(lastfile!=null)
            fileChooser.setSelectedFile(new File(lastfile));
        if (fileChooser.showOpenDialog(this.buttonImportSettings) == BaseFileChooser.APPROVE_OPTION) {
            lastfile = fileChooser.getSelectedFile().getPath();
            loadOptionsFromFile(fileChooser.getSelectedFile().getPath());
        }
    }
789017
private void jButtonDeletAlgorithmActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDeletAlgorithmActionPerformed
         if (this.jTableAlgoritms.getSelectedRow() != -1) {
           
            this.algoritmModel.removeRow(this.jTableAlgoritms.getSelectedRow());
             String algorithms[] = new String[algoritmModel.getRowCount()];
            for (int i = 0; i < algoritmModel.getRowCount(); i++) {
                algorithms[i] = algoritmModel.getValueAt(i, 0).toString();
            }
           if (streamModel.getValueAt(0, 0).toString() != null) {
               String s = streamModel.getValueAt(0, 0).toString();
               rf.updateMeasures(algorithms, s);
            this.measures = rf.getMeasures();
            String measuresNames[] = measures.getFirst().split(",");
            jComboBoxXColumn.removeAllItems();
            jComboBoxYColumn.removeAllItems();
            jComboBoxXColumnGnuP.removeAllItems();
            jComboBoxYColumnGnuP.removeAllItems();
            for (String measuresName : measuresNames) {
                jComboBoxXColumn.addItem(measuresName);
                jComboBoxYColumn.addItem(measuresName);
                jComboBoxXColumnGnuP.addItem(measuresName);
                jComboBoxYColumnGnuP.addItem(measuresName);
                if (measuresName.equals("learning evaluation instances") == true) {
                    jComboBoxXColumn.setSelectedItem(measuresName);
                    jComboBoxXColumnGnuP.setSelectedItem(measuresName);
                }
                if (measuresName.equals("classifications correct (percent)") == true || measuresName.equals("[avg] classifications correct (percent)")) {
                    jComboBoxYColumn.setSelectedItem(measuresName);
                    jComboBoxYColumnGnuP.setSelectedItem(measuresName);
                }

            }
           }
        }
    }
310555
private void jButtonInPathActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonInPathActionPerformed
        path = getDirectory("open", JFileChooser.DIRECTORIES_ONLY);
        if (!path.equals("")) {
            reset();
            resetP();
            this.jTextFieldResultPath.setText(path);
             rf = new ReadFile(path);
            String str = rf.processFiles();
            if (str.equals("")) {

                int algSize = rf.getAlgShortNames().size();
                int streamSize = rf.getStream().size();
                this.measures = rf.getMeasures();
                for (int i = 0; i < algSize; i++) {
                    this.algoritmModel.addRow(new Object[]{rf.getAlgNames().get(i), rf.getAlgShortNames().get(i)});
                }
                for (int i = 0; i < streamSize; i++) {
                    this.streamModel.addRow(new Object[]{rf.getStream().get(i), rf.getStream().get(i)});
                }

                String measuresNames[] = measures.getFirst().split(",");
                for (String measuresName : measuresNames) {
                    jComboBoxXColumn.addItem(measuresName);
                    jComboBoxYColumn.addItem(measuresName);
                    jComboBoxXColumnGnuP.addItem(measuresName);
                    jComboBoxYColumnGnuP.addItem(measuresName);
                    if (measuresName.equals("learning evaluation instances") == true) {
                        jComboBoxXColumn.setSelectedItem(measuresName);
                        jComboBoxXColumnGnuP.setSelectedItem(measuresName);
                    }
                    if (measuresName.equals("classifications correct (percent)") == true
                            || measuresName.equals("[avg] classifications correct (percent)") == true) {
                        jComboBoxYColumn.setSelectedItem(measuresName);
                        jComboBoxYColumnGnuP.setSelectedItem(measuresName);
                    }

                }
            } else {

                JOptionPane.showMessageDialog(this, str,
                        "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    }
756185
private void colorChooserGridColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_colorChooserGridColorActionPerformed
    if (this.colorChooserGridColor.isLastOkPressed() && changeNotificationAllowed) {
      this.controller.changed();
    }
  }
567366
private void pbOpenActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_pbOpenActionPerformed
    {//GEN-HEADEREND:event_pbOpenActionPerformed
        // Add your handling code here:
      pbTestActionPerformed(evt);
      if (theConnection != null)
      {
          synchronized(Main.getProperties())
          {
              int i = 0;
              while (Main.getProperties().getProperty(Main.PROPERTY_JDBCDRIVER + i) != null)
              {
                  Main.getProperties().remove(Main.PROPERTY_JDBCDRIVER + i);
                  i++;
              }
              while (Main.getProperties().getProperty(Main.PROPERTY_JDBCURL + i) != null)
              {
                  Main.getProperties().remove(Main.PROPERTY_JDBCURL + i);
                  i++;
              }
              for (i = 0; i < cmbJDBCDriver.getModel().getSize(); i++)
                  Main.getProperties().setProperty(Main.PROPERTY_JDBCDRIVER + i, cmbJDBCDriver.getModel().getElementAt(i).toString());
              for (i = 0; i < cmbJDBCURL.getModel().getSize(); i++)
                  Main.getProperties().setProperty(Main.PROPERTY_JDBCURL + i, cmbJDBCURL.getModel().getElementAt(i).toString());
              Main.getProperties().setProperty(Main.PROPERTY_JDBCUSER, tfUsername.getText());
              Main.getProperties().storeProperties("");
          }
          dispose();        
      }
    }
1025198
private void buttonEditLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEditLineActionPerformed
    this.tableExtensions.editCellAt(this.tableExtensions.getSelectedRow(), 0);
  }