X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FDasSourceBrowser.java;h=fc2b387d609d12ff8b5f6f83bd523b3b00dda751;hb=9d1a374a20f3e2e74b5cec5d12b569121d8adbe5;hp=01aa532f3c78638230593bc6bca98f387b709bdc;hpb=d2735d899ea977b635ca89378daa9ae16c5f55b9;p=jalview.git
diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java
index 01aa532..fc2b387 100755
--- a/src/jalview/gui/DasSourceBrowser.java
+++ b/src/jalview/gui/DasSourceBrowser.java
@@ -1,6 +1,6 @@
/*
* Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,10 +25,11 @@ import jalview.util.TableSorter;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
-import java.net.*;
-import org.biojava.services.das.registry.DasCoordinateSystem;
-import org.biojava.services.das.registry.DasSource;
+
+import org.biojava.dasobert.dasregistry.DasCoordinateSystem;
+import org.biojava.dasobert.dasregistry.DasSource;
+import org.biojava.dasobert.dasregistry.Das1Source;
import java.awt.BorderLayout;
public class DasSourceBrowser extends GDasSourceBrowser
@@ -40,19 +41,24 @@ public class DasSourceBrowser extends GDasSourceBrowser
Vector selectedSources;
+ String DEFAULT_REGISTRY = "http://das.sanger.ac.uk/registry/das1/sources/";
+
+ boolean loadingDasSources = false;
+
+
public DasSourceBrowser()
{
registryURL.setText(jalview.bin.Cache.getDefault("DAS_REGISTRY_URL",
- "http://servlet.sanger.ac.uk/dasregistry/services/das_registry") );
+ DEFAULT_REGISTRY) );
setSelectedFromProperties();
displayFullDetails(null);
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- capabilities.addListSelectionListener(this);
- coords1.addListSelectionListener(this);
- coords2.addListSelectionListener(this);
+ filter1.addListSelectionListener(this);
+ filter2.addListSelectionListener(this);
+ filter3.addListSelectionListener(this);
//Ask to be notified of selection changes.
ListSelectionModel rowSM = table.getSelectionModel();
@@ -60,10 +66,6 @@ public class DasSourceBrowser extends GDasSourceBrowser
{
public void valueChanged(ListSelectionEvent e)
{
- //Ignore extra messages.
- if (e.getValueIsAdjusting())
- return;
-
ListSelectionModel lsm = (ListSelectionModel) e.getSource();
if (!lsm.isSelectionEmpty())
{
@@ -83,15 +85,19 @@ public class DasSourceBrowser extends GDasSourceBrowser
}
});
- if(dasSources==null)
+ if(dasSources!=null)
{
- Thread worker = new Thread(this);
- worker.start();
- }
- else
- {
init();
- }
+ }
+ }
+
+ public void paintComponent(java.awt.Graphics g)
+ {
+ if (dasSources == null && !loadingDasSources)
+ {
+ Thread worker = new Thread(this);
+ worker.start();
+ }
}
void init()
@@ -212,7 +218,9 @@ public class DasSourceBrowser extends GDasSourceBrowser
text.append("Description: " +
dasSources[i].getDescription() + "
");
- if (dasSources[i].getHelperurl().length() > 0)
+
+ if (dasSources[i].getHelperurl()!=null
+ && dasSources[i].getHelperurl().length() > 0)
{
text.append("