gishur.graph.gui
Class GraphElementPropertyExistsAdapter

java.lang.Object
  |
  +--gishur.gui2.SourcePropertyAdapter
        |
        +--gishur.graph.gui.GraphElementPropertyAdapter
              |
              +--gishur.graph.gui.GraphElementPropertyExistsAdapter

public class GraphElementPropertyExistsAdapter
extends GraphElementPropertyAdapter

An adapter based on SourcePropertyAdapter, that returns object values dependend on the existence of a GraphElement property

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
GraphElementPropertyExistsAdapter(java.lang.String propertyname, java.lang.Object yes, java.lang.Object no)
          Constructor.
 
Method Summary
 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 gishur.graph.gui.GraphElementPropertyAdapter
propertyName, setPropertyName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphElementPropertyExistsAdapter

public GraphElementPropertyExistsAdapter(java.lang.String propertyname,
                                         java.lang.Object yes,
                                         java.lang.Object no)
Constructor.
Parameters:
propertyname - the name of the connected property at the GraphElement.
yes - the object returned, if the property exists
no - the object returned, if the property not exists
Method Detail

getProperty

public 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).
Overrides:
getProperty in class GraphElementPropertyAdapter
Parameters:
key - the property name
source - the source object to use
prop - the PropertyStatusReader
Returns:
property value