intarsys runtime library

de.intarsys.tools.presentation
Class PropertyPresentationItem

java.lang.Object
  extended by de.intarsys.tools.presentation.PropertyPresentation
      extended by de.intarsys.tools.presentation.PropertyPresentationItem
All Implemented Interfaces:
IPresentationSupport, IValueHolder

public class PropertyPresentationItem
extends PropertyPresentation
implements IValueHolder

This is a *very* generic tool for displaying object state.

The PropertyPresentationItem represents a view on object state, such as the "age" property of a person in combination with its value.

The value can be both static (frozen) or dynamic (re-evaluation).

For both field and value part the IPresentationSupport can be requested.


Field Summary
 
Fields inherited from interface de.intarsys.tools.presentation.IPresentationSupport
ATTR_DESCRIPTION, ATTR_ICON, ATTR_LABEL, ATTR_TIP
 
Constructor Summary
PropertyPresentationItem(Object object, String name, String label)
           
PropertyPresentationItem(Object object, String name, String label, Format format)
           
PropertyPresentationItem(Object object, String name, String label, Object value, Format format)
           
PropertyPresentationItem(String label, Object value)
           
PropertyPresentationItem(String label, Object value, Format format)
           
 
Method Summary
 Object get()
          Dereference the IValueHolder.
 Format getFormat()
           
 String getName()
           
 String getValueDescription()
           
 String getValueIconName()
           
 String getValueLabel()
           
 IPresentationSupport getValuePresentation()
           
 String getValueTip()
           
 Object set(Object newValue)
          Assign a new value.
 void setFormat(Format format)
           
 
Methods inherited from class de.intarsys.tools.presentation.PropertyPresentation
getDescription, getFieldPresentation, getIconName, getLabel, getObject, getTip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyPresentationItem

public PropertyPresentationItem(Object object,
                                String name,
                                String label)

PropertyPresentationItem

public PropertyPresentationItem(Object object,
                                String name,
                                String label,
                                Format format)

PropertyPresentationItem

public PropertyPresentationItem(Object object,
                                String name,
                                String label,
                                Object value,
                                Format format)

PropertyPresentationItem

public PropertyPresentationItem(String label,
                                Object value)

PropertyPresentationItem

public PropertyPresentationItem(String label,
                                Object value,
                                Format format)
Method Detail

get

public Object get()
Description copied from interface: IValueHolder
Dereference the IValueHolder.

Specified by:
get in interface IValueHolder
Returns:
The referenced object.

getFormat

public Format getFormat()

getName

public String getName()

getValueDescription

public String getValueDescription()

getValueIconName

public String getValueIconName()

getValueLabel

public String getValueLabel()

getValuePresentation

public IPresentationSupport getValuePresentation()
Overrides:
getValuePresentation in class PropertyPresentation

getValueTip

public String getValueTip()

set

public Object set(Object newValue)
Description copied from interface: IValueHolder
Assign a new value.

Specified by:
set in interface IValueHolder
Returns:
The previous value (optional)

setFormat

public void setFormat(Format format)

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.