|
||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface class for displaying objects in UI text components like table cells, lists, labels and text fields.
Field Summary | |
static java.lang.String |
DEFAULT
Used for default formats. |
Method Summary | |
boolean |
canFormat(java.lang.Class aClass)
|
boolean |
canParse(java.lang.Class aClass)
|
java.lang.String |
format(java.lang.Object value)
Returns the String representing the specified value. |
java.lang.String |
getGroup()
The name of the group the format belongs to. |
int |
getHorizontalAlignment(java.lang.Object value)
Returns the horizontal alignment of the formatted text. |
javax.swing.Icon |
getIcon(java.lang.Object value)
Returns the icon for the specified value; |
java.lang.String |
getName()
Returns the name of the format. |
java.lang.Object |
parse(java.lang.String value,
java.lang.Class targetClass)
Returns the Object created from the specified String .
|
Field Detail |
public static final java.lang.String DEFAULT
getName()
Method Detail |
public java.lang.String getName()
public java.lang.String getGroup()
null
the format will appear in the root menu.public boolean canFormat(java.lang.Class aClass)
true
if the format can format objects of the specified class.format(Object)
public boolean canParse(java.lang.Class aClass)
true
if the format can create objects of the specified class
from String
objects.parse(String, Class)
public int getHorizontalAlignment(java.lang.Object value)
value
- The unformated value.
SwingConstants
:
LEFT
,
CENTER
,
RIGHT
,
LEADING
.
TRAILING
.public javax.swing.Icon getIcon(java.lang.Object value)
value
- The unformated value.
public java.lang.String format(java.lang.Object value)
String
representing the specified value.
value
- The object which should be formated.
canFormat(Class)
public java.lang.Object parse(java.lang.String value, java.lang.Class targetClass)
Object
created from the specified String
.
The method may throw an RuntimeException
if the String
is invalid.
value
- The String
which should be parsed.targetClass
- The Class
the return value should have. Can be ignored if
the format handles only one class.
Object
created from the String
.canParse(Class)
|
||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |