net.wotonomy.control
Class EOObserverProxy

java.lang.Object
  extended by net.wotonomy.control.EODelayedObserver
      extended by net.wotonomy.control.EOObserverProxy
All Implemented Interfaces:
java.util.Observer, EOObserving

public class EOObserverProxy
extends EODelayedObserver

A convenience observer for objects that do not or cannot subclass EODelayedObserver. EOObserverProxy will invoke an NSSelector on an object when it receives a subjectChanged message.

Version:
$Revision: 893 $
Author:
michael@mpowers.net, $Author: cgruber $

Field Summary
protected  int priority
           
protected  net.wotonomy.foundation.NSSelector selector
           
protected  java.lang.Object target
           
 
Fields inherited from class net.wotonomy.control.EODelayedObserver
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird
 
Constructor Summary
EOObserverProxy(java.lang.Object anObject, net.wotonomy.foundation.NSSelector aSelector)
          Constructs an EODelayedObserver that will invoke the specified selector on the specified object, and will run at ObserverPriorityThird priority, which is the default.
EOObserverProxy(java.lang.Object anObject, net.wotonomy.foundation.NSSelector aSelector, int aPriority)
          Constructs an EODelayedObserver that will invoke the specified selector on the specified object, and will run at the specified priority.
 
Method Summary
 int priority()
          Returns the priority of this observer in the queue.
 void subjectChanged()
          Notifies observer that one or more objects that it is observing have changed.
 
Methods inherited from class net.wotonomy.control.EODelayedObserver
discardPendingNotification, objectWillChange, observerQueue, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected java.lang.Object target

selector

protected net.wotonomy.foundation.NSSelector selector

priority

protected int priority
Constructor Detail

EOObserverProxy

public EOObserverProxy(java.lang.Object anObject,
                       net.wotonomy.foundation.NSSelector aSelector,
                       int aPriority)
Constructs an EODelayedObserver that will invoke the specified selector on the specified object, and will run at the specified priority.


EOObserverProxy

public EOObserverProxy(java.lang.Object anObject,
                       net.wotonomy.foundation.NSSelector aSelector)
Constructs an EODelayedObserver that will invoke the specified selector on the specified object, and will run at ObserverPriorityThird priority, which is the default.

Method Detail

priority

public int priority()
Returns the priority of this observer in the queue. This implementation returns the priority specified in the constructor.

Overrides:
priority in class EODelayedObserver

subjectChanged

public void subjectChanged()
Notifies observer that one or more objects that it is observing have changed. The observer should check all objects it is observing for changes.

Specified by:
subjectChanged in class EODelayedObserver


Copyright © 2006 null. All Rights Reserved.