public class NumericField extends AbstractTextField<BigDecimal>
Modifier and Type | Field and Description |
---|---|
static String |
copyright |
protected DecimalFormat |
decimalFormat |
protected boolean |
decimalFormatError |
protected BigDecimal |
decimalValue |
protected BigDecimal |
maxValue |
protected BigDecimal |
minValue |
protected int |
precision |
protected int |
scale |
autoCapitalize, labelPlaceholder, maxLength, replaceBadUnicodeCharacters, size, stringValue
accessor, bulkCheckboxName, bulkChecked, colSpan, COPYRIGHT, EDITABLE_FIELD_CSS_CLASS, elementsConfiguration, enabled, errors, fieldCssClass, forceNewRow, FORM_LABEL_CSS_CLASS, help, href, id, INPUT_CONTAINER_CSS_CLASS, inputName, insertable, label, logger, mode, required, STATIC_VALUE_CSS_CLASS, title, updatable
Constructor and Description |
---|
NumericField(PropertyAccessor accessor,
Mode mode,
String prefix) |
Modifier and Type | Method and Description |
---|---|
DecimalFormat |
getDecimalFormat() |
BigDecimal |
getMaxValue() |
BigDecimal |
getMinValue() |
int |
getPrecision() |
int |
getScale() |
BigDecimal |
getValue() |
protected BigDecimal |
maybeConvertValue(Object value) |
void |
readFrom(KeyValueAccessor keyValueAccessor) |
void |
readFromObject(Object obj) |
void |
readFromRequest(HttpServletRequest req) |
void |
setDecimalFormat(DecimalFormat decimalFormat) |
void |
setMaxValue(BigDecimal maxValue) |
void |
setMaxValue(Double maxValue) |
void |
setMinValue(BigDecimal minValue) |
void |
setPrecision(int precision) |
void |
setScale(int scale) |
void |
setStringValue(String stringValue) |
void |
setValue(BigDecimal decimalValue) |
protected void |
updateStringValue() |
boolean |
validate() |
void |
valueToXhtmlEdit(XhtmlBuffer xb) |
void |
writeToObject(Object obj) |
getMaxLength, getSize, getStringValue, isAutoCapitalize, isLabelPlaceholder, isReplaceBadUnicodeCharacters, labelToXhtml, setAutoCapitalize, setLabelPlaceholder, setMaxLength, setReplaceBadUnicodeCharacters, setSize, valueToXhtml, valueToXhtmlPreview, valueToXhtmlView
closeVisibleField, errorsToXhtml, getColSpan, getDisplayValue, getErrors, getFieldCssClass, getHelp, getHref, getId, getInputName, getLabel, getMode, getPropertyAccessor, getText, getTitle, hasRequiredFields, helpToXhtml, isBlank, isEnabled, isForceNewRow, isInsertable, isReadOnly, isRequired, isUpdatable, isValid, openVisibleField, setColSpan, setEnabled, setErrors, setFieldCssClass, setForceNewRow, setHelp, setHref, setId, setInputName, setInsertable, setLabel, setRequired, setTitle, setUpdatable, toXhtml, writeTo, writeToObject, writeToObject
public static final String copyright
protected BigDecimal decimalValue
protected DecimalFormat decimalFormat
protected int precision
protected int scale
protected BigDecimal minValue
protected BigDecimal maxValue
protected boolean decimalFormatError
public NumericField(PropertyAccessor accessor, Mode mode, String prefix)
public void readFromRequest(HttpServletRequest req)
readFromRequest
in interface Element
readFromRequest
in class AbstractField<BigDecimal>
public boolean validate()
validate
in interface Element
validate
in class AbstractTextField<BigDecimal>
public DecimalFormat getDecimalFormat()
public void readFromObject(Object obj)
readFromObject
in interface Element
readFromObject
in class AbstractField<BigDecimal>
protected void updateStringValue()
public void writeToObject(Object obj)
public void setStringValue(String stringValue)
setStringValue
in interface Field<BigDecimal>
setStringValue
in class AbstractTextField<BigDecimal>
public void readFrom(KeyValueAccessor keyValueAccessor)
readFrom
in interface FormElement
readFrom
in class AbstractField<BigDecimal>
protected BigDecimal maybeConvertValue(Object value)
maybeConvertValue
in class AbstractField<BigDecimal>
public void valueToXhtmlEdit(XhtmlBuffer xb)
valueToXhtmlEdit
in class AbstractTextField<BigDecimal>
public BigDecimal getMinValue()
public void setMinValue(BigDecimal minValue)
public BigDecimal getMaxValue()
public void setMaxValue(BigDecimal maxValue)
public void setMaxValue(Double maxValue)
public void setDecimalFormat(DecimalFormat decimalFormat)
public int getScale()
public void setScale(int scale)
public BigDecimal getValue()
public void setValue(BigDecimal decimalValue)
public int getPrecision()
public void setPrecision(int precision)