Class AbstractLightSpinner<T extends Number & Comparable<T>>

    • Constructor Detail

      • AbstractLightSpinner

        protected AbstractLightSpinner​(boolean nullable)
        The constructor.
        Parameters:
        nullable - the nullable mode, true to allow the value of this spinner to be null, false to disallow this behavior.
    • Method Detail

      • addValueListener

        public void addValueListener​(IChangedListener<AbstractLightSpinner<T>,​T> listener)
        Adds the value listener.
        Parameters:
        listener - the listener to add, should not be null.
      • getMaximum

        public T getMaximum()
        Gets the maximum allowed value.
        Returns:
        the maximum value.
      • getMinimum

        public T getMinimum()
        Gets the minimum allowed value.
        Returns:
        the minimum value.
      • getValue

        public T getValue()
        Gets the value of this spinner.
        Returns:
        the value;
      • removeValueListener

        public void removeValueListener​(IChangedListener<AbstractLightSpinner<T>,​T> listener)
        Removes the value listener.
        Parameters:
        listener - the listener to remove, should not be null.
      • setMaximum

        public void setMaximum​(T maximum)
        Sets the maximum allowed value.
        Parameters:
        maximum - the new maximum value.
      • setMinimum

        public void setMinimum​(T minimum)
        Sets the minimum allowed value.
        Parameters:
        minimum - the new minimum value.
      • setValue

        public void setValue​(T value)
        Sets the value of this spinner.
        Parameters:
        value - the value to set.
      • setEditable

        public void setEditable​(boolean isEditable,
                                Predicate<LightImageButton> buttonsEnablementPredicate)
        Description copied from class: LightTextEditorBar
        Sets control editable state and configures buttons enabled state.
        Overrides:
        setEditable in class LightTextEditorBar
        Parameters:
        isEditable - - true if control is editable.
        buttonsEnablementPredicate - - predicate to configure buttons enabled state. Can't be null.
      • getDefaultMaximum

        protected abstract T getDefaultMaximum()
        Gets the default maximum value.
        Returns:
        The default maximum value.
      • getDefaultMinimum

        protected abstract T getDefaultMinimum()
        Gets the default minimum value.
        Returns:
        The default minimum value.
      • getInvalidValue

        protected abstract T getInvalidValue()
        Gets the invalid value.
        Returns:
        The invalid value.
      • getVerifyPattern

        protected abstract Pattern getVerifyPattern()
        Gets the verify pattern for value.
        Returns:
        The verify pattern.
      • nextValue

        protected abstract T nextValue​(T value)
        Gets the next value to given value.
        Parameters:
        value - The given value.
        Returns:
        The next value.
      • parseValue

        protected abstract T parseValue​(String text)
        Parses value from given text.
        Parameters:
        text - The given text.
        Returns:
        The parsed value.
      • previousValue

        protected abstract T previousValue​(T value)
        Gets the previous value to given value.
        Parameters:
        value - The given value.
        Returns:
        The previous value.