Holger's
Java API

com.antelmann.util.gui
Class MoneyFormatFactory

java.lang.Object
  extended by javax.swing.JFormattedTextField.AbstractFormatterFactory
      extended by javax.swing.text.DefaultFormatterFactory
          extended by com.antelmann.util.gui.MoneyFormatFactory
All Implemented Interfaces:
Serializable

public class MoneyFormatFactory
extends DefaultFormatterFactory

to be used with JFormattedTextField; this maps between a String and a Number, but is displayed as a money value. Note that the number used here must still be properly converted to a Money value, as the returned number itself might internally still be an Integer or a Double with undesired precision.

Since:
4. September 2007, 21:53
Author:
Holger Antelmann
See Also:
JFormattedTextField, Money, Serialized Form

Constructor Summary
MoneyFormatFactory()
           
MoneyFormatFactory(Currency c)
           
MoneyFormatFactory(Currency c, Locale l)
           
MoneyFormatFactory(Locale l)
           
 
Method Summary
 
Methods inherited from class javax.swing.text.DefaultFormatterFactory
getDefaultFormatter, getDisplayFormatter, getEditFormatter, getFormatter, getNullFormatter, setDefaultFormatter, setDisplayFormatter, setEditFormatter, setNullFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoneyFormatFactory

public MoneyFormatFactory()

MoneyFormatFactory

public MoneyFormatFactory(Currency c)

MoneyFormatFactory

public MoneyFormatFactory(Locale l)

MoneyFormatFactory

public MoneyFormatFactory(Currency c,
                          Locale l)
Parameters:
c - specifies the currency to be displayed
l - specifies the Locale that is to be used for displaying the number itself


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads