com.ideanest.swing
Class OneArgMessageFormatAdapter

java.lang.Object
  |
  +--java.text.Format
        |
        +--com.ideanest.swing.OneArgMessageFormatAdapter
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class OneArgMessageFormatAdapter
extends java.text.Format

Adapts a MessageFormat that requires an array of arguments into a Format that takes only one argument and places it in the first location of the array.

See Also:
Serialized Form

Constructor Summary
OneArgMessageFormatAdapter(java.text.MessageFormat format)
           
 
Method Summary
 java.lang.StringBuffer format(java.lang.Object o, java.lang.StringBuffer buf, java.text.FieldPosition pos)
           
 java.lang.Object parseObject(java.lang.String string, java.text.ParsePosition pos)
           
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneArgMessageFormatAdapter

public OneArgMessageFormatAdapter(java.text.MessageFormat format)
Method Detail

format

public java.lang.StringBuffer format(java.lang.Object o,
                                     java.lang.StringBuffer buf,
                                     java.text.FieldPosition pos)
Specified by:
format in class java.text.Format

parseObject

public java.lang.Object parseObject(java.lang.String string,
                                    java.text.ParsePosition pos)
Specified by:
parseObject in class java.text.Format