org.wings.text
Class SInternationalFormatter

java.lang.Object
  extended by org.wings.text.SAbstractFormatter
      extended by org.wings.text.SDefaultFormatter
          extended by org.wings.text.SInternationalFormatter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SDateFormatter, SNumberFormatter

public class SInternationalFormatter
extends SDefaultFormatter

SInternationalFormatter extends SDefaultFormatter, using an instance of java.text.Format to handle the conversion to a String, and the conversion from a String.

Author:
erik
See Also:
Serialized Form

Constructor Summary
SInternationalFormatter(Format format)
          Creates a new instance of SInternationalFormatter
 
Method Summary
 Format getFormat()
          Returns the format that dictates the legal values that can be edited and displayed.
 Comparable getMaximum()
          Returns the maximum valid value
 Comparable getMinimum()
          Return the minimum valid value
 void setFormat(Format format)
          Sets the format that dictates the legal values that can be edited and displayed.
 void setMaximum(Comparable max)
          Sets the maximum valid value
 void setMinimum(Comparable min)
          Sets the minimum valid value
 Object stringToValue(String text)
          Object representation of text.
 String valueToString(Object value)
          String representation of value.
 
Methods inherited from class org.wings.text.SDefaultFormatter
getValueClass, setValueClass
 
Methods inherited from class org.wings.text.SAbstractFormatter
getFormattedTextField, install, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SInternationalFormatter

public SInternationalFormatter(Format format)
Creates a new instance of SInternationalFormatter

Method Detail

setFormat

public void setFormat(Format format)
Sets the format that dictates the legal values that can be edited and displayed.

Parameters:
format - The format that dictates the legal values that can be edited and displayed.

getFormat

public Format getFormat()
Returns the format that dictates the legal values that can be edited and displayed.

Returns:
The format that dictates the legal values that can be edited and displayed.

stringToValue

public Object stringToValue(String text)
                     throws ParseException
Object representation of text.

Overrides:
stringToValue in class SDefaultFormatter
Parameters:
text - String to convert
Returns:
Object representation of text
Throws:
ParseException

valueToString

public String valueToString(Object value)
                     throws ParseException
String representation of value.

Overrides:
valueToString in class SDefaultFormatter
Parameters:
value - Value to convert
Returns:
String representation of value
Throws:
ParseException

setMinimum

public void setMinimum(Comparable min)
Sets the minimum valid value

Parameters:
min - the minimum valid value

getMinimum

public Comparable getMinimum()
Return the minimum valid value

Returns:
Comparable the minimum valid value

setMaximum

public void setMaximum(Comparable max)
Sets the maximum valid value

Parameters:
max - the maximum valid value

getMaximum

public Comparable getMaximum()
Returns the maximum valid value

Returns:
Comparable the maximum valid value


wingS Swings ;-)