org.beanfabrics.model
Class MoneyPM

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.MoneyPM
All Implemented Interfaces:
Bean, ContextOwner, HasComparable, IBigDecimalPM, ITextPM, IValuePM, PresentationModel, Supportable, Validatable

public class MoneyPM
extends BigDecimalPM

The MoneyPM is a presentation model for a monetary value with a currency format.


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
MoneyPM()
           
 
Method Summary
protected  IFormat<java.math.BigDecimal> createDefaultFormat()
          Creates the default format for this PM.
protected static java.text.DecimalFormat getCurrencyFormat(java.util.Locale locale)
           
 
Methods inherited from class org.beanfabrics.model.BigDecimalPM
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

MoneyPM

public MoneyPM()
Method Detail

createDefaultFormat

protected IFormat<java.math.BigDecimal> createDefaultFormat()
Description copied from class: BigDecimalPM
Creates the default format for this PM. This method is called from the constructor and usually returns a BigDecimalPM.Format with the default DecimalFormat of the current Locale.

Overrides:
createDefaultFormat in class BigDecimalPM
Returns:
the default format for this PM

getCurrencyFormat

protected static java.text.DecimalFormat getCurrencyFormat(java.util.Locale locale)