From: Jim Procter Date: Mon, 19 Nov 2018 18:06:31 +0000 (+0000) Subject: JAL-3127 javadoc, don’t darken white when shading residues, and don’t need to hold... X-Git-Tag: Release_2_11_0~17^2~46^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b71733cda46c5a88cb65417501727f2e4b4cf135;p=jalview.git JAL-3127 javadoc, don’t darken white when shading residues, and don’t need to hold reference to group --- diff --git a/src/jalview/schemes/IdColourScheme.java b/src/jalview/schemes/IdColourScheme.java index 65dbcc9..5add470 100644 --- a/src/jalview/schemes/IdColourScheme.java +++ b/src/jalview/schemes/IdColourScheme.java @@ -28,12 +28,17 @@ import jalview.datamodel.SequenceI; import java.awt.Color; import java.util.Map; +/** + * shade sequences using the colour shown in the ID panel. Useful to map + * sequence groupings onto residue data (eg tree subgroups visualised on + * structures or overview window) + * + * @author jprocter + */ public class IdColourScheme implements ColourSchemeI { AlignViewportI view = null; - AnnotatedCollectionI coll = null; - public IdColourScheme() { @@ -41,7 +46,6 @@ public class IdColourScheme implements ColourSchemeI public IdColourScheme(AlignViewportI view, AnnotatedCollectionI coll) { this.view = view; - this.coll = coll; } @@ -76,8 +80,12 @@ public class IdColourScheme implements ColourSchemeI // ((SequenceGroup)coll).idColour // we always return the sequence ID colour, in case the user has customised // the displayed Id colour by right-clicking an internal node in the tree. - return (view == null) ? Color.WHITE - : view.getSequenceColour(seq).darker(); + if (view == null) + { + return Color.WHITE; + } + Color col = view.getSequenceColour(seq); + return Color.WHITE.equals(col) ? Color.WHITE : col.darker(); } @Override @@ -95,7 +103,6 @@ public class IdColourScheme implements ColourSchemeI @Override public boolean isSimple() { - // this is really a sequence colour - return true; + return false; } }