Directory

← Back

Stepper

Field component that allows stepping through values via given up/down controls.

Author

Rating

Popularity

100+

TextField that allows stepping through values via given up/down controls. It currently supports the following features:

  • Integer, BigDecimal, Float and Date values
  • The step amount can be configured
  • Maximum and minimum values can be configured
  • Supports null values
  • Keyboard stepping with up / down keys
  • Mousewheel support
  • For the float stepper, the decimal accuracy can be configured.
  • For the float and BigDecimal steppers, the decimal format can be configured
  • For the date stepper, date, month or year stepping can be specified
  • Allows setting "invalid" values for server-side validation
  • Manual input can be disabled completely so only the controls can be used to change the value
  • Client-side filtering disallows the user from entering invalid values to the IntStepper and FloatStepper

Note: The float version is somewhat inaccurate by design. It should however be enough for most use cases. When using the declarative format (e.g. Designer) the DateStepper fields don't support the full accuracy of Date.

Sample code

        IntStepper intStepper = new IntStepper();
        intStepper.setValue(1);
        intStepper.setStepAmount(1);

        FloatStepper floatStepper = new FloatStepper();
        floatStepper.setValue(1.0f);
        floatStepper.setStepAmount(1.222f);
        floatStepper.setNumberOfDecimals(3);

        DateStepper dateStepper = new DateStepper();
        dateStepper.setValue(new Date());
        dateStepper.setStepField(VDateStepper.DateStepField.DAY);
        dateStepper.setStepAmount(1);

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

Converted to Vaadin 7

Released
2012-04-15
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Vaadin 7.7+ in 2.3.1
Vaadin 8.0+ in 2.4.0
Vaadin 7.6+ in 2.3.0
Vaadin 7.4+ in 2.2.2
Vaadin 6.7+ in 1.2.0
Vaadin 6.6+ in 1.1.0
Vaadin 6.3+ in 0.5
Vaadin 6.2+ in 1.0.1
Browser
Internet Explorer
Firefox
Safari
Google Chrome

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online