|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swing.data.Converters
Class containing the static converter registry and a set of static Converter classes for the common Java data types:
Converter converter = Converters.get(Integer.class);
try {
Integer value = (Integer)converter.decode("99", null);
}
catch (ConversionException e) {
// conversion error!
}
Converters can also be added or replaced in the registry:
Converters.put(Foo.class, new FooConverter());
| Nested Class Summary | |
static class |
Converters.DateConverter
Converter for java.util.Date. |
| Constructor Summary | |
protected |
Converters()
|
| Method Summary | |
static Converter |
get(Class klass)
Retrieves the converter for the class. |
static Class[] |
getTypes()
Return all the types which currently have supported type converters. |
static void |
put(Class klass,
Converter converter)
Registers the specified converter for the specified class, overriding any prior converter mapping for that class if it existed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected Converters()
| Method Detail |
public static Converter get(Class klass)
klass - class used as key for converter lookup
public static void put(Class klass,
Converter converter)
klass - class used as key for converter lookupconverter - Converter instance to be registered for the classpublic static Class[] getTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||