Class WSpinBox

    • Constructor Detail

      • WSpinBox

        public WSpinBox​(WContainerWidget parentContainer)
        Creates a spin-box.

        The range is (0 - 99) and the step size 1.

        The initial value is 0.

    • Method Detail

      • setMinimum

        public void setMinimum​(int minimum)
        Sets the minimum value.

        The default value is 0.

      • setMaximum

        public void setMaximum​(int maximum)
        Sets the maximum value.

        The default value is 99.

      • setSingleStep

        public void setSingleStep​(int step)
        Sets the step value.

        The default value is 1.

      • getSingleStep

        public int getSingleStep()
        Returns the step value.
      • setValue

        public void setValue​(int value)
        Sets the value.

        value must be a value between getMinimum() and getMaximum().

        The default value is 0

      • setWrapAroundEnabled

        public void setWrapAroundEnabled​(boolean enabled)
        Sets if this spinbox wraps around to stay in the valid range.

        Note: Not supported by the native controls.

      • valueChanged

        public Signal1<java.lang.Integer> valueChanged()
        A signal that indicates when the value has changed.

        This signal is emitted when WFormWidget.changed() is emitted, but supplies the new value as an argument. The WFormWidget.changed() signal is emitted when the user changes the value of the spinbox by pressing the up/down arrow, or entering a different value and pressing enter or moving focus.

        See Also:
        WFormWidget.changed()