org.beanfabrics
Class Observation

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

public class Observation
extends AbstractBean

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

Author:
Michael Karneim

Constructor Summary
Observation(PresentationModel rootNode, Path path)
          Creates a new Observation along the given Path starting at the given root node.
 
Method Summary
 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

Observation

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

Parameters:
rootNode -
path -
Method Detail

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)


© 2010 by Michael Karneim, http://www.beanfabrics.org