org.swixml

Class ConverterLibrary


public class ConverterLibrary
extends java.lang.Object

The ConverterLibrary contains all available Coverters, converting Strings.

General purpose data type converters are able to convert Strings into objects that are usually as parameters when setters are called on javax.swing objects.

 Available Converter include converters able to produce
 
 
 Example String inputs could look like this:
 
 
Date: Dec 16, 2002
Version:
$Revision: 1.1 $
Author:
Wolf Paulus
See Also:
Converter

Method Summary

Converter
getConverter(Class template)
Returns a Converter instance, able to produce obejcts of the given class
Map
getConverters()
static ConverterLibrary
getInstance()
boolean
hasConverter(Class template)
Indicates if a the ConverterLibary has a Converter producing instances of the given Class.
void
register(Class template, Converter converter)
Registers a Converter with the ConverterLibrary

Method Details

getConverter

public Converter getConverter(Class template)
Returns a Converter instance, able to produce obejcts of the given class
Parameters:
template - Class Class of the object the Converter needs to produce.
Returns:
Converter - instance of the given Converter class.

getConverters

public Map getConverters()
Returns:
Map - all registered converters.
Use a class to get to the converters

getInstance

public static ConverterLibrary getInstance()
Returns:
ConverterLibrary the single INstacne of the ConverterLibarary.

hasConverter

public boolean hasConverter(Class template)
Indicates if a the ConverterLibary has a Converter producing instances of the given Class.
Parameters:
template - Class
Returns:
boolean true, if the ConverterLibrary has a Converter to produce an instances of the gioven class.

register

public void register(Class template,
                     Converter converter)
Registers a Converter with the ConverterLibrary
Parameters:
template - Class type of the objects the Converter creates
converter - Converter Instance of Converter able to vconvert Strings into objects of the given type

Copyright B) 2002 - 2005 - Wolf Paulus - CarlsbadCubes.com . All rights reserved.