GEN-LAST:event_buttonFontActionPerformed
435099
private void buttonAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAboutActionPerformed
    NbUtils.plainMessageOk(null, java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("MMDCfgPanel.buttonAbout.Text"), new AboutPanel());
  }
650065
private void jButtonDelStreamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDelStreamActionPerformed
        this.streamModel.removeRow(this.jTableStreams.getSelectedRow());
    }
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);
    }
28163
private void runBatchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runBatchButtonActionPerformed
        // Perform batch encoding
        String thisData = "";
        String extension;
        String fullFileName;
        String outputCount;
        int inputCount = 0;
        String errorLog;
        String progressLog = "";
        int i, k;
        int lineCount = 0;
        double percentage;
        int countLength, currentLength;

        errorLog = "Starting batch process..." + '\n';
        batchOutputArea.setText(errorLog);

        switch(outFormatCombo.getSelectedIndex()) {
            case 0:
                extension = ".png";
                break;
            case 1:
                extension = ".jpg";
                break;
            case 2:
                extension = ".gif";
                break;
            case 3:
                extension = ".bmp";
                break;
            case 4:
                extension = ".svg";
                break;
            case 5:
            default:
                extension = ".eps";
                break;
        }

        for(i = 0; i < sequenceArea.getText().length(); i++) {
            if (sequenceArea.getText().charAt(i) == '\n') {
                inputCount++;
            }
        }

        countLength = Integer.toString(inputCount + 1).length();

        for(i = 0; i < sequenceArea.getText().length(); i++) {
            if (sequenceArea.getText().charAt(i) == '\n') {
                currentLength = Integer.toString(lineCount + 1).length();
                outputCount = "";
                for (k = 0; k < (countLength - currentLength); k++) {
                    // Add leading zeroes to file name
                    outputCount += "0";
                }
                outputCount += Integer.toString(lineCount + 1);
                if (!thisData.equals("")) {
                    if (outFilenameCombo.getSelectedIndex() == 0) {
                        fullFileName = folderField.getText() + prefixField.getText()
                            + osFriendly(thisData) + extension;
                    } else {
                        fullFileName = folderField.getText()
                                + prefixField.getText() + outputCount + extension;
                    }
                    File file = new File(fullFileName);
                    SaveSymbol saveSymbol = new SaveSymbol();

                    saveSymbol.removeAll();

                    saveSymbol.setSize(saveSymbol.getPreferredSize());
                    saveSymbol.setBorder(BorderFactory.createEmptyBorder());
                    saveSymbol.setBackground(paperColour);
                    try {
                        SaveImage saveImage = new SaveImage();
                        if (errorLabel.getText().isEmpty()) {
                            saveImage.save(file, saveSymbol);
                        } else {
                            errorLog += errorLabel.getText() + " at line " + (lineCount + 1) + '\n';
                        }
                    } catch (IOException e) {
                        errorLog += "I/O exception writing to " + fullFileName
                                + " at line " + (lineCount + 1) + ": " + e.getMessage() + '\n';
                    }
                }
                lineCount++;
                percentage = (double)(lineCount) / (double)(inputCount);
                percentage *= 100;
                progressLog = "Completed line " + lineCount + " of "
                        + inputCount + " (" + (int)(percentage) + "% done)";
                batchOutputArea.setText(errorLog + progressLog);
                thisData = "";
            } else {
                char currentChar = sequenceArea.getText().charAt(i);

                if ((currentChar != 0x0D) && (currentChar != 0x0A)) {
                    thisData += sequenceArea.getText().charAt(i);
                }
            }
        }
        progressLog += '\n' + "Finished!";
        batchOutputArea.setText(errorLog + progressLog);
    }
890601
private void resetButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetButtonActionPerformed
        properties = new Hashtable<String,Object>();
        lookAndFeelComboBox.setSelectedItem(this.getDefaultText());
        sizeComboBox.setSelectedItem(this.getDefaultText());
        fontComboBox.setSelectedItem(this.getDefaultText());
        themeComboBox.setSelectedItem(this.getDefaultText());

        ScreenUtil.updateLookAndFeel(this, null, properties);
        this.setSampleStyle();
    }
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);
    }
