|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.converter.DefaultObjectConverter
public class DefaultObjectConverter
Default object converter. It converts an object to a String using either toString() or the AbstractFormatter specified in the ConverterContex's userObject.
For example,
MaskFormatter mask = null;
try {
mask = new MaskFormatter("###-##-####");
}
catch (ParseException e) {
e.printStackTrace();
}
ConverterContext ssnConverterContext = new ConverterContext("SSN", mask);
If so, it will use the MaskFormatter's stringToValue and valueToString methods to do the conversion.
| Constructor Summary | |
|---|---|
DefaultObjectConverter()
|
|
| Method Summary | |
|---|---|
Object |
fromString(String string,
ConverterContext context)
Converts from String to an object. |
boolean |
supportFromString(String string,
ConverterContext context)
If it supports fromString. |
boolean |
supportToString(Object object,
ConverterContext context)
If it supports toString method. |
String |
toString(Object object,
ConverterContext context)
Converts from object to String based on current locale. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultObjectConverter()
| Method Detail |
|---|
public String toString(Object object,
ConverterContext context)
ObjectConverter
toString in interface ObjectConverterobject - object to be convertedcontext - converter context to be used
public boolean supportToString(Object object,
ConverterContext context)
ObjectConverter
supportToString in interface ObjectConverterobject - object to be convertedcontext - converter context to be used
public Object fromString(String string,
ConverterContext context)
ObjectConverter
fromString in interface ObjectConverterstring - the stringcontext - context to be converted
public boolean supportFromString(String string,
ConverterContext context)
ObjectConverter
supportFromString in interface ObjectConverterstring - the stringcontext - context to be converted
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||