logo

Sliders for integers and doubles in JavaView

This example shows, how to use the JavaView slider classes "PuInteger" and "PuDouble" for interactive manipulation of integer and double values.

Each PuInteger or PuDouble slider consists of a label, a text field, a slider with two arrow buttons, and a "C"-Button to get it's configuration panel. To change the value move the slider with left mouse button pressed, use the arrow buttons, click the mouse inside the slider bar or type a new value into the text field.

Controls in Configuration panel:

Text field "Minimum" Defines the minimum value, the slider can be set to.
Text field "Maximum" Defines the maximum value, the slider can be set to.
Text field "Unit Incr" Defines the increment or decrement for the value of the slider, when the right or left arrow button is pressed.
Text field "Block Incr" Defines the increment or decrement for the value of the slider, when the left mouse button gets pressed inside the slider bar left or right from the slider.
Text field "Accuracy" The accuracy for the value shown in the text field in the left of the slider.
Button "OK" Confirm new adjusted configuration and destroy the configuration panel.
Button "Cancel" Destroy configuration panel without changing the configuration of the slider.

A Java example on the use of the classes PuInteger or PuDouble in your own projects have a look at the page on sliders in the tutorial of the development section.

© 1996-2015 Last modified: 07.05.2013 --- www.javaview.de --- The JavaView Project