X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FFollowerColourScheme.java;h=2cfb072713f55a2b565a5a2d4d20d57b490df5d5;hb=5bf0d6b5cb67e66a38e82692c40426c21ba12593;hp=32e9316af337f255301a655f16ad482ae149daf7;hpb=0416a98d6da9e0fbe42a9676d4ef30c234cb7b12;p=jalview.git diff --git a/src/jalview/schemes/FollowerColourScheme.java b/src/jalview/schemes/FollowerColourScheme.java index 32e9316..2cfb072 100644 --- a/src/jalview/schemes/FollowerColourScheme.java +++ b/src/jalview/schemes/FollowerColourScheme.java @@ -1,18 +1,42 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.schemes; -import jalview.analysis.Conservation; +import jalview.api.AlignViewportI; +import jalview.datamodel.AnnotatedCollectionI; +import jalview.datamodel.SequenceCollectionI; +import jalview.datamodel.SequenceI; -import java.util.Hashtable; +import java.util.Map; /** * Colourscheme that takes its colours from some other colourscheme + * * @author jimp - * + * */ public class FollowerColourScheme extends ResidueColourScheme { - protected ColourSchemeI colourScheme; + private ColourSchemeI colourScheme; public ColourSchemeI getBaseColour() { @@ -20,30 +44,31 @@ public class FollowerColourScheme extends ResidueColourScheme } @Override - public void setConsensus(Hashtable[] consensus) + public String getSchemeName() { - if (colourScheme!=null) - { - colourScheme.setConsensus(consensus); - } + return "Follower"; } + /** + * Returns a new instance of this colour scheme with which the given data may + * be coloured + */ @Override - public void setConservation(Conservation cons) + public ColourSchemeI getInstance(AlignViewportI view, + AnnotatedCollectionI coll, + Map hrs) { - if (colourScheme!=null) - { - colourScheme.setConservation(cons); - } + return new FollowerColourScheme(); } - @Override - public void setConservationInc(int i) + protected ColourSchemeI getColourScheme() + { + return colourScheme; + } + + protected void setColourScheme(ColourSchemeI colourScheme) { - if (colourScheme!=null) - { - colourScheme.setConservationInc(i); - } + this.colourScheme = colourScheme; } }