O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Zooming with the slider

Another nice component is the slider. We use this component in situations when we want to select a value between minimum and maximum. Users can change a value by sliding a graphical thumb. The slider can be in a horizontal or vertical position. Using the slider is very easy in a Vaadin application. We will show it for zooming in on images. The minimum value will be 0 percent and the maximum will be 100 percent.

Zooming with the slider

How to do it...

Carry out the following steps to learn how to use the slider component:

  1. We create a Vaadin project with the main UI class named Demo, for example, as follows:
    public class Demo extends UI {…}
  2. We create another ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required