From: jprocter Date: Tue, 4 Nov 2008 09:16:40 +0000 (+0000) Subject: bugfix for transfer of user defined colourscheme from applet to application via jnlp... X-Git-Tag: Jalview_2_4_0b2~47 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=29045d17f46b4cad3b8b01215678803fed0e707d;p=jalview.git bugfix for transfer of user defined colourscheme from applet to application via jnlp launch --- diff --git a/src/jalview/schemes/ColourSchemeProperty.java b/src/jalview/schemes/ColourSchemeProperty.java index 162ba46..6fc4e2b 100755 --- a/src/jalview/schemes/ColourSchemeProperty.java +++ b/src/jalview/schemes/ColourSchemeProperty.java @@ -311,16 +311,12 @@ public class ColourSchemeProperty } /** - * DOCUMENT ME! + * retrieve or create colourscheme associated with name * - * @param seqs - * DOCUMENT ME! - * @param width - * DOCUMENT ME! - * @param name - * DOCUMENT ME! - * - * @return DOCUMENT ME! + * @param seqs sequences to colour + * @param width range of sequences to colour + * @param name colourscheme name, applet colour parameter specification, or string to parse as colour for new coloursheme + * @return Valid Colourscheme */ public static ColourSchemeI getColour(java.util.Vector seqs, int width, String name) @@ -335,6 +331,16 @@ public class ColourSchemeProperty { // System.err.println("Ignoring unknown colourscheme name"); } + try { + // fix the launchApp user defined coloursheme transfer bug + jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme( + "white"); + ucs.parseAppletParameter(name); + + } catch (Exception e) + { + // System.err.println("Ignoring exception when parsing colourscheme as applet-parameter"); + } } return getColour(seqs, width, getColourIndexFromName(name)); }