Search in sources :

Example 1 with RenderQuality

use of com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality in project netbeans-mmd-plugin by raydac.

the class PreferencesPanel method initComponents.

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    jScrollPane1 = new javax.swing.JScrollPane();
    jPanel6 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    spinnerConnectorWidth = new javax.swing.JSpinner();
    jLabel5 = new javax.swing.JLabel();
    spinnerCollapsatorSize = new javax.swing.JSpinner();
    jLabel6 = new javax.swing.JLabel();
    spinnerCollapsatorWidth = new javax.swing.JSpinner();
    jLabel7 = new javax.swing.JLabel();
    spinnerJumpLinkWidth = new javax.swing.JSpinner();
    jPanel15 = new javax.swing.JPanel();
    colorChooserCollapsatorBackground = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooserCollapsatorBorder = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooserJumpLink = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooserConnectorColor = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    jPanel4 = new javax.swing.JPanel();
    colorChooserPaperColor = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    checkBoxShowGrid = new javax.swing.JCheckBox();
    colorChooserGridColor = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    spinnerGridStep = new javax.swing.JSpinner();
    jLabel1 = new javax.swing.JLabel();
    jPanel13 = new javax.swing.JPanel();
    comboBoxRenderQuality = new javax.swing.JComboBox<>();
    jPanel2 = new javax.swing.JPanel();
    colorChooserRootBackground = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooserRootText = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooser1stBackground = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooser1stText = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooser2ndBackground = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    colorChooser2ndText = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    slider1stLevelHorzGap = new javax.swing.JSlider();
    slider1stLevelVertGap = new javax.swing.JSlider();
    slider2ndLevelHorzGap = new javax.swing.JSlider();
    slider2ndLevelVertGap = new javax.swing.JSlider();
    jPanel5 = new javax.swing.JPanel();
    colorChooserSelectLine = new com.igormaznitsa.sciareto.ui.misc.ColorChooserButton();
    jLabel3 = new javax.swing.JLabel();
    spinnerSelectLineWidth = new javax.swing.JSpinner();
    jLabel4 = new javax.swing.JLabel();
    spinnerSelectLineGap = new javax.swing.JSpinner();
    filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
    jPanel10 = new javax.swing.JPanel();
    buttonFontForEditor = new javax.swing.JButton();
    jPanel11 = new javax.swing.JPanel();
    checkBoxDropShadow = new javax.swing.JCheckBox();
    jPanel12 = new javax.swing.JPanel();
    spinnerElementBorderWidth = new javax.swing.JSpinner();
    labelBorderWidth = new javax.swing.JLabel();
    filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
    jPanel14 = new javax.swing.JPanel();
    textFieldPathToGraphvizDot = new javax.swing.JTextField();
    buttonGraphvizDotFile = new javax.swing.JButton();
    filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
    jPanel1 = new javax.swing.JPanel();
    checkboxUseInsideBrowser = new javax.swing.JCheckBox();
    checkboxRelativePathsForFilesInTheProject = new javax.swing.JCheckBox();
    checkBoxUnfoldCollapsedTarget = new javax.swing.JCheckBox();
    checkBoxCopyColorInfoToNewAllowed = new javax.swing.JCheckBox();
    checkBoxKnowledgeFolderAutogenerationAllowed = new javax.swing.JCheckBox();
    jPanel7 = new javax.swing.JPanel();
    buttonFont = new javax.swing.JButton();
    jPanel8 = new javax.swing.JPanel();
    buttonOpenShortcutEditor = new javax.swing.JButton();
    panelScalingModifiers = new javax.swing.JPanel();
    checkBoxScalingCTRL = new javax.swing.JCheckBox();
    checkBoxScalingALT = new javax.swing.JCheckBox();
    checkBoxScalingSHIFT = new javax.swing.JCheckBox();
    checkBoxScalingMETA = new javax.swing.JCheckBox();
    checkboxMetricsAllowed = new javax.swing.JCheckBox();
    checkboxTrimTopicText = new javax.swing.JCheckBox();
    checkBoxShowHiddenFiles = new javax.swing.JCheckBox();
    jPanel9 = new javax.swing.JPanel();
    buttonAbout = new javax.swing.JButton();
    donateButton1 = new com.igormaznitsa.sciareto.ui.misc.DonateButton();
    filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
    buttonResetToDefault = new javax.swing.JButton();
    filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 16), new java.awt.Dimension(0, 16), new java.awt.Dimension(32767, 16));
    buttonExportToFile = new javax.swing.JButton();
    buttonImportFromFile = new javax.swing.JButton();
    setLayout(new java.awt.BorderLayout());
    jPanel6.setLayout(new java.awt.GridBagLayout());
    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Connector and collapsator options"));
    jPanel3.setLayout(new java.awt.GridBagLayout());
    jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel2.setText("Collapsator width:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel3.add(jLabel2, gridBagConstraints);
    spinnerConnectorWidth.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(0.1f), Float.valueOf(0.05f), Float.valueOf(20.0f), Float.valueOf(0.01f)));
    spinnerConnectorWidth.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerConnectorWidthStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 80;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    jPanel3.add(spinnerConnectorWidth, gridBagConstraints);
    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel5.setText("Collapsator size:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel3.add(jLabel5, gridBagConstraints);
    spinnerCollapsatorSize.setModel(new javax.swing.SpinnerNumberModel(5, 3, 500, 1));
    spinnerCollapsatorSize.setMinimumSize(new java.awt.Dimension(80, 0));
    spinnerCollapsatorSize.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerCollapsatorSizeStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    jPanel3.add(spinnerCollapsatorSize, gridBagConstraints);
    jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel6.setText("Collapsator width:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel3.add(jLabel6, gridBagConstraints);
    spinnerCollapsatorWidth.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), Float.valueOf(0.01f), Float.valueOf(100.0f), Float.valueOf(0.1f)));
    spinnerCollapsatorWidth.setMinimumSize(new java.awt.Dimension(80, 0));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    jPanel3.add(spinnerCollapsatorWidth, gridBagConstraints);
    jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel7.setText("Jump link width:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel3.add(jLabel7, gridBagConstraints);
    spinnerJumpLinkWidth.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(0.1f), Float.valueOf(0.05f), Float.valueOf(20.0f), Float.valueOf(0.01f)));
    spinnerJumpLinkWidth.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerJumpLinkWidthStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 80;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
    jPanel3.add(spinnerJumpLinkWidth, gridBagConstraints);
    jPanel15.setLayout(new java.awt.GridLayout(2, 2));
    colorChooserCollapsatorBackground.setText("Collapsator fill");
    colorChooserCollapsatorBackground.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserCollapsatorBackground.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserCollapsatorBackgroundActionPerformed(evt);
        }
    });
    jPanel15.add(colorChooserCollapsatorBackground);
    colorChooserCollapsatorBorder.setText("Collapsator border");
    colorChooserCollapsatorBorder.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserCollapsatorBorder.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserCollapsatorBorderActionPerformed(evt);
        }
    });
    jPanel15.add(colorChooserCollapsatorBorder);
    colorChooserJumpLink.setText("Jump link");
    colorChooserJumpLink.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserJumpLink.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserJumpLinkActionPerformed(evt);
        }
    });
    jPanel15.add(colorChooserJumpLink);
    colorChooserConnectorColor.setText("Connector color");
    colorChooserConnectorColor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserConnectorColor.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserConnectorColorActionPerformed(evt);
        }
    });
    jPanel15.add(colorChooserConnectorColor);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1000.0;
    jPanel3.add(jPanel15, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel6.add(jPanel3, gridBagConstraints);
    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Paper options"));
    jPanel4.setLayout(new java.awt.GridBagLayout());
    colorChooserPaperColor.setText("Background fill");
    colorChooserPaperColor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserPaperColor.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserPaperColorActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    jPanel4.add(colorChooserPaperColor, gridBagConstraints);
    checkBoxShowGrid.setText("Show grid");
    checkBoxShowGrid.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxShowGridActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.ipady = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel4.add(checkBoxShowGrid, gridBagConstraints);
    colorChooserGridColor.setText("Grid color");
    colorChooserGridColor.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserGridColor.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserGridColorActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    jPanel4.add(colorChooserGridColor, gridBagConstraints);
    spinnerGridStep.setModel(new javax.swing.SpinnerNumberModel(15, 2, 500, 1));
    spinnerGridStep.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerGridStepStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    jPanel4.add(spinnerGridStep, gridBagConstraints);
    jLabel1.setText("Grid step: ");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.ipady = 5;
    jPanel4.add(jLabel1, gridBagConstraints);
    jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Render quality"));
    jPanel13.setLayout(new java.awt.BorderLayout());
    comboBoxRenderQuality.setModel(new DefaultComboBoxModel<RenderQuality>(RenderQuality.values()));
    comboBoxRenderQuality.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            comboBoxRenderQualityActionPerformed(evt);
        }
    });
    jPanel13.add(comboBoxRenderQuality, java.awt.BorderLayout.NORTH);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.gridwidth = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1000.0;
    jPanel4.add(jPanel13, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipadx = 73;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel6.add(jPanel4, gridBagConstraints);
    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Element options"));
    jPanel2.setLayout(new java.awt.GridBagLayout());
    colorChooserRootBackground.setText("Root fill");
    colorChooserRootBackground.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserRootBackground.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserRootBackgroundActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(colorChooserRootBackground, gridBagConstraints);
    colorChooserRootText.setText("Root text");
    colorChooserRootText.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserRootText.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserRootTextActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(colorChooserRootText, gridBagConstraints);
    colorChooser1stBackground.setText("1st level fill");
    colorChooser1stBackground.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooser1stBackground.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooser1stBackgroundActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(colorChooser1stBackground, gridBagConstraints);
    colorChooser1stText.setText("1st level text");
    colorChooser1stText.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooser1stText.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooser1stTextActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(colorChooser1stText, gridBagConstraints);
    colorChooser2ndBackground.setText("2nd level fill");
    colorChooser2ndBackground.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooser2ndBackground.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooser2ndBackgroundActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(colorChooser2ndBackground, gridBagConstraints);
    colorChooser2ndText.setText("2nd level text");
    colorChooser2ndText.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooser2ndText.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooser2ndTextActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(colorChooser2ndText, gridBagConstraints);
    slider1stLevelHorzGap.setMajorTickSpacing(30);
    slider1stLevelHorzGap.setMaximum(250);
    slider1stLevelHorzGap.setMinimum(10);
    slider1stLevelHorzGap.setPaintLabels(true);
    slider1stLevelHorzGap.setPaintTicks(true);
    slider1stLevelHorzGap.setBorder(javax.swing.BorderFactory.createTitledBorder("1st level horz.gap"));
    slider1stLevelHorzGap.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            slider1stLevelHorzGapStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(slider1stLevelHorzGap, gridBagConstraints);
    slider1stLevelVertGap.setMajorTickSpacing(30);
    slider1stLevelVertGap.setMaximum(250);
    slider1stLevelVertGap.setMinimum(10);
    slider1stLevelVertGap.setPaintLabels(true);
    slider1stLevelVertGap.setPaintTicks(true);
    slider1stLevelVertGap.setBorder(javax.swing.BorderFactory.createTitledBorder("1st level vert.gap"));
    slider1stLevelVertGap.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            slider1stLevelVertGapStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(slider1stLevelVertGap, gridBagConstraints);
    slider2ndLevelHorzGap.setMajorTickSpacing(30);
    slider2ndLevelHorzGap.setMaximum(250);
    slider2ndLevelHorzGap.setMinimum(10);
    slider2ndLevelHorzGap.setPaintLabels(true);
    slider2ndLevelHorzGap.setPaintTicks(true);
    slider2ndLevelHorzGap.setBorder(javax.swing.BorderFactory.createTitledBorder("2nd level horz.gap"));
    slider2ndLevelHorzGap.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            slider2ndLevelHorzGapStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(slider2ndLevelHorzGap, gridBagConstraints);
    slider2ndLevelVertGap.setMajorTickSpacing(30);
    slider2ndLevelVertGap.setMaximum(250);
    slider2ndLevelVertGap.setMinimum(10);
    slider2ndLevelVertGap.setPaintLabels(true);
    slider2ndLevelVertGap.setPaintTicks(true);
    slider2ndLevelVertGap.setBorder(javax.swing.BorderFactory.createTitledBorder("2nd level vert.gap"));
    slider2ndLevelVertGap.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            slider2ndLevelVertGapStateChanged(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel2.add(slider2ndLevelVertGap, gridBagConstraints);
    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Selection frame"));
    jPanel5.setLayout(new java.awt.GridBagLayout());
    colorChooserSelectLine.setText("Select frame color");
    colorChooserSelectLine.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    colorChooserSelectLine.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorChooserSelectLineActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);
    jPanel5.add(colorChooserSelectLine, gridBagConstraints);
    jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel3.setText("Selection frame width:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.ipady = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel5.add(jLabel3, gridBagConstraints);
    spinnerSelectLineWidth.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), Float.valueOf(0.02f), Float.valueOf(100.0f), Float.valueOf(0.1f)));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel5.add(spinnerSelectLineWidth, gridBagConstraints);
    jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel4.setText("Selection frame gap:");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel5.add(jLabel4, gridBagConstraints);
    spinnerSelectLineGap.setModel(new javax.swing.SpinnerNumberModel(1, 1, 500, 1));
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel5.add(spinnerSelectLineGap, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel2.add(jPanel5, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.weighty = 1000.0;
    jPanel2.add(filler2, gridBagConstraints);
    jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Text editor font"));
    jPanel10.setLayout(new java.awt.BorderLayout());
    buttonFontForEditor.setText("...");
    buttonFontForEditor.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonFontForEditorActionPerformed(evt);
        }
    });
    jPanel10.add(buttonFontForEditor, java.awt.BorderLayout.CENTER);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    jPanel2.add(jPanel10, gridBagConstraints);
    jPanel11.setLayout(new java.awt.BorderLayout());
    checkBoxDropShadow.setText("Drop shadow");
    checkBoxDropShadow.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxDropShadowActionPerformed(evt);
        }
    });
    jPanel11.add(checkBoxDropShadow, java.awt.BorderLayout.CENTER);
    jPanel12.setLayout(new java.awt.BorderLayout());
    spinnerElementBorderWidth.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(0.5f), Float.valueOf(0.05f), Float.valueOf(50.0f), Float.valueOf(0.1f)));
    spinnerElementBorderWidth.addChangeListener(new javax.swing.event.ChangeListener() {

        public void stateChanged(javax.swing.event.ChangeEvent evt) {
            spinnerElementBorderWidthStateChanged(evt);
        }
    });
    jPanel12.add(spinnerElementBorderWidth, java.awt.BorderLayout.CENTER);
    labelBorderWidth.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    labelBorderWidth.setText("Border width:");
    jPanel12.add(labelBorderWidth, java.awt.BorderLayout.WEST);
    jPanel11.add(jPanel12, java.awt.BorderLayout.EAST);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(0, 0, 8, 0);
    jPanel2.add(jPanel11, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weighty = 1000.0;
    jPanel2.add(filler4, gridBagConstraints);
    jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder("Graphviz DOT file (for PlantUML)"));
    jPanel14.setLayout(new java.awt.GridBagLayout());
    textFieldPathToGraphvizDot.setColumns(3);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.weightx = 1000.0;
    jPanel14.add(textFieldPathToGraphvizDot, gridBagConstraints);
    buttonGraphvizDotFile.setText("...");
    buttonGraphvizDotFile.setToolTipText("select file");
    buttonGraphvizDotFile.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonGraphvizDotFileActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    jPanel14.add(buttonGraphvizDotFile, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel2.add(jPanel14, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 12;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weighty = 1000.0;
    jPanel2.add(filler5, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel6.add(jPanel2, gridBagConstraints);
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Misc"));
    jPanel1.setLayout(new java.awt.GridBagLayout());
    // NOI18N
    checkboxUseInsideBrowser.setText("Prefer internal browser to open URL");
    checkboxUseInsideBrowser.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkboxUseInsideBrowserActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkboxUseInsideBrowser, gridBagConstraints);
    // NOI18N
    checkboxRelativePathsForFilesInTheProject.setText("Use relative paths for project files");
    checkboxRelativePathsForFilesInTheProject.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkboxRelativePathsForFilesInTheProjectActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkboxRelativePathsForFilesInTheProject, gridBagConstraints);
    checkBoxUnfoldCollapsedTarget.setText("Unfold collapsed drop target");
    checkBoxUnfoldCollapsedTarget.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxUnfoldCollapsedTargetActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkBoxUnfoldCollapsedTarget, gridBagConstraints);
    checkBoxCopyColorInfoToNewAllowed.setText("Copy parent color info to new child");
    checkBoxCopyColorInfoToNewAllowed.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxCopyColorInfoToNewAllowedActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkBoxCopyColorInfoToNewAllowed, gridBagConstraints);
    checkBoxKnowledgeFolderAutogenerationAllowed.setText("Enable autocreation .projectKnowledge folder");
    checkBoxKnowledgeFolderAutogenerationAllowed.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxKnowledgeFolderAutogenerationAllowedActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkBoxKnowledgeFolderAutogenerationAllowed, gridBagConstraints);
    jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Mind map topic text font"));
    jPanel7.setLayout(new java.awt.BorderLayout());
    // NOI18N
    buttonFont.setText("...");
    buttonFont.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonFontActionPerformed(evt);
        }
    });
    jPanel7.add(buttonFont, java.awt.BorderLayout.CENTER);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 8;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1000.0;
    jPanel1.add(jPanel7, gridBagConstraints);
    // NOI18N
    java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("com/igormaznitsa/nbmindmap/i18n/Bundle");
    // NOI18N
    jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("MMDCfgPanel.ShortCutsTitle")));
    jPanel8.setLayout(new java.awt.BorderLayout());
    // NOI18N
    buttonOpenShortcutEditor.setText(bundle.getString("MMDCfgPanel.ShortCutsButtonText"));
    buttonOpenShortcutEditor.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonOpenShortcutEditorActionPerformed(evt);
        }
    });
    jPanel8.add(buttonOpenShortcutEditor, java.awt.BorderLayout.NORTH);
    panelScalingModifiers.setBorder(javax.swing.BorderFactory.createTitledBorder("Activator to scale with wheel"));
    panelScalingModifiers.setLayout(new java.awt.GridLayout(1, 0));
    // NOI18N
    checkBoxScalingCTRL.setText("CTRL");
    checkBoxScalingCTRL.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxScalingCTRLActionPerformed(evt);
        }
    });
    panelScalingModifiers.add(checkBoxScalingCTRL);
    // NOI18N
    checkBoxScalingALT.setText("ALT");
    checkBoxScalingALT.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxScalingALTActionPerformed(evt);
        }
    });
    panelScalingModifiers.add(checkBoxScalingALT);
    // NOI18N
    checkBoxScalingSHIFT.setText("SHIFT");
    checkBoxScalingSHIFT.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxScalingSHIFTActionPerformed(evt);
        }
    });
    panelScalingModifiers.add(checkBoxScalingSHIFT);
    // NOI18N
    checkBoxScalingMETA.setText("META");
    checkBoxScalingMETA.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxScalingMETAActionPerformed(evt);
        }
    });
    panelScalingModifiers.add(checkBoxScalingMETA);
    jPanel8.add(panelScalingModifiers, java.awt.BorderLayout.SOUTH);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel1.add(jPanel8, gridBagConstraints);
    checkboxMetricsAllowed.setText("Enable metrics upload");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkboxMetricsAllowed, gridBagConstraints);
    // NOI18N
    checkboxTrimTopicText.setText("Trim topic text before set");
    checkboxTrimTopicText.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkboxTrimTopicTextActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkboxTrimTopicText, gridBagConstraints);
    checkBoxShowHiddenFiles.setText("Show hidden files (needs folder reload)");
    checkBoxShowHiddenFiles.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkBoxShowHiddenFilesActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel1.add(checkBoxShowHiddenFiles, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel6.add(jPanel1, gridBagConstraints);
    jPanel9.setLayout(new java.awt.GridBagLayout());
    // NOI18N
    buttonAbout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/info16.png")));
    // NOI18N
    buttonAbout.setText("About");
    buttonAbout.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonAboutActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel9.add(buttonAbout, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
    jPanel9.add(donateButton1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.weighty = 1000.0;
    jPanel9.add(filler1, gridBagConstraints);
    // NOI18N
    buttonResetToDefault.setIcon(new javax.swing.ImageIcon(getClass().getResource("/menu_icons/stop.png")));
    buttonResetToDefault.setText("Reset to default");
    buttonResetToDefault.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonResetToDefaultActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    jPanel9.add(buttonResetToDefault, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    jPanel9.add(filler3, gridBagConstraints);
    // NOI18N
    buttonExportToFile.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/document_export16.png")));
    buttonExportToFile.setText("Export to File");
    buttonExportToFile.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonExportToFileActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel9.add(buttonExportToFile, gridBagConstraints);
    // NOI18N
    buttonImportFromFile.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/document_import16.png")));
    buttonImportFromFile.setText("Import from File");
    buttonImportFromFile.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buttonImportFromFileActionPerformed(evt);
        }
    });
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    jPanel9.add(buttonImportFromFile, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 4;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    gridBagConstraints.insets = new java.awt.Insets(16, 5, 0, 5);
    jPanel6.add(jPanel9, gridBagConstraints);
    jScrollPane1.setViewportView(jPanel6);
    add(jScrollPane1, java.awt.BorderLayout.LINE_END);
}
Also used : JButton(javax.swing.JButton) RenderQuality(com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality)

Example 2 with RenderQuality

use of com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality in project netbeans-mmd-plugin by raydac.

the class MindMapPanelConfig method saveTo.

@Nullable
@ReturnsOriginal
public Preferences saveTo(@Nullable final Preferences prefs) {
    if (prefs != null) {
        final String prefix = MindMapPanelConfig.class.getSimpleName();
        for (final Field f : MindMapPanelConfig.class.getDeclaredFields()) {
            if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT | Modifier.FINAL)) != 0) {
                continue;
            }
            final Class<?> fieldClass = f.getType();
            final String fieldName = prefix + '.' + f.getName();
            try {
                if (fieldClass == boolean.class) {
                    prefs.putBoolean(fieldName, f.getBoolean(this));
                } else if (fieldClass == int.class) {
                    prefs.putInt(fieldName, f.getInt(this));
                } else if (fieldClass == float.class) {
                    prefs.putFloat(fieldName, f.getFloat(this));
                } else if (fieldClass == double.class) {
                    prefs.putDouble(fieldName, f.getDouble(this));
                } else if (fieldClass == Font.class) {
                    final Font theFont = (Font) f.get(this);
                    prefs.put(fieldName + ".name", theFont.getName());
                    prefs.putInt(fieldName + ".size", theFont.getSize());
                    prefs.putInt(fieldName + ".style", theFont.getStyle());
                } else if (fieldClass == Color.class) {
                    prefs.putInt(fieldName, ((Color) f.get(this)).getRGB());
                } else if (fieldClass == String.class) {
                    prefs.put(fieldName, (String) f.get(this));
                } else if (fieldClass == RenderQuality.class) {
                    prefs.put(fieldName, ((RenderQuality) f.get(this)).name());
                } else {
                    throw new Error("Unexpected field type " + fieldClass.getName());
                }
            } catch (IllegalAccessException ex) {
                throw new Error("IllegalAccessException [" + fieldClass.getName() + ']', ex);
            } catch (IllegalArgumentException ex) {
                throw new Error("IllegalArgumentException [" + fieldClass.getName() + ']', ex);
            }
        }
        for (final Map.Entry<String, KeyShortcut> e : this.mapShortCut.entrySet()) {
            prefs.put("mapShortCut." + e.getValue().getID(), e.getValue().packToString());
        }
    }
    return prefs;
}
Also used : Field(java.lang.reflect.Field) Color(java.awt.Color) KeyShortcut(com.igormaznitsa.mindmap.swing.panel.utils.KeyShortcut) RenderQuality(com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality) HashMap(java.util.HashMap) Map(java.util.Map) Font(java.awt.Font) ReturnsOriginal(com.igormaznitsa.meta.annotation.ReturnsOriginal) Nullable(javax.annotation.Nullable)

