/[svn]/jsampler/trunk/src/org/jsampler/LostFilesModel.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/LostFilesModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2287 by iliev, Tue Apr 29 22:22:40 2008 UTC revision 2288 by iliev, Wed Nov 23 21:19:44 2011 UTC
# Line 24  package org.jsampler; Line 24  package org.jsampler;
24    
25  import java.util.Vector;  import java.util.Vector;
26    
27  import javax.swing.event.ChangeEvent;  import net.sf.juife.event.GenericEvent;
28  import javax.swing.event.ChangeListener;  import net.sf.juife.event.GenericListener;
   
29  import net.sf.juife.event.TaskEvent;  import net.sf.juife.event.TaskEvent;
30  import net.sf.juife.event.TaskListener;  import net.sf.juife.event.TaskListener;
31    
# Line 38  import org.jsampler.task.InstrumentsDb.F Line 37  import org.jsampler.task.InstrumentsDb.F
37   */   */
38  public class LostFilesModel {  public class LostFilesModel {
39          private final Vector<String> lostFiles = new Vector<String>();          private final Vector<String> lostFiles = new Vector<String>();
40          private final Vector<ChangeListener> listeners = new Vector<ChangeListener>();          private final Vector<GenericListener> listeners = new Vector<GenericListener>();
41                    
42          /** Creates a new instance of <code>LostFilesModel</code> */          /** Creates a new instance of <code>LostFilesModel</code> */
43          public          public
# Line 47  public class LostFilesModel { Line 46  public class LostFilesModel {
46          /**          /**
47           * Registers the specified listener to be notified when the list           * Registers the specified listener to be notified when the list
48           * of lost files is updated.           * of lost files is updated.
49           * @param l The <code>ChangeListener</code> to register.           * @param l The <code>GenericListener</code> to register.
50           */           */
51          public void          public void
52          addChangeListener(ChangeListener l) { listeners.add(l); }          addChangeListener(GenericListener l) { listeners.add(l); }
53                    
54          /**          /**
55           * Removes the specified listener.           * Removes the specified listener.
56           * @param l The <code>ChangeListener</code> to remove.           * @param l The <code>GenericListener</code> to remove.
57           */           */
58          public void          public void
59          removeChangeListener(ChangeListener l) { listeners.remove(l); }          removeChangeListener(GenericListener l) { listeners.remove(l); }
60                    
61          /** Returns a list of all lost files. */          /** Returns a list of all lost files. */
62          public String[]          public String[]
# Line 105  public class LostFilesModel { Line 104  public class LostFilesModel {
104           */           */
105          private void          private void
106          fireLostFileListUpdated() {          fireLostFileListUpdated() {
107                  ChangeEvent e = new ChangeEvent(this);                  GenericEvent e = new GenericEvent(this);
108                  for(ChangeListener l : listeners) l.stateChanged(e);                  for(GenericListener l : listeners) l.jobDone(e);
109          }          }
110  }  }

Legend:
Removed from v.2287  
changed lines
  Added in v.2288

  ViewVC Help
Powered by ViewVC