Directory

← Back

Paper Range Slider

Java Integration for Paper Range Slider Webcomponent

Author

Rating

Popularity

100+

Java Integration for Paper Range Slider Webcomponent. APIs are generated from https://github.com/IftachSadeh/paper-range-slider via using flow-component-generator. Allow user to listen to the minimal and maximal value change from the client side.

Sample code

    private void defaultSlider() {
        PaperRangeSlider paperRangeSlider = new PaperRangeSlider();
        vl.add(new Label("Default Slider"), paperRangeSlider);
    }

    private void customizedSlider(){
        PaperRangeSlider paperRangeSlider = new PaperRangeSlider(-100, 100, -50, 50);
        vl.add(new Label("Customized Slider"), paperRangeSlider);
    }

    private void pinShownSlider() {
        PaperRangeSlider paperRangeSlider = new PaperRangeSlider(-50.5, 23.5, -50, 0.5, true);
        paperRangeSlider.setStep(0.5);
        vl.add(new Label("Slider with customized step and pin show option"), paperRangeSlider);
    }

    private void disabledSlider(){
        PaperRangeSlider paperRangeSlider = new PaperRangeSlider();
        paperRangeSlider.setEnabled(false);
        vl.add(new Label("Disabled Slider"), paperRangeSlider);
    }

    private void singleSlider(){
        PaperRangeSlider paperRangeSlider = new PaperRangeSlider();
        paperRangeSlider.setSingleSlider(true);
        vl.add(new Label("Converted to Single Slider"), paperRangeSlider);
    }

    private void sliderWithEvent(){
        PaperRangeSlider paperRangeSlider = new PaperRangeSlider(-100, 100, -50, 50);
        Label lowerValueLabel = new Label("Initial lower value is " + paperRangeSlider.getValueMin());
        Label upperValueLabel = new Label("Initial upper value is "+ paperRangeSlider.getValueMax());
        paperRangeSlider.addMinValueChangeListener(event -> lowerValueLabel.setText("Current lower value is " + event.getValueMin()));
        paperRangeSlider.addMaxValueChangeListener(event -> upperValueLabel.setText("Current upper value is " + event.getValueMax()));
        vl.add(new Label("Customized Slider"), lowerValueLabel, upperValueLabel, paperRangeSlider);
    }

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release with popular APIs and two Event listeners.

Released
2019-05-03
Maturity
EXPERIMENTAL
License
Apple Public Source License 1.2

Compatibility

Framework
Vaadin 10+
Browser
Firefox
Google Chrome

Paper Range Slider - Vaadin Add-on Directory

Java Integration for Paper Range Slider Webcomponent Paper Range Slider - Vaadin Add-on Directory
Java Integration for Paper Range Slider Webcomponent. APIs are generated from `https://github.com/IftachSadeh/paper-range-slider` via using flow-component-generator. Allow user to listen to the minimal and maximal value change from the client side.
Online