summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
commit40a9d99496e098562f090fb7ffce9e749011b131 (patch)
tree437df24d65470582e943e494a52db8ed65a881ae /projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java
parentff072dfe782f6f22123cd4ba050828d35c0d0fbd (diff)
Formatting pass
Diffstat (limited to 'projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java')
-rw-r--r--projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java125
1 files changed, 54 insertions, 71 deletions
diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java
index e616a33..ce8c9a7 100644
--- a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java
+++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/control/EOObserverProxy.java
@@ -21,84 +21,67 @@ package net.wotonomy.control;
import net.wotonomy.foundation.NSSelector;
/**
-* 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.
-*
-* @author michael@mpowers.net
-* @author $Author: cgruber $
-* @version $Revision: 893 $
-*/
-public class EOObserverProxy
- extends EODelayedObserver
-{
- protected Object target;
- protected NSSelector selector;
- protected int priority;
-
- /**
- * Constructs an EODelayedObserver that will invoke the specified selector
- * on the specified object, and will run at the specified priority.
- */
- public EOObserverProxy (
- Object anObject, NSSelector aSelector, int aPriority )
- {
- target = anObject;
- selector = aSelector;
- priority = aPriority;
- }
+ * 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.
+ *
+ * @author michael@mpowers.net
+ * @author $Author: cgruber $
+ * @version $Revision: 893 $
+ */
+public class EOObserverProxy extends EODelayedObserver {
+ protected Object target;
+ protected NSSelector selector;
+ protected int priority;
- /**
- * Constructs an EODelayedObserver that will invoke the specified selector
- * on the specified object, and will run at ObserverPriorityThird priority,
- * which is the default.
- */
- public EOObserverProxy (
- Object anObject, NSSelector aSelector )
- {
- this( anObject, aSelector, ObserverPriorityThird );
- }
+ /**
+ * Constructs an EODelayedObserver that will invoke the specified selector on
+ * the specified object, and will run at the specified priority.
+ */
+ public EOObserverProxy(Object anObject, NSSelector aSelector, int aPriority) {
+ target = anObject;
+ selector = aSelector;
+ priority = aPriority;
+ }
- /**
- * Returns the priority of this observer in the queue.
- * This implementation returns the priority specified
- * in the constructor.
- */
- public int priority ()
- {
- return priority;
- }
+ /**
+ * Constructs an EODelayedObserver that will invoke the specified selector on
+ * the specified object, and will run at ObserverPriorityThird priority, which
+ * is the default.
+ */
+ public EOObserverProxy(Object anObject, NSSelector aSelector) {
+ this(anObject, aSelector, ObserverPriorityThird);
+ }
+
+ /**
+ * Returns the priority of this observer in the queue. This implementation
+ * returns the priority specified in the constructor.
+ */
+ public int priority() {
+ return priority;
+ }
+
+ /**
+ * Notifies observer that one or more objects that it is observing have changed.
+ * The observer should check all objects it is observing for changes.
+ */
+ public void subjectChanged() {
+ try {
+ selector.invoke(target);
+ } catch (Exception exc) {
+ System.out.println("Error notifying observer: ");
+ exc.printStackTrace();
+ }
+ }
- /**
- * Notifies observer that one or more objects that
- * it is observing have changed. The observer should
- * check all objects it is observing for changes.
- */
- public void subjectChanged ()
- {
- try
- {
- selector.invoke( target );
- }
- catch ( Exception exc )
- {
- System.out.println( "Error notifying observer: " );
- exc.printStackTrace();
- }
- }
-
}
/*
- * $Log$
- * Revision 1.1 2006/02/16 13:19:57 cgruber
- * Check in all sources in eclipse-friendly maven-enabled packages.
+ * $Log$ Revision 1.1 2006/02/16 13:19:57 cgruber Check in all sources in
+ * eclipse-friendly maven-enabled packages.
*
- * Revision 1.1 2001/10/22 21:55:32 mpowers
- * This turns out to be a really useful class.
+ * Revision 1.1 2001/10/22 21:55:32 mpowers This turns out to be a really useful
+ * class.
*
*
*/
-
-