git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2113 additions to embl_mapping.xml / data models / tests
[jalview.git]
/
src
/
jalview
/
ws
/
DBRefFetcher.java
diff --git
a/src/jalview/ws/DBRefFetcher.java
b/src/jalview/ws/DBRefFetcher.java
index
dff1b98
..
40c88c1
100644
(file)
--- a/
src/jalview/ws/DBRefFetcher.java
+++ b/
src/jalview/ws/DBRefFetcher.java
@@
-55,6
+55,13
@@
import uk.ac.ebi.picr.model.UPEntry;
*/
public class DBRefFetcher implements Runnable
{
*/
public class DBRefFetcher implements Runnable
{
+ public interface FetchFinishedListenerI
+ {
+ void finished();
+ }
+
+ private List<FetchFinishedListenerI> listeners;
+
SequenceI[] dataset;
IProgressIndicator progressWindow;
SequenceI[] dataset;
IProgressIndicator progressWindow;
@@
-86,10
+93,6
@@
public class DBRefFetcher implements Runnable
*/
private boolean trimDsSeqs = true;
*/
private boolean trimDsSeqs = true;
- public DBRefFetcher()
- {
- }
-
/**
* Creates a new DBRefFetcher object and fetches from the currently selected
* set of databases, if this is null then it fetches based on feature settings
/**
* Creates a new DBRefFetcher object and fetches from the currently selected
* set of databases, if this is null then it fetches based on feature settings
@@
-109,6
+112,7
@@
public class DBRefFetcher implements Runnable
IProgressIndicator progressIndicatorFrame,
DbSourceProxy[] sources, FeatureSettings featureSettings, boolean isNucleotide)
{
IProgressIndicator progressIndicatorFrame,
DbSourceProxy[] sources, FeatureSettings featureSettings, boolean isNucleotide)
{
+ listeners = new ArrayList<FetchFinishedListenerI>();
this.progressWindow = progressIndicatorFrame;
alseqs = new SequenceI[seqs.length];
SequenceI[] ds = new SequenceI[seqs.length];
this.progressWindow = progressIndicatorFrame;
alseqs = new SequenceI[seqs.length];
SequenceI[] ds = new SequenceI[seqs.length];
@@
-186,6
+190,16
@@
public class DBRefFetcher implements Runnable
}
/**
}
/**
+ * Add a listener to be notified when sequence fetching is complete
+ *
+ * @param l
+ */
+ public void addListener(FetchFinishedListenerI l)
+ {
+ listeners.add(l);
+ }
+
+ /**
* retrieve all the das sequence sources and add them to the list of db
* sources to retrieve from
*/
* retrieve all the das sequence sources and add them to the list of db
* sources to retrieve from
*/
@@
-473,12
+487,13
@@
public class DBRefFetcher implements Runnable
progressWindow.setProgressBar(
MessageManager.getString("label.dbref_search_completed"),
startTime);
progressWindow.setProgressBar(
MessageManager.getString("label.dbref_search_completed"),
startTime);
- // promptBeforeBlast();
-
}
}
+ for (FetchFinishedListenerI listener : listeners)
+ {
+ listener.finished();
+ }
running = false;
running = false;
-
}
/**
}
/**