From: gmungoc Date: Mon, 5 Oct 2015 11:00:23 +0000 (+0100) Subject: JAL-1684 JAL-1452 new applet parameters defaultColourNuc X-Git-Tag: Release_2_10_0~372 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ce2fafc54fbec56f100776d81e26fa146ee7d7a1;p=jalview.git JAL-1684 JAL-1452 new applet parameters defaultColourNuc defaultColourProt, used in split frame applet example --- 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");