public class NumberEditorModel extends org.jdesktop.beans.AbstractSerializableBean implements ModelToBean
| Modifier and Type | Field and Description |
|---|---|
protected Object |
bean
Optional bean where to push data.
|
protected String |
numberPattern
Optional pattern to validate input text.
|
protected Number |
numberValue
Current number value of the editor.
|
protected boolean |
numberValueIsAdjusting
To avoid reentrant code while adjusting number value.
|
static String |
PROPERTY_BEAN |
static String |
PROPERTY_NUMBER_PATTERN |
static String |
PROPERTY_NUMBER_VALUE |
static String |
PROPERTY_TEXT_VALUE |
protected String |
textValue
Current text representation of the number (this value is always displayed in editor).
|
protected boolean |
textValueIsAdjusting
To avoid reentrant code while adjusting text value.
|
| Constructor and Description |
|---|
NumberEditorModel(NumberEditorConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected Predicate<NumberEditorModel> |
canUpdateBeanNumberValuePredicate() |
Object |
getBean() |
NumberEditorConfig |
getConfig() |
String |
getNumberPattern() |
Number |
getNumberValue() |
String |
getTextValue() |
boolean |
isCanClearAll() |
boolean |
isCanUseDot() |
boolean |
isCanUseSign() |
boolean |
isCanUseZero() |
boolean |
isNumberValueIsAdjusting() |
boolean |
isTextValueIsAdjusting() |
void |
setBean(Object bean) |
void |
setNumberPattern(String numberPattern) |
void |
setNumberValue(Number numberValue) |
void |
setTextValue(String textValue) |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListenerpublic static final String PROPERTY_BEAN
public static final String PROPERTY_TEXT_VALUE
public static final String PROPERTY_NUMBER_VALUE
public static final String PROPERTY_NUMBER_PATTERN
protected Object bean
protected String textValue
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.
protected Number numberValue
protected String numberPattern
protected boolean textValueIsAdjusting
protected boolean numberValueIsAdjusting
public NumberEditorModel(NumberEditorConfig config)
public NumberEditorConfig getConfig()
public Object getBean()
getBean in interface ModelToBeanpublic void setBean(Object bean)
public String getNumberPattern()
public void setNumberPattern(String numberPattern)
public Number getNumberValue()
public void setNumberValue(Number numberValue)
public String getTextValue()
public void setTextValue(String textValue)
public boolean isCanUseDot()
public boolean isCanUseSign()
public boolean isCanUseZero()
public boolean isCanClearAll()
public boolean isTextValueIsAdjusting()
public boolean isNumberValueIsAdjusting()
protected Predicate<NumberEditorModel> canUpdateBeanNumberValuePredicate()
Copyright © 2008–2021 Ultreia.io. All rights reserved.