From: gmungoc Date: Thu, 14 Apr 2016 11:17:28 +0000 (+0100) Subject: JAL-1421 type parameter added to some collections X-Git-Tag: Release_2_10_0~249^2~23 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=39d2bb916a37d0530b77c5d6d8bed98272069759;p=jalview.git JAL-1421 type parameter added to some collections --- diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index c7e1332..6b2d3c4 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -30,6 +30,7 @@ import jalview.jbgui.GPreferences; import jalview.jbgui.GSequenceLink; import jalview.schemes.ColourSchemeProperty; import jalview.util.MessageManager; +import jalview.util.Platform; import jalview.ws.sifts.SiftsSettings; import java.awt.BorderLayout; @@ -40,7 +41,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.io.File; -import java.util.Collection; +import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import java.util.Vector; @@ -96,7 +97,7 @@ public class Preferences extends GPreferences * Holds name and link separated with | character. Sequence ID must be * $SEQUENCE_ID$ or $SEQUENCE_ID=/.possible | chars ./=$ */ - public static Vector sequenceURLLinks; + public static Vector sequenceURLLinks; /** * Holds name and link separated with | character. Sequence IDS and Sequences @@ -106,14 +107,14 @@ public class Preferences extends GPreferences * (TODO: proper escape for using | to separate ids or sequences */ - public static Vector groupURLLinks; + public static List groupURLLinks; static { String string = Cache .getDefault( "SEQUENCE_LINKS", "EMBL-EBI Search|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"); - sequenceURLLinks = new Vector(); + sequenceURLLinks = new Vector(); try { @@ -152,10 +153,10 @@ public class Preferences extends GPreferences * .properties file as '|' separated strings */ - groupURLLinks = new Vector(); + groupURLLinks = new ArrayList(); } - Vector nameLinks, urlLinks; + Vector nameLinks, urlLinks; JInternalFrame frame; @@ -176,7 +177,8 @@ public class Preferences extends GPreferences wsPrefs = new WsPreferences(); wsTab.add(wsPrefs, BorderLayout.CENTER); int width = 500, height = 450; - if (new jalview.util.Platform().isAMac()) + new jalview.util.Platform(); + if (Platform.isAMac()) { width = 570; height = 480; @@ -329,8 +331,8 @@ public class Preferences extends GPreferences /* * Set Connections tab defaults */ - nameLinks = new Vector(); - urlLinks = new Vector(); + nameLinks = new Vector(); + urlLinks = new Vector(); for (int i = 0; i < sequenceURLLinks.size(); i++) { String link = sequenceURLLinks.elementAt(i).toString(); @@ -533,7 +535,7 @@ public class Preferences extends GPreferences if (nameLinks.size() > 0) { StringBuffer links = new StringBuffer(); - sequenceURLLinks = new Vector(); + sequenceURLLinks = new Vector(); for (int i = 0; i < nameLinks.size(); i++) { sequenceURLLinks.addElement(nameLinks.elementAt(i) + "|" @@ -849,7 +851,7 @@ public class Preferences extends GPreferences super.showunconserved_actionPerformed(e); } - public static Collection getGroupURLLinks() + public static List getGroupURLLinks() { return groupURLLinks; }