|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The CustomAttribute interface is an extension of the
Attribute interface and defines the methods a class
implementation has to provide for persistence and use in an
AttributeEditor.
A CustomAttribute is used whenever special data (of different
types than the basic types String, Integer, etc.) is stored as a value in the
attribute or when the behavior or look in an AttributeEditor
should be modified by a custom renderer or editor.
These methods are used to define the look and feel of the
CustomAttribute when used in an AttributeEditor:
CustomAttributeEditor getEditor()CustomAttributeRenderer getRenderer()boolean useDefaultEditor()
These methods define how to serialize and rebuild instances of a
concrete CustomAttribute implementation:
String getStringRepresentation()String getGeneratorKey()
| Method Summary | |
CustomAttributeEditor |
getEditor()
Method getEditor returns an instance of a
CustomAttributeEditor which the
AttributeTree will use to allow users to edit this
attribute. |
java.lang.String |
getGeneratorKey()
Returns a String which will be used as key to retrieve the
generator for this CustomAttribute. |
CustomAttributeRenderer |
getRenderer()
Returns an instance of a CustomAttributeRenderer which
the AttributeTree uses to render values of this
attribute. |
java.lang.String |
getStringRepresentation()
Returns a String representation for the value of this
attribute, which will be used to create an instance
of this attribute via the CustomAttributeGenerator. |
java.lang.Object |
newValueInstance()
Deprecated. Not called anymore, use Attribute.cloneValue()
instead! |
void |
setName(java.lang.String name)
Deprecated. Not called anymore, attribute instances must not change their name after creation |
boolean |
useDefaultEditor()
If the CustomAttribute does not implement its own editor, it
can use the default editors if the value is one of the recognized types
(e.g. |
| Methods inherited from interface com.tensegrity.generic.attribute.Attribute |
clone, cloneValue, getName, getType, getValue, isMutable, setMutable, setValue |
| Methods inherited from interface com.tensegrity.generic.constraint.Restrictable |
getConstraint, setConstraint |
| Method Detail |
public CustomAttributeEditor getEditor()
getEditor returns an instance of a
CustomAttributeEditor which the
AttributeTree will use to allow users to edit this
attribute. The method returns null if no such editor exists
and the attribute is not editable or the default editor should be used.
CustomAttributeEditor for this attribute.public boolean useDefaultEditor()
CustomAttribute does not implement its own editor, it
can use the default editors if the value is one of the recognized types
(e.g. String, Integer, etc.)
getEditor() returns nullpublic CustomAttributeRenderer getRenderer()
CustomAttributeRenderer which
the AttributeTree uses to render values of this
attribute. The method returns null if no such renderer
exists and the default renderer should be used. A renderer is required
if the Attribute cannot be rendered by the
standard renderer of the Table.
CustomAttributeRenderer for this attribute.public java.lang.String getStringRepresentation()
String representation for the value of this
attribute, which will be used to create an instance
of this attribute via the CustomAttributeGenerator.
String representation of this attribute.public java.lang.String getGeneratorKey()
String which will be used as key to retrieve the
generator for this CustomAttribute. Applications should use
this key to provide a registry-alike mechanism to obtain generators.
String usable as a key for this attribute.public java.lang.Object newValueInstance()
Attribute.cloneValue()
instead!
CustomAttribute. This is needed when instances of this
Attribute need to be added and an instance of the value part is required.
Object for the value part of this attribute.public void setName(java.lang.String name)
name - String for the new name.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||