gishur.gui2
Class SourcePropertyAdapter

java.lang.Object
  |
  +--gishur.gui2.SourcePropertyAdapter
Direct Known Subclasses:
FlowAdapter, GraphElementPropertyAdapter, ObjectAdapter, PropertyPropertyAdapter, SourceAdapter

public abstract class SourcePropertyAdapter
extends java.lang.Object

This class enables a more flexible way to extract properties: Store a SourcePropertyAdapter in the properties and the getProperty(java.lang.String, java.lang.Object, gishur.gui2.PropertyStatusReader) method of this class will be called every time, the property is requested. In addition, a source object may be given by (see PropertyStatusReader), in order to extract properties from another object (this must be given by the Painter or DisplayObject.

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
SourcePropertyAdapter()
           
 
Method Summary
abstract  java.lang.Object getProperty(java.lang.String key, java.lang.Object source, PropertyStatusReader prop)
          Returns a property value with a given key using the source-object (and perhaps the given PropertyStatusReader).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourcePropertyAdapter

public SourcePropertyAdapter()
Method Detail

getProperty

public abstract java.lang.Object getProperty(java.lang.String key,
                                             java.lang.Object source,
                                             PropertyStatusReader prop)
Returns a property value with a given key using the source-object (and perhaps the given PropertyStatusReader).
Parameters:
key - the property name
source - the source object to use
prop - the PropertyStatusReader
Returns:
property value