X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Frenderer%2FResidueShaderI.java;fp=src%2Fjalview%2Frenderer%2FResidueShaderI.java;h=4d971717e910f19e198d88006b27934f2be6b227;hb=f063821ed0be9c1581af74643a1aa5798731af65;hp=0000000000000000000000000000000000000000;hpb=fd18e2c73cd015d4e38ad91da0e5d7532ff0ef42;p=jalview.git diff --git a/src/jalview/renderer/ResidueShaderI.java b/src/jalview/renderer/ResidueShaderI.java new file mode 100644 index 0000000..4d97171 --- /dev/null +++ b/src/jalview/renderer/ResidueShaderI.java @@ -0,0 +1,85 @@ +/* + * 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.renderer; + +import jalview.analysis.Conservation; +import jalview.datamodel.AnnotatedCollectionI; +import jalview.datamodel.ProfilesI; +import jalview.datamodel.SequenceCollectionI; +import jalview.datamodel.SequenceI; +import jalview.schemes.ColourSchemeI; + +import java.awt.Color; +import java.util.Map; + +public interface ResidueShaderI +{ + + public abstract void setConsensus(ProfilesI cons); + + public abstract boolean conservationApplied(); + + public abstract void setConservationApplied(boolean conservationApplied); + + public abstract void setConservation(Conservation cons); + + public abstract void alignmentChanged(AnnotatedCollectionI alignment, + Map hiddenReps); + + /** + * Sets the percentage consensus threshold value, and whether gaps are ignored + * in percentage identity calculation + * + * @param consensusThreshold + * @param ignoreGaps + */ + public abstract void setThreshold(int consensusThreshold, + boolean ignoreGaps); + + public abstract void setConservationInc(int i); + + public abstract int getConservationInc(); + + /** + * Get the percentage threshold for this colour scheme + * + * @return Returns the percentage threshold + */ + public abstract int getThreshold(); + + /** + * Returns the possibly context dependent colour for the given symbol at the + * aligned position in the given sequence. For example, the colour may depend + * on the symbol's relationship to the consensus residue for the column. + * + * @param symbol + * @param position + * @param seq + * @return + */ + public abstract Color findColour(char symbol, int position, + SequenceI seq); + + public abstract ColourSchemeI getColourScheme(); + + public abstract void setColourScheme(ColourSchemeI cs); + +} \ No newline at end of file