From: jprocter Date: Wed, 18 Aug 2010 10:11:41 +0000 (+0000) Subject: refactor to jalview.api methods X-Git-Tag: Release_2_6~127 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1e1f9a1e1983144126974c77005dcab524051ae7;p=jalview.git refactor to jalview.api methods --- diff --git a/src/jalview/api/FeatureRenderer.java b/src/jalview/api/FeatureRenderer.java index 22b0a45..df8fe84 100644 --- a/src/jalview/api/FeatureRenderer.java +++ b/src/jalview/api/FeatureRenderer.java @@ -17,4 +17,6 @@ public interface FeatureRenderer Color findFeatureColour(Color col, SequenceI sequenceI, int r); + void featuresAdded(); + } diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java index 50bb665..7cdc0e8 100755 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -34,7 +34,7 @@ import jalview.schemes.GraduatedColor; * @author $author$ * @version $Revision$ */ -public class FeatureRenderer +public class FeatureRenderer implements jalview.api.FeatureRenderer { AlignViewport av; @@ -747,7 +747,19 @@ public class FeatureRenderer } Hashtable minmax = null; - + /** + * Called when alignment in associated view has new/modified features to + * discover and display. + * + */ + public void featuresAdded() + { + lastSeq = null; + findAllFeatures(); + } + /** + * find all features on the alignment + */ void findAllFeatures() { jalview.schemes.UserColourScheme ucs = new jalview.schemes.UserColourScheme(); diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index e8508b6..c127d1a 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -22,7 +22,7 @@ import java.awt.*; import jalview.datamodel.*; import jalview.schemes.*; -public class SequenceRenderer +public class SequenceRenderer implements jalview.api.SequenceRenderer { AlignViewport av; diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index e4c6c5c..02ebc34 100755 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -36,7 +36,7 @@ import jalview.schemes.GraduatedColor; * @author $author$ * @version $Revision$ */ -public class FeatureRenderer +public class FeatureRenderer implements jalview.api.FeatureRenderer { AlignmentPanel ap; diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index db66993..3043f0a 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -28,7 +28,7 @@ import jalview.schemes.*; * @author $author$ * @version $Revision$ */ -public class SequenceRenderer +public class SequenceRenderer implements jalview.api.SequenceRenderer { AlignViewport av;