Example 3 with RenderQuality

use of com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality in project netbeans-mmd-plugin by raydac.

the class MindMapPanelConfig method loadFrom.

@Nullable
public Preferences loadFrom(@Nullable final Preferences prefs) {
    if (prefs != null) {
        final String prefix = MindMapPanelConfig.class.getSimpleName();
        final MindMapPanelConfig etalon = new MindMapPanelConfig();
        for (final Field f : MindMapPanelConfig.class.getDeclaredFields()) {
            if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT | Modifier.FINAL)) != 0) {
                continue;
            }
            final Class<?> fieldClass = f.getType();
            final String fieldName = prefix + '.' + f.getName();
            try {
                if (fieldClass == boolean.class) {
                    f.setBoolean(this, prefs.getBoolean(fieldName, f.getBoolean(etalon)));
                } else if (fieldClass == int.class) {
                    f.setInt(this, prefs.getInt(fieldName, f.getInt(etalon)));
                } else if (fieldClass == float.class) {
                    f.setFloat(this, prefs.getFloat(fieldName, f.getFloat(etalon)));
                } else if (fieldClass == double.class) {
                    f.setDouble(this, prefs.getDouble(fieldName, f.getDouble(etalon)));
                } else if (fieldClass == Font.class) {
                    final Font etalonFont = etalon.getFont();
                    final String fontName = prefs.get(fieldName + ".name", etalonFont.getName());
                    final int fontSize = prefs.getInt(fieldName + ".size", etalonFont.getSize());
                    final int fontStyle = prefs.getInt(fieldName + ".style", etalonFont.getStyle());
                    f.set(this, new Font(fontName, fontStyle, fontSize));
                } else if (fieldClass == Color.class) {
                    final int argb = prefs.getInt(fieldName, ((Color) f.get(etalon)).getRGB());
                    f.set(this, new Color(argb, true));
                } else if (fieldClass == String.class) {
                    f.set(this, prefs.get(fieldName, (String) f.get(etalon)));
                } else if (fieldClass == RenderQuality.class) {
                    final String name = prefs.get(fieldName, ((RenderQuality) f.get(etalon)).name());
                    f.set(this, RenderQuality.valueOf(name));
                } else {
                    throw new Error("Unexpected field type " + fieldClass.getName());
                }
            } catch (IllegalAccessException ex) {
                throw new Error("IllegalAccessException [" + fieldClass.getName() + ']', ex);
            } catch (IllegalArgumentException ex) {
                throw new Error("IllegalArgumentException [" + fieldClass.getName() + ']', ex);
            }
        }
        this.mapShortCut.clear();
        this.mapShortCut.putAll(etalon.mapShortCut);
        try {
            for (final String k : prefs.keys()) {
                if (k.startsWith("mapShortCut.")) {
                    // final int dotIndex = k.indexOf('.');
                    // final String id = k.substring(dotIndex + 1);
                    final String packedValue = prefs.get(k, "");
                    if (packedValue.isEmpty()) {
                        throw new Error("Unexpected situation, short cut value is empty [" + k + ']');
                    }
                    final KeyShortcut unpacked = new KeyShortcut(packedValue);
                    this.mapShortCut.put(unpacked.getID(), unpacked);
                }
            }
        } catch (BackingStoreException ex) {
            throw new Error("Can't get list of keys from storage", ex);
        }
    }
    return prefs;
}
Also used : Color(java.awt.Color) KeyShortcut(com.igormaznitsa.mindmap.swing.panel.utils.KeyShortcut) BackingStoreException(java.util.prefs.BackingStoreException) Font(java.awt.Font) Field(java.lang.reflect.Field) RenderQuality(com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality) Nullable(javax.annotation.Nullable)

