From 29045d17f46b4cad3b8b01215678803fed0e707d Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 4 Nov 2008 09:16:40 +0000 Subject: [PATCH] bugfix for transfer of user defined colourscheme from applet to application via jnlp launch --- src/jalview/schemes/ColourSchemeProperty.java | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) 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)); } -- 1.7.10.2