X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FDasSourceBrowser.java;h=e336d9a649615696069e791fe87ccb21a0876c95;hb=506d60f0e188723ddc91c26824b41ac7034df3fe;hp=807aa4b5cbc6b89b2ba36f526d66219dd6949085;hpb=60f2d6c034560415fd0139c8bc7df0c19cae1186;p=jalview.git
diff --git a/src/jalview/gui/DasSourceBrowser.java b/src/jalview/gui/DasSourceBrowser.java
index 807aa4b..e336d9a 100755
--- a/src/jalview/gui/DasSourceBrowser.java
+++ b/src/jalview/gui/DasSourceBrowser.java
@@ -1,17 +1,17 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
- *
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
+ * Copyright (C) 2008 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
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -30,8 +30,8 @@ import org.biojava.dasobert.dasregistry.*;
import jalview.jbgui.*;
import jalview.util.*;
-public class DasSourceBrowser
- extends GDasSourceBrowser implements Runnable, ListSelectionListener
+public class DasSourceBrowser extends GDasSourceBrowser implements
+ Runnable, ListSelectionListener
{
static DasSource[] dasSources = null;
@@ -39,17 +39,17 @@ public class DasSourceBrowser
Vector selectedSources;
- public static String DEFAULT_REGISTRY =
- "http://www.dasregistry.org/das1/sources/";
+ public static String DEFAULT_REGISTRY = "http://www.dasregistry.org/das1/sources/";
/**
* true if thread is running and we are talking to DAS registry service
*/
public boolean loadingDasSources = false;
+
protected static String getDasRegistryURL()
{
String registry = jalview.bin.Cache.getDefault("DAS_REGISTRY_URL",
- DEFAULT_REGISTRY);
+ DEFAULT_REGISTRY);
if (registry.indexOf("/registry/das1/sources/") > -1)
{
@@ -58,10 +58,11 @@ public class DasSourceBrowser
}
return registry;
}
+
public DasSourceBrowser()
{
String registry = getDasRegistryURL();
-
+
registryURL.setText(registry);
setSelectedFromProperties();
@@ -73,7 +74,7 @@ public class DasSourceBrowser
filter2.addListSelectionListener(this);
filter3.addListSelectionListener(this);
- //Ask to be notified of selection changes.
+ // Ask to be notified of selection changes.
ListSelectionModel rowSM = table.getSelectionModel();
rowSM.addListSelectionListener(new ListSelectionListener()
{
@@ -93,7 +94,7 @@ public class DasSourceBrowser
public void mouseClicked(MouseEvent evt)
{
if (evt.getClickCount() == 2
- || SwingUtilities.isRightMouseButton(evt))
+ || SwingUtilities.isRightMouseButton(evt))
{
editRemoveLocalSource(evt);
}
@@ -122,8 +123,8 @@ public class DasSourceBrowser
for (int i = 0; i < dSize; i++)
{
data[i][0] = dasSources[i].getNickname();
- data[i][1] = new Boolean(selectedSources.contains(dasSources[i].
- getNickname()));
+ data[i][1] = new Boolean(selectedSources.contains(dasSources[i]
+ .getNickname()));
}
refreshTableData(data);
@@ -156,13 +157,12 @@ public class DasSourceBrowser
{
StringBuffer text = new StringBuffer(
- "");
+ "");
if (nickName == null)
{
- fullDetails.setText(text +
- "Select a DAS service from the table"
- + " to read a full description here.");
+ fullDetails.setText(text + "Select a DAS service from the table"
+ + " to read a full description here.");
return;
}
@@ -176,26 +176,24 @@ public class DasSourceBrowser
DasSource ds = dasSources[i];
- text.append("Id: " + dasSources[i].getId() +
- "
");
- text.append("Nickname: " +
- dasSources[i].getNickname() + "
");
- text.append("URL: " + dasSources[i].getUrl() +
- "
");
+ text.append("Id: "
+ + dasSources[i].getId() + "
");
+ text.append("Nickname: "
+ + dasSources[i].getNickname() + "
");
+ text.append("URL: "
+ + dasSources[i].getUrl() + "
");
- text.append(
- "Admin Email: " + dasSources[i].getAdminemail() + "" +
- "
");
+ text
+ .append("Admin Email: "
+ + dasSources[i].getAdminemail() + "" + "
");
- text.append("Registered at: " +
- dasSources[i].getRegisterDate() +
- "
");
+ text.append("Registered at: "
+ + dasSources[i].getRegisterDate() + "
");
- text.append("Last successful test: " +
- dasSources[i].getLeaseDate() +
- "
");
+ text.append("Last successful test: "
+ + dasSources[i].getLeaseDate() + "
");
text.append("Labels: ");
for (int s = 0; s < dasSources[i].getLabels().length; s++)
@@ -226,7 +224,7 @@ public class DasSourceBrowser
for (int j = 0; j < dcs.length; j++)
{
text.append("(" + dcs[j].getUniqueId() + ") "
- + dcs[j].getCategory() + ", " + dcs[j].getName());
+ + dcs[j].getCategory() + ", " + dcs[j].getName());
if (dcs[j].getNCBITaxId() != 0)
{
text.append(", " + dcs[j].getNCBITaxId());
@@ -239,15 +237,15 @@ public class DasSourceBrowser
text.append("
");
}
- text.append("Description: " +
- dasSources[i].getDescription() + "
");
+ text.append("Description: "
+ + dasSources[i].getDescription() + "
");
if (dasSources[i].getHelperurl() != null
- && dasSources[i].getHelperurl().length() > 0)
+ && dasSources[i].getHelperurl().length() > 0)
{
- text.append("Go to site");
+ text.append("Go to site");
}
text.append("