From ce2fafc54fbec56f100776d81e26fa146ee7d7a1 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 5 Oct 2015 12:00:23 +0100 Subject: [PATCH] JAL-1684 JAL-1452 new applet parameters defaultColourNuc defaultColourProt, used in split frame applet example --- examples/appletParameters.html | 8 ++++++++ examples/applets.html | 3 ++- src/jalview/appletgui/AlignViewport.java | 9 +++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/examples/appletParameters.html b/examples/appletParameters.html index 8daa4ee..1e45aae 100644 --- a/examples/appletParameters.html +++ b/examples/appletParameters.html @@ -118,6 +118,14 @@ the applet can be interacted with via its Default is no colour. + defaultColourNuc + A colour scheme (from the list above) to apply to Nucleotide alignmentsThis overrides defaultColour if it is specified. + + + defaultColourProt + A colour scheme (from the list above) to apply to Peptide alignmentsThis overrides defaultColour if it is specified. + + userDefinedColour

Example:
D,E=red; K,R,H=0022FF; c=yellow

diff --git a/examples/applets.html b/examples/applets.html index d811e94..34118b8 100644 --- a/examples/applets.html +++ b/examples/applets.html @@ -187,7 +187,8 @@ Try out JalviewLite by pressing one of the buttons below.
- + + diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index e434825..7ef2d59 100644 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -187,8 +187,13 @@ public class AlignViewport extends AlignmentViewport implements if (applet != null) { - String colour = applet.getParameter("defaultColour"); - + String colour = al.isNucleotide() ? applet + .getParameter("defaultColourNuc") : applet + .getParameter("defaultColourProt"); + if (colour == null) + { + colour = applet.getParameter("defaultColour"); + } if (colour == null) { colour = applet.getParameter("userDefinedColour"); -- 1.7.10.2