Package org.gephi.ui.components

Examples of org.gephi.ui.components.JRangeSlider


            }
        });
        gradientPanel.add(gradientSlider, BorderLayout.CENTER);

        //Range
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        slider.setMinimum(0);
        slider.setMaximum(SLIDER_MAXIMUM);
        slider.setValue(0);
        slider.setUpperValue(SLIDER_MAXIMUM);
        slider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                JRangeSlider source = (JRangeSlider) e.getSource();
                if (!source.getValueIsAdjusting()) {
                    setRangeValues();
                }
                prepareGradientTooltip();
            }
        });
View Full Code Here


        sb.append(min+range*positions[positions.length-1]);
        gradientSlider.setToolTipText(sb.toString());
    }

    private void setRangeValues() {
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        float low = slider.getValue() / 100f;
        float high = slider.getUpperValue() / 100f;
        colorTransformer.setLowerBound(low);
        colorTransformer.setUpperBound(high);

        lowerBoundLabel.setText(ranking.unNormalize(colorTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(colorTransformer.getUpperBound()).toString());
View Full Code Here

        lowerBoundLabel.setText(ranking.unNormalize(colorTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(colorTransformer.getUpperBound()).toString());
    }

    private void refreshRangeValues() {
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        slider.setValue((int) (colorTransformer.getLowerBound() * 100f));
        slider.setUpperValue((int) (colorTransformer.getUpperBound() * 100f));

        lowerBoundLabel.setText(ranking.unNormalize(colorTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(colorTransformer.getUpperBound()).toString());
    }
View Full Code Here

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        labelColor = new javax.swing.JLabel();
        gradientPanel = new javax.swing.JPanel();
        rangeSlider = new JRangeSlider();
        labelRange = new javax.swing.JLabel();
        upperBoundLabel = new javax.swing.JLabel();
        lowerBoundLabel = new javax.swing.JLabel();

        setPreferredSize(new java.awt.Dimension(225, 114));
View Full Code Here

                NbPreferences.forModule(SizeTransformerPanel.class).putFloat(MAX_SIZE, (Float) maxSize.getValue());
            }
        });

        //Range
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        slider.setMinimum(0);
        slider.setMaximum(SLIDER_MAXIMUM);
        slider.setValue(0);
        slider.setUpperValue(SLIDER_MAXIMUM);
        slider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                JRangeSlider source = (JRangeSlider) e.getSource();
                if (!source.getValueIsAdjusting()) {
                    setRangeValues();
                }
            }
        });
        refreshRangeValues();
View Full Code Here

        });
        refreshRangeValues();
    }

    private void setRangeValues() {
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        float low = slider.getValue() / 100f;
        float high = slider.getUpperValue() / 100f;
        sizeTransformer.setLowerBound(low);
        sizeTransformer.setUpperBound(high);

        lowerBoundLabel.setText(ranking.unNormalize(sizeTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(sizeTransformer.getUpperBound()).toString());
View Full Code Here

        lowerBoundLabel.setText(ranking.unNormalize(sizeTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(sizeTransformer.getUpperBound()).toString());
    }

    private void refreshRangeValues() {
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        slider.setValue((int) (sizeTransformer.getLowerBound() * 100f));
        slider.setUpperValue((int) (sizeTransformer.getUpperBound() * 100f));

        lowerBoundLabel.setText(ranking.unNormalize(sizeTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(sizeTransformer.getUpperBound()).toString());
    }
View Full Code Here

        labelMinSize = new javax.swing.JLabel();
        minSize = new javax.swing.JSpinner();
        labelMaxSize = new javax.swing.JLabel();
        maxSize = new javax.swing.JSpinner();
        labelRange = new javax.swing.JLabel();
        rangeSlider = new JRangeSlider();
        upperBoundLabel = new javax.swing.JLabel();
        lowerBoundLabel = new javax.swing.JLabel();

        setPreferredSize(new java.awt.Dimension(225, 114));
View Full Code Here

            }
        });
        gradientPanel.add(gradientSlider, BorderLayout.CENTER);

        //Range
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        slider.setMinimum(0);
        slider.setMaximum(SLIDER_MAXIMUM);
        slider.setValue(0);
        slider.setUpperValue(SLIDER_MAXIMUM);
        slider.addChangeListener(new ChangeListener() {

            public void stateChanged(ChangeEvent e) {
                JRangeSlider source = (JRangeSlider) e.getSource();
                if (!source.getValueIsAdjusting()) {
                    setRangeValues();
                }
                prepareGradientTooltip();
            }
        });
View Full Code Here

        sb.append(min + range * positions[positions.length - 1]);
        gradientSlider.setToolTipText(sb.toString());
    }

    private void setRangeValues() {
        JRangeSlider slider = (JRangeSlider) rangeSlider;
        float low = slider.getValue() / 100f;
        float high = slider.getUpperValue() / 100f;
        colorTransformer.setLowerBound(low);
        colorTransformer.setUpperBound(high);

        lowerBoundLabel.setText(ranking.unNormalize(colorTransformer.getLowerBound()).toString());
        upperBoundLabel.setText(ranking.unNormalize(colorTransformer.getUpperBound()).toString());
View Full Code Here

TOP

Related Classes of org.gephi.ui.components.JRangeSlider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.