|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.presentation.PropertyRenderer
public class PropertyRenderer
This is a *very* generic tool for displaying object state.
The PropertyRenderer represents the first class "field" (property)
object, such as "age" of a person. In this role IPresentationSupport
is implemented, so that you can ask for a label for this field, for example
for display in a table.
In the role IPresentationHandler, the real value of the field within
an object can be queried.
| Field Summary |
|---|
| Fields inherited from interface de.intarsys.tools.presentation.IPresentationSupport |
|---|
ATTR_DESCRIPTION, ATTR_ICON, ATTR_LABEL, ATTR_TIP |
| Constructor Summary | |
|---|---|
PropertyRenderer(String name,
String label)
|
|
PropertyRenderer(String name,
String label,
Format format)
|
|
| Method Summary | |
|---|---|
IPresentationSupport |
createPresentationSupport(Object object)
Create a IPresentationSupport instance that can be used to
present object. |
String |
getDescription()
A long, descriptive string representation. |
String |
getDescription(Object object)
A long, descriptive string representation. |
IPresentationSupport |
getFieldPresentation()
|
Format |
getFormat()
|
String |
getIconName()
A name for an icon. |
String |
getIconName(Object object)
A name for an icon. |
String |
getLabel()
A short string representation (suitable for example for use with an icon or menu item). |
String |
getLabel(Object object)
A short string representation (suitable for example for use with an icon or menu item). |
String |
getName()
|
String |
getTip()
An "intermediate" length description (suitable for example with a tooltip). |
String |
getTip(Object object)
An "intermediate" length description (suitable for example with a tooltip). |
Object |
getValue(Object object)
Make a reflective read access to the field represented by this within the receiver. |
IPresentationSupport |
getValuePresentation(Object object)
|
void |
setFormat(Format format)
|
Object |
setValue(Object receiver,
Object value)
Make a reflective write access to the field represented by this within receiver. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyRenderer(String name,
String label)
public PropertyRenderer(String name,
String label,
Format format)
| Method Detail |
|---|
public IPresentationSupport createPresentationSupport(Object object)
IPresentationSupportFactoryIPresentationSupport instance that can be used to
present object.
createPresentationSupport in interface IPresentationSupportFactoryobject - The object to be presented.
IPresentationSupport instance that can be used
to present object.public String getDescription()
IPresentationSupport
getDescription in interface IPresentationSupportpublic String getDescription(Object object)
IPresentationHandler
getDescription in interface IPresentationHandlerpublic IPresentationSupport getFieldPresentation()
public Format getFormat()
public String getIconName()
IPresentationSupport
getIconName in interface IPresentationSupportpublic String getIconName(Object object)
IPresentationHandler
getIconName in interface IPresentationHandlerpublic String getLabel()
IPresentationSupport
getLabel in interface IPresentationSupportpublic String getLabel(Object object)
IPresentationHandler
getLabel in interface IPresentationHandlerpublic String getName()
public String getTip()
IPresentationSupport
getTip in interface IPresentationSupportpublic String getTip(Object object)
IPresentationHandler
getTip in interface IPresentationHandler
public Object getValue(Object object)
throws FieldAccessException
IFieldHandlerreceiver.
getValue in interface IFieldHandlerobject - The object hosting the field.
FieldAccessExceptionpublic IPresentationSupport getValuePresentation(Object object)
public void setFormat(Format format)
public Object setValue(Object receiver,
Object value)
throws FieldAccessException
IFieldHandlerreceiver.
setValue in interface IFieldHandlerreceiver - The object hosting the field.value - The new value for the field
FieldAccessException
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||