From: amwaterhouse Date: Wed, 14 Jun 2006 10:15:39 +0000 (+0000) Subject: parseAppletParam X-Git-Tag: Release_2_1~354 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=27156beed73b8e97298a62ffe67691b6b683ec68;p=jalview.git parseAppletParam --- 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")); } + + } }