X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=6c0e528e23dbbedcc3f3d21d789b8cfed35a4d24;hb=refs%2Fheads%2Fbug%2FJAL-3487-splash-JS;hp=7624d2c02ed4795cc3f11446244756a6bc6bdf0e;hpb=fbf6a124e2ffe81bcde747fda6f004748eb3b479;p=jalview.git diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 7624d2c..6c0e528 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -1612,7 +1612,7 @@ public class Sequence extends ASequence implements SequenceI _isNa = Comparison.isNucleotide(this); } return !_isNa; - }; + } /* * (non-Javadoc) @@ -1967,15 +1967,6 @@ public class Sequence extends ASequence implements SequenceI List result = getFeatures().findFeatures(startPos, endPos, types); - // if (datasetSequence != null) - // { - // result = datasetSequence.getFeatures().findFeatures(startPos, endPos, - // types); - // } - // else - // { - // result = sequenceFeatureStore.findFeatures(startPos, endPos, types); - // } /* * if end column is gapped, endPos may be to the right, @@ -2026,7 +2017,6 @@ public class Sequence extends ASequence implements SequenceI @Override public void sequenceChanged() { - argb = null; changeCount++; } @@ -2129,42 +2119,24 @@ public class Sequence extends ASequence implements SequenceI return 0; } - private int[] argb; - - @Override - public int getColor(int i) - { - return argb == null ? 0 : argb[i]; - } - - @Override - public int setColor(int i, int rgb) - { - if (argb == null) - { - argb = new int[this.sequence.length]; - } - return (argb[i] = rgb); - } - - @Override - public void resetColors() - { - argb = null; - } - /** - * @author Bob Hanson 2019.07.30 - * - * allows passing the result ArrayList as a parameter to avoid unnecessary construction - * + * Answers a (possibly empty) list of features of the specified type that + * overlap the specified column position. If parameter {@code result} is not + * null, features are appended to it and the (possibly extended) list is + * returned. */ @Override - public void findFeatures(int column, String type, + public List findFeatures(int column, String type, List result) { - getFeatures().findFeatures(findPosition(column - 1), type, result); + return getFeatures().findFeatures(findPosition(column - 1), type, + result); } + @Override + public boolean hasFeatures(String type) + { + return getFeatures().hasFeatures(type); + } }