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

Stepper - Vaadin Add-on Directory

Field component that allows stepping through values via given up/down controls. Stepper - Vaadin Add-on Directory
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.
Source code
Online Demo
Discussion Forum
Issue Tracker
Author Homepage

Stepper version 0.1
null

Stepper version 0.2
null

Stepper version 0.3
null

Stepper version 0.5
- simpler layout - max/min values - keyboard navigation

Stepper version 1.0
- added mousewheel support - fixed DateStepper minimum value bug - fixed component stylenames

Stepper version 1.0.1
- fixed CSS files directory

Stepper version 1.1.0
- fixed critical bug when there was only a min/max limit, not both (thanks Guy DS) - fixed a couple of size bugs many users reported, now all sizes should be supported - added support for read-only and disabled states - enhanced how min/max limits work

Stepper version 1.2.0
- Mousewheel support can be enabled/disabled - Input via the textfield can be disabled (value changed only with the controls) - Invalid values outside the max/min limits can be allowed Thank you everyone for the patches and bug reports!

Stepper version 2.0
Converted to Vaadin 7

Stepper version 2.0.1
Upgraded to Vaadin 7.0.0.beta11

Stepper version 2.1
* Update to Vaadin 7 RC2 * Add experimental support for setting custom date formats for DateStepper

Stepper version 2.1.2
* Layout fixes * Experimental client-side value filtering

Stepper version 2.2.0
* BigDecimal field. Thanks to mwisnicki * Added support for valid null values. Thanks to joheriks * Fixed classnames and stylenames by removing v-prefix.

Stepper version 2.2.1
Decimal format for FloatStepper and BigDecimalStepper. Thanks to joheriks.

Stepper version 2.2.2
Compatible with Vaadin 7.4+

Stepper version 2.3.0
* Add support for the declarative format * Add support for Valo

Stepper version 2.4.0
Support for Framework 8

Stepper version 2.3.1
Vaadin 7 version with Java 7 compatible code. Not actively maintained.

Online