public class MustDecimalField extends MustTextField
Modifier and Type | Field and Description |
---|---|
protected java.text.DecimalFormat |
decimalFieldFormat |
protected double |
editBeginValue |
additionalTagFragments, className, editable, enabled, fontSize, maxlength, required, size
comment, focus, name, placeholder, toolTipText
Constructor and Description |
---|
MustDecimalField()
Constructs a new decimal text field.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getBigDecimalValue()
Returns the value of the component as a BigDecimal.
|
java.lang.String |
getCreationTag()
Returns the tag sequence that's needed to show this object in the user
interface.
|
double |
getDoubleValue()
Returns the value of the component as a double.
|
boolean |
isFilled()
Indicates whether the component has a value.
|
boolean |
isModified()
Checks if there have been any modifications made on the current row.
|
boolean |
isValid()
Returns true if the component's value is valid.
|
void |
setDecimalPlaces(int newDecimalPlaces)
Sets the scale of field to be displayed.
|
static void |
setDefaultClassName(java.lang.String newDefaultClassName)
Sets the component's default class name - may be used to assign formatting
via stylesheets.
|
void |
setText(java.math.BigDecimal value)
Sets the text.
|
void |
setText(double value)
Sets the text.
|
java.lang.String |
toString()
Returns the tag sequence that's needed to show this object in the user
interface.
|
fetchYourValueFromRequest, getText, getTextOrNullIfEmpty, isRequirementUnfulfilled, setAdditionalTagFragments, setClassName, setColumns, setDefaultAdditionalTagFragments, setEditable, setEnabled, setFontSize, setMaxlength, setRequired, setText
destroy, getName, setComment, setFocus, setPlaceHolder, setToolTipText
protected java.text.DecimalFormat decimalFieldFormat
protected double editBeginValue
public static void setDefaultClassName(java.lang.String newDefaultClassName)
newDefaultClassName
- the component's default class namepublic void setDecimalPlaces(int newDecimalPlaces)
newDecimalPlaces
- the new display scalepublic double getDoubleValue() throws java.text.ParseException
java.text.ParseException
public java.math.BigDecimal getBigDecimalValue() throws java.text.ParseException
java.text.ParseException
public void setText(double value)
value
- the double to be formatted as textpublic void setText(java.math.BigDecimal value)
newText
- the double to be formatted as textpublic boolean isFilled()
isFilled
in class MustTextField
public boolean isModified()
isModified
in class MustTextField
public boolean isValid()
isValid
in class MustTextField
public java.lang.String toString()
toString
in class MustTextField
public java.lang.String getCreationTag()
getCreationTag
in interface Markupable
getCreationTag
in class MustTextField
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de