Example 4 with RenderQuality

use of com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality in project netbeans-mmd-plugin by raydac.

the class MindMapSettingsPanel method makeConfig.

public MindMapPanelConfig makeConfig() {
    final MindMapPanelConfig result = new MindMapPanelConfig(this.etalon, false);
    result.setPaperColor(this.colorButtonBackgroundColor.getValue());
    result.setGridColor(this.colorButtonGridColor.getValue());
    result.setCollapsatorBackgroundColor(this.colorButtonCollapsatorFill.getValue());
    result.setCollapsatorBorderColor(this.colorButtonCollapsatorBorder.getValue());
    result.setConnectorColor(this.colorButtonConnectorColor.getValue());
    result.setJumpLinkColor(this.colorButtonJumpLink.getValue());
    result.setSelectLineColor(this.colorButtonSelectFrameColor.getValue());
    result.setRootBackgroundColor(this.colorButtonRootFill.getValue());
    result.setRootTextColor(this.colorButtonRootText.getValue());
    result.setFirstLevelBackgroundColor(this.colorButton1stLevelFill.getValue());
    result.setFirstLevelTextColor(this.colorButton1stLevelText.getValue());
    result.setOtherLevelBackgroundColor(this.colorButton2ndLevelFill.getValue());
    result.setOtherLevelTextColor(this.colorButton2ndLevelText.getValue());
    result.setGridStep(getInt(this.spinnerGridStep));
    result.setConnectorWidth(getFloat(this.spinnerConnectorWidth));
    result.setCollapsatorSize(getInt(this.spinnerCollapsatorSize));
    result.setCollapsatorBorderWidth(getFloat(this.spinnerCollapsatorWidth));
    result.setJumpLinkWidth(getFloat(this.spinnerJumpLinkWidth));
    result.setSelectLineWidth(getFloat(this.spinnerSelectionFrameWidth));
    result.setSelectLineGap(getInt(this.spinnerSelectionFrameGap));
    result.setElementBorderWidth(getFloat(this.spinnerBorderWidth));
    result.setShowGrid(this.checkBoxShowGrid.isSelected());
    result.setDropShadow(this.checkBoxDropShadow.isSelected());
    result.setSmartTextPaste(this.checkBoxSmartTextPaste.isSelected());
    result.setFirstLevelHorizontalInset(this.slider1stLevelHorzGap.getValue());
    result.setFirstLevelVerticalInset(this.slider1stLevelVertGap.getValue());
    result.setOtherLevelHorizontalInset(this.slider2ndLevelHorzGap.getValue());
    result.setOtherLevelVerticalInset(this.slider2ndLevelVertGap.getValue());
    result.setRenderQuality(GetUtils.ensureNonNull((RenderQuality) comboBoxRenderQuality.getSelectedItem(), RenderQuality.DEFAULT));
    result.setFont(this.theFont);
    final int scaleModifier = (this.checkBoxScalingModifierALT.isSelected() ? KeyEvent.ALT_MASK : 0) | (this.checkBoxScalingModifierCTRL.isSelected() ? KeyEvent.CTRL_MASK : 0) | (this.checkBoxScalingModifierSHFT.isSelected() ? KeyEvent.SHIFT_MASK : 0) | (this.checkBoxScalingModifierMETA.isSelected() ? KeyEvent.META_MASK : 0);
    result.setScaleModifiers(scaleModifier);
    for (final Map.Entry<String, KeyShortcut> e : this.mapKeyShortCuts.entrySet()) {
        result.setKeyShortCut(e.getValue());
    }
    return result;
}
Also used : KeyShortcut(com.igormaznitsa.mindmap.swing.panel.utils.KeyShortcut) RenderQuality(com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality) Map(java.util.Map) TreeMap(java.util.TreeMap) MindMapPanelConfig(com.igormaznitsa.mindmap.swing.panel.MindMapPanelConfig)

Aggregations

RenderQuality (com.igormaznitsa.mindmap.swing.panel.utils.RenderQuality)4 KeyShortcut (com.igormaznitsa.mindmap.swing.panel.utils.KeyShortcut)3 Color (java.awt.Color)2 Font (java.awt.Font)2 Field (java.lang.reflect.Field)2 Map (java.util.Map)2 Nullable (javax.annotation.Nullable)2 ReturnsOriginal (com.igormaznitsa.meta.annotation.ReturnsOriginal)1 MindMapPanelConfig (com.igormaznitsa.mindmap.swing.panel.MindMapPanelConfig)1 HashMap (java.util.HashMap)1 TreeMap (java.util.TreeMap)1 BackingStoreException (java.util.prefs.BackingStoreException)1 JButton (javax.swing.JButton)1