Merge develop to Release_2_8_3_Branch
[jalview.git] / src / jalview / api / AlignViewportI.java
index 6faa133..c49ee39 100644 (file)
@@ -40,7 +40,7 @@ import java.util.Map;
  * @author jimp
  * 
  */
-public interface AlignViewportI
+public interface AlignViewportI extends ViewStyleI
 {
 
   int getCharWidth();
@@ -75,11 +75,16 @@ public interface AlignViewportI
 
   Hashtable[] getSequenceConsensusHash();
 
-  Hashtable[] getRnaStructureConsensusHash();
+  /**
+   * Get consensus data table for the cDNA complement of this alignment (if any)
+   * 
+   * @return
+   */
+  Hashtable[] getComplementConsensusHash();
 
-  boolean getIgnoreGapsConsensus();
+  Hashtable[] getRnaStructureConsensusHash();
 
-  boolean getCentreColumnLabels();
+  boolean isIgnoreGapsConsensus();
 
   boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
 
@@ -95,6 +100,13 @@ public interface AlignViewportI
   AlignmentAnnotation getAlignmentConsensusAnnotation();
 
   /**
+   * get the container for cDNA complement consensus annotation
+   * 
+   * @return
+   */
+  AlignmentAnnotation getComplementConsensusAnnotation();
+
+  /**
    * Test to see if viewport is still open and active
    * 
    * @return true indicates that all references to viewport should be dropped
@@ -122,6 +134,13 @@ public interface AlignViewportI
   void setSequenceConsensusHash(Hashtable[] hconsensus);
 
   /**
+   * Set the cDNA complement consensus for the viewport
+   * 
+   * @param hconsensus
+   */
+  void setComplementConsensusHash(Hashtable[] hconsensus);
+
+  /**
    * 
    * @return the alignment annotatino row for the structure consensus
    *         calculation
@@ -320,10 +339,9 @@ public interface AlignViewportI
    *          first column (inclusive, from 0)
    * @param max
    *          last column (exclusive)
-   * @return int[][] range of {start,end} visible positions TODO: change to list
-   *         of int ranges
+   * @return int[][] range of {start,end} visible positions
    */
-  int[][] getVisibleRegionBoundaries(int min, int max);
+  List<int[]> getVisibleRegionBoundaries(int min, int max);
 
   /**
    * This method returns an array of new SequenceI objects derived from the
@@ -354,4 +372,45 @@ public interface AlignViewportI
 
   boolean hasHiddenRows();
 
+  /**
+   * 
+   * @return a copy of this view's current display settings
+   */
+  public ViewStyleI getViewStyle();
+
+  /**
+   * update the view's display settings with the given style set
+   * 
+   * @param settingsForView
+   */
+  public void setViewStyle(ViewStyleI settingsForView);
+
+  /**
+   * Returns a viewport which holds the cDna for this (protein), or vice versa,
+   * or null if none is set.
+   * 
+   * @return
+   */
+  AlignViewportI getCodingComplement();
+
+  /**
+   * Sets the viewport which holds the cDna for this (protein), or vice versa.
+   * Implementation should guarantee that the reciprocal relationship is always
+   * set, i.e. each viewport is the complement of the other.
+   */
+  void setCodingComplement(AlignViewportI sl);
+
+  /**
+   * Answers true if viewport hosts DNA/RNA, else false.
+   * 
+   * @return
+   */
+  boolean isNucleotide();
+
+  /**
+   * Returns an id guaranteed to be unique for this viewport.
+   * 
+   * @return
+   */
+  String getViewId();
 }