JAL-2316 Adjusted unit tests. Tidied UrlLinkProviderI interface.
[jalview.git] / src / jalview / gui / Preferences.java
index 7a24aeb..d129898 100755 (executable)
@@ -34,6 +34,7 @@ import jalview.urls.UrlProvider;
 import jalview.urls.UrlProviderI;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
+import jalview.util.UrlConstants;
 import jalview.ws.sifts.SiftsSettings;
 
 import java.awt.BorderLayout;
@@ -127,16 +128,9 @@ public class Preferences extends GPreferences
   static
   {
     String string = Cache.getDefault("SEQUENCE_LINKS",
-            UrlProviderI.DEFAULT_STRING);
-    sequenceUrlLinks = new UrlProvider(UrlProviderI.DEFAULT_LABEL, string);
-
-    List<String> colNames = new ArrayList<String>();
-    // colNames.add("ID");
-    // TODO KM add to properties file
-    colNames.add("URL");
-    colNames.add("In Menu");
-    colNames.add("Default");
-    dataModel = new UrlLinkTableModel(sequenceUrlLinks, colNames, "ID");
+            UrlConstants.DEFAULT_STRING);
+    sequenceUrlLinks = new UrlProvider(UrlConstants.DEFAULT_LABEL, string);
+    dataModel = new UrlLinkTableModel(sequenceUrlLinks);
 
     /**
      * TODO: reformulate groupURL encoding so two or more can be stored in the
@@ -828,7 +822,6 @@ public class Preferences extends GPreferences
   @Override
   public void newLink_actionPerformed(ActionEvent e)
   {
-
     GSequenceLink link = new GSequenceLink();
     boolean valid = false;
     while (!valid)
@@ -873,14 +866,12 @@ public class Preferences extends GPreferences
     boolean valid = false;
     while (!valid)
     {
-
       if (JOptionPane.showInternalConfirmDialog(Desktop.desktop, link,
               MessageManager.getString("label.new_sequence_url_link"),
               JOptionPane.OK_CANCEL_OPTION, -1, null) == JOptionPane.OK_OPTION)
       {
         if (link.checkValid())
         {
-
           linkUrlTable.setValueAt(link.getName(), index, 0);
           linkUrlTable.setValueAt(link.getURL(), index, 1);
           valid = true;