org.beanfabrics.model
Class DecimalPM

java.lang.Object
  extended by org.beanfabrics.AbstractBean
      extended by org.beanfabrics.ValidatableBean
          extended by org.beanfabrics.model.AbstractPM
              extended by org.beanfabrics.model.AbstractValuePM
                  extended by org.beanfabrics.model.TextPM
                      extended by org.beanfabrics.model.BigDecimalPM
                          extended by org.beanfabrics.model.DecimalPM
All Implemented Interfaces:
Bean, ContextOwner, HasComparable, IBigDecimalPM, ITextPM, IValuePM, PresentationModel, Supportable, Validatable

public class DecimalPM
extends BigDecimalPM

The DecimalPM is a PresentationModel that contains a decimal number. It offers setter and getter methods for Double and Float.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.beanfabrics.model.BigDecimalPM
BigDecimalPM.BigDecimalComparable, BigDecimalPM.BigDecimalValidationRule, BigDecimalPM.Format
 
Nested classes/interfaces inherited from class org.beanfabrics.model.TextPM
TextPM.DefaultOptionsValidationRule, TextPM.TextComparable
 
Nested classes/interfaces inherited from class org.beanfabrics.model.AbstractValuePM
AbstractValuePM.MandatoryValidationRule
 
Nested classes/interfaces inherited from class org.beanfabrics.model.AbstractPM
AbstractPM.PropertiesValidationRule
 
Field Summary
 
Fields inherited from class org.beanfabrics.model.TextPM
KEY_MESSAGE_VALUE_NOT_AN_OPTION
 
Fields inherited from class org.beanfabrics.model.AbstractValuePM
KEY_MESSAGE_MANDATORY
 
Fields inherited from class org.beanfabrics.model.AbstractPM
KEY_MESSAGE_ONE_OR_MORE_INVALID
 
Constructor Summary
DecimalPM()
          Constructs a DecimalPM.
 
Method Summary
 java.lang.Byte getByte()
           
 java.lang.Double getDouble()
          Returns the value of this PM as a Double.
 java.lang.Float getFloat()
          Returns the value of this PM as a Float.
 java.lang.Integer getInteger()
           
 java.lang.Long getLong()
           
 java.lang.Short getShort()
           
 void setByte(java.lang.Byte value)
           
 void setDouble(java.lang.Double value)
          Sets the value of this PM to the given Double value.
 void setFloat(java.lang.Float value)
          Sets the value of this PM to the given Float.
 void setInteger(java.lang.Integer value)
           
 void setLong(java.lang.Long value)
           
 void setShort(java.lang.Short value)
           
 
Methods inherited from class org.beanfabrics.model.BigDecimalPM
createDefaultFormat, getBigDecimal, getBigInteger, getComparable, getDecimalFormat, getFormat, reformat, setBigDecimal, setBigInteger, setDefaultBigDecimal, setDefaultBigInteger, setFormat
 
Methods inherited from class org.beanfabrics.model.TextPM
getDefaultText, getOptions, getText, getText, isEmpty, isModified, isRestrictedToOptions, preset, reset, setDefaultText, setOptions, setRestrictedToOptions, setText
 
Methods inherited from class org.beanfabrics.model.AbstractValuePM
getDescription, getTitle, isEditable, isMandatory, revalidate, setDescription, setEditable, setMandatory, setTitle
 
Methods inherited from class org.beanfabrics.model.AbstractPM
getContext, getSupportMap, revalidateProperties
 
Methods inherited from class org.beanfabrics.ValidatableBean
getValidationState, getValidator, isValid, setValidationState
 
Methods inherited from class org.beanfabrics.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, equals, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.beanfabrics.model.ITextPM
getOptions, getText, isModified, preset, reset, setOptions, setText
 
Methods inherited from interface org.beanfabrics.model.IValuePM
getDescription, getTitle, isEditable, isEmpty, isMandatory, setDescription, setEditable, setMandatory, setTitle
 
Methods inherited from interface org.beanfabrics.Bean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface org.beanfabrics.validation.Validatable
getValidationState, getValidator, isValid, revalidate
 
Methods inherited from interface org.beanfabrics.support.Supportable
getSupportMap
 
Methods inherited from interface org.beanfabrics.context.ContextOwner
getContext
 

Constructor Detail

DecimalPM

public DecimalPM()
Constructs a DecimalPM.

Method Detail

getDouble

public java.lang.Double getDouble()
                           throws ConversionException
Returns the value of this PM as a Double.

Returns:
the value of this PM as a Double
Throws:
ConversionException - if the text value of this PM can't be converted to a double value using the defined format
See Also:
#setFormat(java.text.DecimalFormat), TextPM.getText()

setDouble

public void setDouble(java.lang.Double value)
Sets the value of this PM to the given Double value.

Parameters:
value - the double value
See Also:
TextPM.setText(String)

getFloat

public java.lang.Float getFloat()
                         throws ConversionException
Returns the value of this PM as a Float.

Returns:
the value of this PM as a Float
Throws:
ConversionException - if the text value of this PM can't be converted to a float value using the defined format

setFloat

public void setFloat(java.lang.Float value)
Sets the value of this PM to the given Float.

Parameters:
value - the float value

setByte

public void setByte(java.lang.Byte value)

getByte

public java.lang.Byte getByte()
                       throws ConversionException
Throws:
ConversionException

setShort

public void setShort(java.lang.Short value)

getShort

public java.lang.Short getShort()
                         throws ConversionException
Throws:
ConversionException

setInteger

public void setInteger(java.lang.Integer value)

getInteger

public java.lang.Integer getInteger()
                             throws ConversionException
Throws:
ConversionException

setLong

public void setLong(java.lang.Long value)

getLong

public java.lang.Long getLong()
                       throws ConversionException
Throws:
ConversionException