Class NumberEditorModel

  • All Implemented Interfaces:
    Serializable, ModelToBean

    public class NumberEditorModel
    extends org.jdesktop.beans.AbstractSerializableBean
    implements ModelToBean
    Created on 11/23/14.
    Since:
    2.17
    Author:
    Tony Chemit - dev@tchemit.fr
    See Also:
    Serialized Form
    • Field Detail

      • bean

        protected Object bean
        Optional bean where to push data.
      • textValue

        protected String textValue
        Current text representation of the number (this value is always displayed in editor).

        Meanwhile the value can be different than the string represention of the numberValue, for example we can have as textValue 0. which represents the number 0.

      • numberValue

        protected Number numberValue
        Current number value of the editor.
      • numberPattern

        protected String numberPattern
        Optional pattern to validate input text.
      • textValueIsAdjusting

        protected boolean textValueIsAdjusting
        To avoid reentrant code while adjusting text value.
      • numberValueIsAdjusting

        protected boolean numberValueIsAdjusting
        To avoid reentrant code while adjusting number value.
    • Method Detail

      • setBean

        public void setBean​(Object bean)
      • getNumberPattern

        public String getNumberPattern()
      • setNumberPattern

        public void setNumberPattern​(String numberPattern)
      • getNumberValue

        public Number getNumberValue()
      • setNumberValue

        public void setNumberValue​(Number numberValue)
      • getTextValue

        public String getTextValue()
      • setTextValue

        public void setTextValue​(String textValue)
      • isCanUseDot

        public boolean isCanUseDot()
      • isCanUseSign

        public boolean isCanUseSign()
      • isCanUseZero

        public boolean isCanUseZero()
      • isCanClearAll

        public boolean isCanClearAll()
      • isTextValueIsAdjusting

        public boolean isTextValueIsAdjusting()
      • isNumberValueIsAdjusting

        public boolean isNumberValueIsAdjusting()