refactor to jalview.api methods
authorjprocter <Jim Procter>
Wed, 18 Aug 2010 10:11:41 +0000 (10:11 +0000)
committerjprocter <Jim Procter>
Wed, 18 Aug 2010 10:11:41 +0000 (10:11 +0000)
src/jalview/api/FeatureRenderer.java
src/jalview/appletgui/FeatureRenderer.java
src/jalview/appletgui/SequenceRenderer.java
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/SequenceRenderer.java

index 22b0a45..df8fe84 100644 (file)
@@ -17,4 +17,6 @@ public interface FeatureRenderer
 
   Color findFeatureColour(Color col, SequenceI sequenceI, int r);
 
+  void featuresAdded();
+
 }
index 50bb665..7cdc0e8 100755 (executable)
@@ -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();
index e8508b6..c127d1a 100755 (executable)
@@ -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;
 
index e4c6c5c..02ebc34 100755 (executable)
@@ -36,7 +36,7 @@ import jalview.schemes.GraduatedColor;
  * @author $author$
  * @version $Revision$
  */
-public class FeatureRenderer
+public class FeatureRenderer implements jalview.api.FeatureRenderer
 {
   AlignmentPanel ap;
 
index db66993..3043f0a 100755 (executable)
@@ -28,7 +28,7 @@ import jalview.schemes.*;
  * @author $author$
  * @version $Revision$
  */
-public class SequenceRenderer
+public class SequenceRenderer implements jalview.api.SequenceRenderer
 {
   AlignViewport av;