com.kiwisoft.utils.format
Interface ObjectFormat

All Known Subinterfaces:
BooleanFormat, TextFormat
All Known Implementing Classes:
DefaultObjectFormat

public interface ObjectFormat

Interface class for displaying objects in UI text components like table cells, lists, labels and text fields. Implementations must not directly implement this interface but have to implement on of the child interfaces TextFormat or BooleanFormat.

Version:
$Revision: 1.3 $, $Date: 2006/03/18 15:54:03 $
Author:
Stefan Stiller

Field Summary
static String DEFAULT
          Used for default formats.
 
Method Summary
 boolean canFormat(Class aClass)
           
 boolean canParse(Class aClass)
           
 String getGroup()
          The name of the group the format belongs to.
 String getName()
          Returns the name of the format.
 

Field Detail

DEFAULT

public static final String DEFAULT
Used for default formats.

See Also:
getName(),
Method Detail

getName

public String getName()
Returns the name of the format. Return "Default" if the format should be the default format for the handled classes (works only if no default format has already been installed).

Returns:
The name of the format. Must not be null.

getGroup

public String getGroup()
The name of the group the format belongs to. The group defines the sub menu under which the format will appear in the context menu.

Returns:
The name of the format group. If null the format will appear in the root menu.

canFormat

public boolean canFormat(Class aClass)
Returns:
true if the format can format objects of the specified class.

canParse

public boolean canParse(Class aClass)
Returns:
true if the format can create objects of the specified class from String objects.