446522
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
        // Exit dialogue and send content to main window
        OkapiUI.dataInputField.setText(dataInputArea.getText());
        dispose();
    }
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);
        }
    }
645748
private void buttonExpandAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExpandAllActionPerformed
    Utils.foldUnfoldTree(this.treeMindMap, true);
  }
687146
private void _updateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__updateActionPerformed
        jTextPane1.setText("");
        String text = new String(buffer, 0, pos);
        String[] lines = text.split("\n");

        Style style = jTextPane1.getStyle("INFO");
        for (String line : lines) {
            if (line.startsWith("o ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("OUTPUT");
            } else if (line.startsWith("i ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("INFO");
            } else if (line.startsWith("w ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("WARN");
            } else if (line.startsWith("e ")) {
                line = line.substring(2);
                style = jTextPane1.getStyle("ERROR");
            }

            try {
                jTextPane1.getDocument().insertString(jTextPane1.getDocument().getLength(), line + "\n", style);
                jTextPane1.setCaretPosition(jTextPane1.getDocument().getLength());
            } catch (Exception e) {
                 Log.Err.println(e.getMessage());
            }
        }
    }
1321615
private void jButtonResultsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonResultsActionPerformed
        BaseDirectoryChooser resultsFile = new BaseDirectoryChooser();
        //resultsFile.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        int selection = resultsFile.showOpenDialog(this);
        if (selection == JFileChooser.APPROVE_OPTION) {
            path = resultsFile.getSelectedFile().getAbsolutePath();
        }

        if (!path.equals("")) {
            reset();
            this.jTextFieldResultsPath.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) {
                    jComboBoxMeasure.addItem(measuresName);
                    if (measuresName.equals("classifications correct (percent)") == true
                            || measuresName.equals("[avg] classifications correct (percent)") == true) {
                        jComboBoxMeasure.setSelectedItem(measuresName);
                    }

                }
            } else {

                JOptionPane.showMessageDialog(this, str,
                        "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    }
1184388
private void cmdSelectAllActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_cmdSelectAllActionPerformed
		mappingList.setSelectionInterval(0, mappingList.getModel().getSize());
	}
1146846
private void buttonAddLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAddLineActionPerformed
    ((DefaultTableModel)this.tableExtensions.getModel()).addRow(new String[]{""});
  }
547711
private void buttonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSaveActionPerformed
    final File home = new File(System.getProperty("user.home")); //NOI18N
    final File toSave = new FileChooserBuilder("user-home-dir").
        setTitle(java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonSaveActionPerformed.saveTitle")).
        addFileFilter(TEXT_FILE_FILTER).setFileFilter(TEXT_FILE_FILTER).
        setFilesOnly(true).
        setDefaultWorkingDirectory(home).
        showSaveDialog();
    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
        NbUtils.msgError(null, java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle").getString("PlainTextEditor.buttonSaveActionPerformed.msgError"));
      }
    }
  }
547256
private void chkSameAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkSameAsActionPerformed
        preference.put(OntopOBDASettings.SAME_AS, String.valueOf(chkSameAs.isSelected()));

    }
442358
private void buttonZoomOutXActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonZoomOutXActionPerformed
        graphCanvas.scaleXResolution(true);
        graphCanvas.updateCanvas(true);
    }
954979
private void menuGoToFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuGoToFileActionPerformed
    final GoToFilePanel panel = new GoToFilePanel(this.explorerTree, JOptionPane.OK_OPTION);
    if (DialogProviderManager.getInstance().getDialogProvider().msgOkCancel(null, "Go To File", panel)) {
      final NodeFileOrFolder selected = panel.getSelected();
      if (selected != null) {
        final File file = selected.makeFileForNode();
        if (file != null) {
          this.focusInTree(file);
          ensureTreePanelVisible();
          SwingUtilities.invokeLater(() -> {
            explorerTree.requestFocus();
          });
        }
      }
    }
  }