org.beanfabrics.model
Class BigDecimalPM
java.lang.Object
org.beanfabrics.AbstractBean
org.beanfabrics.ValidatableBean
org.beanfabrics.model.AbstractPM
org.beanfabrics.model.AbstractValuePM
org.beanfabrics.model.TextPM
org.beanfabrics.model.BigDecimalPM
- All Implemented Interfaces:
- Bean, ContextOwner, IBigDecimalPM, ITextPM, IValuePM, PresentationModel, Supportable, Validatable
- Direct Known Subclasses:
- DecimalPM, IntegerPM, MoneyPM
public class BigDecimalPM
- extends TextPM
- implements IBigDecimalPM
The BigDecimalPM is a presentation model for a BigDecimal value. It is the
base class for all other 'numeric' presentation models.
- Author:
- Michael Karneim
| Methods inherited from class org.beanfabrics.model.TextPM |
getDefaultText, getOptions, getText, getText, isEmpty, isModified, isRestrictedToOptions, preset, reset, setDefaultText, setOptions, setRestrictedToOptions, setText, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BigDecimalPM
public BigDecimalPM()
reformat
public void reformat()
- Parses the content and formats it according to this model's format.
- Specified by:
reformat in interface ITextPM- Overrides:
reformat in class TextPM
- See Also:
setFormat(DecimalFormat)
createDefaultFormat
protected java.text.DecimalFormat createDefaultFormat()
getDecimalFormat
public static java.text.DecimalFormat getDecimalFormat(java.util.Locale locale)
getFormat
public java.text.DecimalFormat getFormat()
- Returns the format.
- Returns:
- the format
- See Also:
reformat()
setFormat
public void setFormat(java.text.DecimalFormat newFormat)
- Sets the format of this model. The format will be cloned prior use.
- Parameters:
newFormat - the new format for this model- See Also:
reformat()
setBigDecimal
public void setBigDecimal(java.math.BigDecimal value)
- Specified by:
setBigDecimal in interface IBigDecimalPM
getBigDecimal
public java.math.BigDecimal getBigDecimal()
throws ConversionException
- Specified by:
getBigDecimal in interface IBigDecimalPM
- Throws:
ConversionException
setDefaultBigDecimal
public void setDefaultBigDecimal(java.math.BigDecimal value)
setBigInteger
public void setBigInteger(java.math.BigInteger value)
getBigInteger
public java.math.BigInteger getBigInteger()
throws ConversionException
- Throws:
ConversionException
setDefaultBigInteger
public void setDefaultBigInteger(java.math.BigInteger value)
getComparable
public java.lang.Comparable getComparable()
- Specified by:
getComparable in interface IValuePM- Overrides:
getComparable in class TextPM
© 2010 by Michael Karneim, http://www.beanfabrics.org