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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 existsno
- the object returned, if the property not exists
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 namesource
- the source object to useprop
- the PropertyStatusReader
- Returns:
- property value