From 27156beed73b8e97298a62ffe67691b6b683ec68 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 14 Jun 2006 10:15:39 +0000 Subject: [PATCH] parseAppletParam --- src/jalview/appletgui/AlignViewport.java | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index 152966e..cd6515e 100755 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -141,14 +141,34 @@ public class AlignViewport updateConservation(); updateConsensus(); - if (applet != null && applet.getParameter("defaultColour") != null) + + if (applet != null) { - globalColourScheme = ColourSchemeProperty.getColour(alignment, - applet.getParameter("defaultColour")); - if (globalColourScheme != null) + String colour = applet.getParameter("defaultColour"); + + if(colour == null) + { + colour = applet.getParameter("userDefinedColour"); + if(colour !=null) + colour = "User Defined"; + } + + if(colour != null) + { + globalColourScheme = ColourSchemeProperty.getColour(alignment, colour); + if (globalColourScheme != null) + { + globalColourScheme.setConsensus(vconsensus); + } + } + + if(applet.getParameter("userDefinedColour")!=null) { - globalColourScheme.setConsensus(vconsensus); + ((UserColourScheme)globalColourScheme).parseAppletParameter( + applet.getParameter("userDefinedColour")); } + + } } -- 1.7.10.2