X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Ffr%2Forsay%2Flri%2Fvarna%2Fapplications%2FnewGUI%2FWatcher.java;fp=src2%2Ffr%2Forsay%2Flri%2Fvarna%2Fapplications%2FnewGUI%2FWatcher.java;h=563b5a95f8dc0282d363a243b691e9a8c78bfc8a;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=0000000000000000000000000000000000000000;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src2/fr/orsay/lri/varna/applications/newGUI/Watcher.java b/src2/fr/orsay/lri/varna/applications/newGUI/Watcher.java new file mode 100644 index 0000000..563b5a9 --- /dev/null +++ b/src2/fr/orsay/lri/varna/applications/newGUI/Watcher.java @@ -0,0 +1,47 @@ +package fr.orsay.lri.varna.applications.newGUI; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; + +import fr.orsay.lri.varna.models.rna.Mapping; +import fr.orsay.lri.varna.models.rna.RNA; + + +public class Watcher extends Thread { + + private VARNAGUITreeModel _model; + private boolean _terminated = false; + + public Watcher(VARNAGUITreeModel model) + { + _model = model; + } + + public void run() { + while (!_terminated) + { + ArrayList folders = _model.getFolders(); + for (String path: folders) + { + _model.addFolder(path); + System.out.println("Watching ["+path+"]"); + } + try { + this.sleep(1000); + } catch (InterruptedException e) { + } + } + + } + + + + + + public void finish() + { + _terminated = true; + } + +}