Example usage for com.vaadin.ui Slider Slider

List of usage examples for com.vaadin.ui Slider Slider

Introduction

In this page you can find the example usage for com.vaadin.ui Slider Slider.

Prototype

public Slider() 

Source Link

Document

Default slider constructor.

Usage

From source file:org.vaadin.mqtt.ui.inputs.SliderInput.java

public SliderInput(MqttDataSource source, String messageformat) {
    super(source, source.getTopic().getTitle());
    this.messageFormat = messageformat != null ? messageformat : VALUE_PLACEHOLDER;
    this.topic = source.getTopic();
    double min = topic.getMin().doubleValue();
    double max = topic.getMax().doubleValue();
    slider = new Slider();
    slider.setWidth(SIZE_X_PX);//  www  .  j a v a 2s .  c  o m
    slider.setMax(max);
    slider.setMin(min);
    slider.setResolution(1);
    slider.addValueChangeListener(new ValueListener());
}