org.beanfabrics
Class PathObservation

java.lang.Object
  extended by org.beanfabrics.AbstractBean
      extended by org.beanfabrics.PathObservation
All Implemented Interfaces:
Bean

public class PathObservation
extends AbstractBean

The PathObservation observes all presentation models that are nodes along a specified Path (using a specified presentation model as root node) and notifies any PropertyChangeListener whenever the target node reference changes.


Constructor Summary
PathObservation(PresentationModel rootNode, Path path)
          Creates a new PathObservation along the given Path starting at the given root node.
 
Method Summary
 Path getPath()
          Returns the path of this observation.
 PresentationModel getRootNode()
          Returns the root node.
 PresentationModel getTarget()
          Returns the target node specified by this observation's path relative to the root node.
 boolean hasTarget()
          Returns true if the target of this observation's path is not null.
 boolean isStarted()
          Returns true if this observation has been started.
protected  void setTarget(PresentationModel pModel)
           
 void start()
          Start this observation (again).
 void stop()
          Stops this observation.
 
Methods inherited from class org.beanfabrics.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, equals, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathObservation

public PathObservation(PresentationModel rootNode,
                       Path path)
Creates a new PathObservation along the given Path starting at the given root node.

Parameters:
rootNode -
path -
Method Detail

getPath

public Path getPath()
Returns the path of this observation.

Returns:
the path of this observation

getRootNode

public PresentationModel getRootNode()
Returns the root node.

Returns:
the root node

isStarted

public boolean isStarted()
Returns true if this observation has been started.

Returns:
true if this observation has been started

stop

public void stop()
Stops this observation.


start

public void start()
Start this observation (again).


hasTarget

public boolean hasTarget()
Returns true if the target of this observation's path is not null.

Returns:
true if the target of this observation's path is not null

getTarget

public PresentationModel getTarget()
Returns the target node specified by this observation's path relative to the root node.

Returns:
the target node specified by this observation's path relative to the root node

setTarget

protected void setTarget(PresentationModel pModel)