commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r424163 - in /jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder: FindEvent.java FindListener.java
Date Fri, 21 Jul 2006 04:09:44 GMT
Author: bayard
Date: Thu Jul 20 21:09:44 2006
New Revision: 424163

URL: http://svn.apache.org/viewvc?rev=424163&view=rev
Log:
Switched the event and listener objects to extend the java.util.EventObject and EventListener
classes as suggested by Niall in SANDBOX-157

Modified:
    jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindEvent.java
    jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindListener.java

Modified: jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindEvent.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindEvent.java?rev=424163&r1=424162&r2=424163&view=diff
==============================================================================
--- jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindEvent.java
(original)
+++ jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindEvent.java
Thu Jul 20 21:09:44 2006
@@ -16,6 +16,7 @@
 package org.apache.commons.finder;
 
 import java.io.File;
+import java.util.EventObject;
 
 /**
  * Event upon which notification is made to a FindListener.
@@ -24,7 +25,8 @@
  * Depending on the particular occasion, it may also contain 
  * a set of files or a file.
  */
-public class FindEvent {
+// TODO: Extend this to 3 subclasses to stop having 1 class with 3 types
+public class FindEvent extends EventObject {
 
     private File directory;
     private Finder finder;
@@ -33,12 +35,14 @@
     private String type;
 
     public FindEvent(Finder finder, String type, File directory) {
+        super(directory);
         this.finder = finder;
         this.directory = directory;
         this.type = type;
     }
     
     public FindEvent(Finder finder, String type, File directory, File file) {
+        super(file);
         this.finder = finder;
         this.directory = directory;
         this.file = file;
@@ -46,6 +50,7 @@
     }
     
     public FindEvent(Finder finder, String type, File directory, File[] files) {
+        super(files);
         this.finder = finder;
         this.directory = directory;
         this.files = files;

Modified: jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindListener.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindListener.java?rev=424163&r1=424162&r2=424163&view=diff
==============================================================================
--- jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindListener.java
(original)
+++ jakarta/commons/sandbox/finder/trunk/src/java/org/apache/commons/finder/FindListener.java
Thu Jul 20 21:09:44 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.commons.finder;
 
+import java.util.EventListener;
+
 /**
  * A listener interface that is called during the finder process.
  * 
@@ -22,7 +24,7 @@
  * @version $Id$
  * @since 1.1
  */
-public interface FindListener {
+public interface FindListener extends EventListener {
 
     /**
      * Listener event called when a directory is about to be examined.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message