JAL-1640 separated style operations into a new ViewStyle databean (implements jalview...
authorJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 11:16:32 +0000 (11:16 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 11:16:32 +0000 (11:16 +0000)
src/jalview/api/ViewStyleI.java [new file with mode: 0644]
src/jalview/appletgui/AlignViewport.java
src/jalview/gui/AlignViewport.java
src/jalview/viewmodel/AlignmentViewport.java
src/jalview/viewmodel/styles/ViewStyle.java [new file with mode: 0644]

diff --git a/src/jalview/api/ViewStyleI.java b/src/jalview/api/ViewStyleI.java
new file mode 100644 (file)
index 0000000..baebd97
--- /dev/null
@@ -0,0 +1,138 @@
+package jalview.api;
+
+import java.awt.Color;
+
+public interface ViewStyleI
+{
+
+  void setColourAppliesToAllGroups(boolean b);
+
+  boolean getColourAppliesToAllGroups();
+
+  boolean getAbovePIDThreshold();
+
+  void setIncrement(int inc);
+
+  int getIncrement();
+
+  boolean getConservationSelected();
+
+  void setConservationSelected(boolean b);
+
+  void setShowHiddenMarkers(boolean show);
+
+  boolean getShowHiddenMarkers();
+
+  void setScaleRightWrapped(boolean b);
+
+  void setScaleLeftWrapped(boolean b);
+
+  void setScaleAboveWrapped(boolean b);
+
+  boolean getScaleLeftWrapped();
+
+  boolean getScaleAboveWrapped();
+
+  boolean getScaleRightWrapped();
+
+  void setAbovePIDThreshold(boolean b);
+
+  void setThreshold(int thresh);
+
+  int getThreshold();
+
+  boolean getShowJVSuffix();
+
+  void setShowJVSuffix(boolean b);
+
+  void setWrapAlignment(boolean state);
+
+  void setShowText(boolean state);
+
+  void setRenderGaps(boolean state);
+
+  boolean getColourText();
+
+  void setColourText(boolean state);
+
+  void setShowBoxes(boolean state);
+
+  boolean getWrapAlignment();
+
+  boolean getShowText();
+
+  int getWrappedWidth();
+
+  void setWrappedWidth(int w);
+
+  int getCharHeight();
+
+  void setCharHeight(int h);
+
+  int getCharWidth();
+
+  void setCharWidth(int w);
+
+  boolean getShowBoxes();
+
+  boolean getShowUnconserved();
+
+  void setShowUnconserved(boolean showunconserved);
+
+  boolean isDisplayReferenceSeq();
+
+  void setDisplayReferenceSeq(boolean displayReferenceSeq);
+
+  boolean isColourByReferenceSeq();
+
+  void setSeqNameItalics(boolean default1);
+
+  void setShowSequenceFeatures(boolean b);
+
+  boolean isShowSequenceFeatures();
+
+  boolean isRightAlignIds();
+
+  void setRightAlignIds(boolean rightAlignIds);
+
+  boolean isShowAnnotation();
+
+  void setShowAnnotation(boolean b);
+
+  void setShowSeqFeaturesHeight(boolean selected);
+
+  boolean isShowSequenceFeaturesHeight();
+
+  void setColourByReferenceSeq(boolean colourByReferenceSeq);
+
+  Color getTextColour();
+
+  Color getTextColour2();
+
+  int getThresholdTextColour();
+
+  boolean isConservationColourSelected();
+
+  boolean isRenderGaps();
+
+  boolean isShowColourText();
+
+  boolean isShowSeqFeaturesHeight();
+
+  void setConservationColourSelected(boolean conservationColourSelected);
+
+  void setShowColourText(boolean showColourText);
+
+  void setTextColour(Color textColour);
+
+  void setThresholdTextColour(int thresholdTextColour);
+
+  void setTextColour2(Color textColour2);
+
+  boolean isSeqNameItalics();
+
+  void setUpperCasebold(boolean upperCasebold);
+
+  boolean isUpperCasebold();
+
+}
index 84a62ae..156c517 100644 (file)
@@ -50,46 +50,12 @@ public class AlignViewport extends AlignmentViewport implements
 
   boolean cursorMode = false;
 
-  boolean showJVSuffix = true;
-
-  boolean showText = true;
-
-  boolean showColourText = false;
-
-  boolean showBoxes = true;
-
-  boolean wrapAlignment = false;
-
-  boolean renderGaps = true;
-
-  boolean showAnnotation = true;
-
-  boolean upperCasebold = false;
-
-  int charHeight;
-
-  int charWidth;
-
-  int wrappedWidth;
-
   Font font = new Font("SansSerif", Font.PLAIN, 10);
 
   boolean validCharWidth = true;
 
-  int threshold;
-
-  int increment;
-
   NJTree currentTree = null;
 
-  boolean scaleAboveWrapped = true;
-
-  boolean scaleLeftWrapped = true;
-
-  boolean scaleRightWrapped = true;
-
-  boolean showHiddenMarkers = true;
-
   public jalview.bin.JalviewLite applet;
 
   boolean MAC = false;
@@ -110,9 +76,10 @@ public class AlignViewport extends AlignmentViewport implements
 
   public AlignViewport(AlignmentI al, JalviewLite applet)
   {
+    super();
     calculator = new jalview.workers.AlignCalcManager();
     this.applet = applet;
-    setAlignment(al);
+    alignment = al;
     // we always pad gaps
     this.setPadGaps(true);
     this.startRes = 0;
@@ -175,10 +142,11 @@ public class AlignViewport extends AlignmentViewport implements
 
     if (applet != null)
     {
-      showJVSuffix = applet.getDefaultParameter("showFullId", showJVSuffix);
+      setShowJVSuffix(applet.getDefaultParameter("showFullId",
+              getShowJVSuffix()));
 
-      showAnnotation = applet.getDefaultParameter("showAnnotation",
-              showAnnotation);
+      setShowAnnotation(applet.getDefaultParameter("showAnnotation",
+              isShowAnnotation()));
 
       showConservation = applet.getDefaultParameter("showConservation",
               showConservation);
@@ -188,15 +156,15 @@ public class AlignViewport extends AlignmentViewport implements
       showConsensus = applet.getDefaultParameter("showConsensus",
               showConsensus);
 
-      showUnconserved = applet.getDefaultParameter("showUnconserved",
-              showUnconserved);
+      setShowUnconserved(applet.getDefaultParameter("showUnconserved",
+              getShowUnconserved()));
 
       String param = applet.getParameter("upperCase");
       if (param != null)
       {
         if (param.equalsIgnoreCase("bold"))
         {
-          upperCasebold = true;
+          setUpperCasebold(true);
         }
       }
       sortByTree = applet.getDefaultParameter("sortByTree", sortByTree);
@@ -368,13 +336,13 @@ public class AlignViewport extends AlignmentViewport implements
 
     java.awt.FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font);
     setCharHeight((int) (heightScale * fm.getHeight()));
-    charWidth = (int) (widthScale * fm.charWidth('M'));
+    setCharWidth((int) (widthScale * fm.charWidth('M')));
 
-    if (upperCasebold)
+    if (isUpperCasebold())
     {
       Font f2 = new Font(f.getName(), Font.BOLD, f.getSize());
       fm = nullFrame.getGraphics().getFontMetrics(f2);
-      charWidth = (int) (widthScale * (fm.stringWidth("MMMMMMMMMMM") / 10));
+      setCharWidth((int) (widthScale * (fm.stringWidth("MMMMMMMMMMM") / 10)));
     }
   }
 
@@ -383,98 +351,6 @@ public class AlignViewport extends AlignmentViewport implements
     return font;
   }
 
-  public int getCharWidth()
-  {
-    return charWidth;
-  }
-
-  public void setCharHeight(int h)
-  {
-    this.charHeight = h;
-  }
-
-  public int getCharHeight()
-  {
-    return charHeight;
-  }
-
-  public void setWrappedWidth(int w)
-  {
-    this.wrappedWidth = w;
-  }
-
-  public int getwrappedWidth()
-  {
-    return wrappedWidth;
-  }
-
-  public AlignmentI getAlignment()
-  {
-    return alignment;
-  }
-
-  public void setAlignment(AlignmentI align)
-  {
-    this.alignment = align;
-  }
-
-  public void setWrapAlignment(boolean state)
-  {
-    wrapAlignment = state;
-  }
-
-  public void setShowText(boolean state)
-  {
-    showText = state;
-  }
-
-  public void setRenderGaps(boolean state)
-  {
-    renderGaps = state;
-  }
-
-  public boolean getColourText()
-  {
-    return showColourText;
-  }
-
-  public void setColourText(boolean state)
-  {
-    showColourText = state;
-  }
-
-  public void setShowBoxes(boolean state)
-  {
-    showBoxes = state;
-  }
-
-  public boolean getWrapAlignment()
-  {
-    return wrapAlignment;
-  }
-
-  public boolean getShowText()
-  {
-    return showText;
-  }
-
-  public boolean getShowBoxes()
-  {
-    return showBoxes;
-  }
-
-  public char getGapCharacter()
-  {
-    return getAlignment().getGapCharacter();
-  }
-
-  public void setGapCharacter(char gap)
-  {
-    if (getAlignment() != null)
-    {
-      getAlignment().setGapCharacter(gap);
-    }
-  }
 
   public void resetSeqLimits(int height)
   {
@@ -491,77 +367,6 @@ public class AlignViewport extends AlignmentViewport implements
     return currentTree;
   }
 
-  public boolean getShowJVSuffix()
-  {
-    return showJVSuffix;
-  }
-
-  public void setShowJVSuffix(boolean b)
-  {
-    showJVSuffix = b;
-  }
-
-  public boolean getShowAnnotation()
-  {
-    return showAnnotation;
-  }
-
-  public void setShowAnnotation(boolean b)
-  {
-    showAnnotation = b;
-  }
-
-  public boolean getScaleAboveWrapped()
-  {
-    return scaleAboveWrapped;
-  }
-
-  public boolean getScaleLeftWrapped()
-  {
-    return scaleLeftWrapped;
-  }
-
-  public boolean getScaleRightWrapped()
-  {
-    return scaleRightWrapped;
-  }
-
-  public void setScaleAboveWrapped(boolean b)
-  {
-    scaleAboveWrapped = b;
-  }
-
-  public void setScaleLeftWrapped(boolean b)
-  {
-    scaleLeftWrapped = b;
-  }
-
-  public void setScaleRightWrapped(boolean b)
-  {
-    scaleRightWrapped = b;
-  }
-
-  public void setIgnoreGapsConsensus(boolean b)
-  {
-    ignoreGapsInConsensusCalculation = b;
-    updateConsensus(null);
-    if (globalColourScheme != null)
-    {
-      globalColourScheme.setThreshold(globalColourScheme.getThreshold(),
-              ignoreGapsInConsensusCalculation);
-
-    }
-  }
-
-  public boolean getShowHiddenMarkers()
-  {
-    return showHiddenMarkers;
-  }
-
-  public void setShowHiddenMarkers(boolean show)
-  {
-    showHiddenMarkers = show;
-  }
 
   boolean centreColumnLabels;
 
index 1c105d0..d6bfaf3 100644 (file)
@@ -57,7 +57,6 @@ import jalview.structure.VamsasSource;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.ws.params.AutoCalcSetting;
 
-import java.awt.Color;
 import java.awt.Container;
 import java.awt.Font;
 import java.awt.Rectangle;
@@ -83,42 +82,13 @@ public class AlignViewport extends AlignmentViewport implements
 
   int endSeq;
 
-  boolean showJVSuffix = true;
-
-  boolean showText = true;
-
-  boolean showColourText = false;
-
-  boolean showBoxes = true;
-
-  boolean wrapAlignment = false;
-
-  boolean renderGaps = true;
 
   SequenceAnnotationOrder sortAnnotationsBy = null;
 
-  int charHeight;
-
-  int charWidth;
-
-  boolean validCharWidth;
-
-  int wrappedWidth;
-
   Font font;
 
-  boolean seqNameItalics;
-
   NJTree currentTree = null;
 
-  boolean scaleAboveWrapped = false;
-
-  boolean scaleLeftWrapped = true;
-
-  boolean scaleRightWrapped = true;
-
-  boolean showHiddenMarkers = true;
-
   boolean cursorMode = false;
 
   boolean antiAlias = false;
@@ -133,12 +103,6 @@ public class AlignViewport extends AlignmentViewport implements
 
   Stack<CommandI> redoList = new Stack<CommandI>();
 
-  int thresholdTextColour = 0;
-
-  Color textColour = Color.black;
-
-  Color textColour2 = Color.white;
-
   private AnnotationColumnChooser annotationColumnSelectionState;
   /**
    * Creates a new AlignViewport object.
@@ -247,16 +211,11 @@ public class AlignViewport extends AlignmentViewport implements
     init();
   }
 
-  void init()
+  private void applyViewProperties()
   {
-    this.startRes = 0;
-    this.endRes = alignment.getWidth() - 1;
-    this.startSeq = 0;
-    this.endSeq = alignment.getHeight() - 1;
-
     antiAlias = Cache.getDefault("ANTI_ALIAS", false);
 
-    showJVSuffix = Cache.getDefault("SHOW_JVSUFFIX", true);
+    viewStyle.setShowJVSuffix(Cache.getDefault("SHOW_JVSUFFIX", true));
     setShowAnnotation(Cache.getDefault("SHOW_ANNOTATIONS", true));
 
     setRightAlignIds(Cache.getDefault("RIGHT_ALIGN_IDS", false));
@@ -266,13 +225,32 @@ public class AlignViewport extends AlignmentViewport implements
     setPadGaps(Cache.getDefault("PAD_GAPS", true));
     shownpfeats = Cache.getDefault("SHOW_NPFEATS_TOOLTIP", true);
     showdbrefs = Cache.getDefault("SHOW_DBREFS_TOOLTIP", true);
+    viewStyle.setSeqNameItalics(Cache.getDefault("ID_ITALICS", true));
+    viewStyle.setWrapAlignment(Cache.getDefault("WRAP_ALIGNMENT", false));
+    viewStyle.setShowUnconserved(Cache
+            .getDefault("SHOW_UNCONSERVED", false));
+    sortByTree = Cache.getDefault("SORT_BY_TREE", false);
+    followSelection = Cache.getDefault("FOLLOW_SELECTIONS", true);
+    sortAnnotationsBy = SequenceAnnotationOrder.valueOf(Cache.getDefault(
+            Preferences.SORT_ANNOTATIONS,
+            SequenceAnnotationOrder.NONE.name()));
+    showAutocalculatedAbove = Cache.getDefault(
+            Preferences.SHOW_AUTOCALC_ABOVE, false);
+
+  }
+
+  void init()
+  {
+    this.startRes = 0;
+    this.endRes = alignment.getWidth() - 1;
+    this.startSeq = 0;
+    this.endSeq = alignment.getHeight() - 1;
+    applyViewProperties();
 
     String fontName = Cache.getDefault("FONT_NAME", "SansSerif");
     String fontStyle = Cache.getDefault("FONT_STYLE", Font.PLAIN + "");
     String fontSize = Cache.getDefault("FONT_SIZE", "10");
 
-    seqNameItalics = Cache.getDefault("ID_ITALICS", true);
-
     int style = 0;
 
     if (fontStyle.equals("bold"))
@@ -326,16 +304,6 @@ public class AlignViewport extends AlignmentViewport implements
         globalColourScheme.setConsensus(hconsensus);
       }
     }
-
-    wrapAlignment = Cache.getDefault("WRAP_ALIGNMENT", false);
-    showUnconserved = Cache.getDefault("SHOW_UNCONSERVED", false);
-    sortByTree = Cache.getDefault("SORT_BY_TREE", false);
-    followSelection = Cache.getDefault("FOLLOW_SELECTIONS", true);
-    sortAnnotationsBy = SequenceAnnotationOrder.valueOf(Cache.getDefault(
-            Preferences.SORT_ANNOTATIONS,
-            SequenceAnnotationOrder.NONE.name()));
-    showAutocalculatedAbove = Cache.getDefault(
-            Preferences.SHOW_AUTOCALC_ABOVE, false);
   }
 
   /**
@@ -494,6 +462,8 @@ public class AlignViewport extends AlignmentViewport implements
     return endSeq;
   }
 
+  boolean validCharWidth;
+
   /**
    * DOCUMENT ME!
    * 
@@ -525,79 +495,6 @@ public class AlignViewport extends AlignmentViewport implements
   /**
    * DOCUMENT ME!
    * 
-   * @param w
-   *          DOCUMENT ME!
-   */
-  public void setCharWidth(int w)
-  {
-    this.charWidth = w;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public int getCharWidth()
-  {
-    return charWidth;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param h
-   *          DOCUMENT ME!
-   */
-  public void setCharHeight(int h)
-  {
-    this.charHeight = h;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public int getCharHeight()
-  {
-    return charHeight;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param w
-   *          DOCUMENT ME!
-   */
-  public void setWrappedWidth(int w)
-  {
-    this.wrappedWidth = w;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public int getWrappedWidth()
-  {
-    return wrappedWidth;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public AlignmentI getAlignment()
-  {
-    return alignment;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
    * @param align
    *          DOCUMENT ME!
    */
@@ -619,101 +516,6 @@ public class AlignViewport extends AlignmentViewport implements
   /**
    * DOCUMENT ME!
    * 
-   * @param state
-   *          DOCUMENT ME!
-   */
-  public void setWrapAlignment(boolean state)
-  {
-    wrapAlignment = state;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param state
-   *          DOCUMENT ME!
-   */
-  public void setShowText(boolean state)
-  {
-    showText = state;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param state
-   *          DOCUMENT ME!
-   */
-  public void setRenderGaps(boolean state)
-  {
-    renderGaps = state;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getColourText()
-  {
-    return showColourText;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param state
-   *          DOCUMENT ME!
-   */
-  public void setColourText(boolean state)
-  {
-    showColourText = state;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param state
-   *          DOCUMENT ME!
-   */
-  public void setShowBoxes(boolean state)
-  {
-    showBoxes = state;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getWrapAlignment()
-  {
-    return wrapAlignment;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getShowText()
-  {
-    return showText;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getShowBoxes()
-  {
-    return showBoxes;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
    * @return DOCUMENT ME!
    */
   public char getGapCharacter()
@@ -767,110 +569,6 @@ public class AlignViewport extends AlignmentViewport implements
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getShowJVSuffix()
-  {
-    return showJVSuffix;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param b
-   *          DOCUMENT ME!
-   */
-  public void setShowJVSuffix(boolean b)
-  {
-    showJVSuffix = b;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getScaleAboveWrapped()
-  {
-    return scaleAboveWrapped;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getScaleLeftWrapped()
-  {
-    return scaleLeftWrapped;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
-   */
-  public boolean getScaleRightWrapped()
-  {
-    return scaleRightWrapped;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param b
-   *          DOCUMENT ME!
-   */
-  public void setScaleAboveWrapped(boolean b)
-  {
-    scaleAboveWrapped = b;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param b
-   *          DOCUMENT ME!
-   */
-  public void setScaleLeftWrapped(boolean b)
-  {
-    scaleLeftWrapped = b;
-  }
-
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param b
-   *          DOCUMENT ME!
-   */
-  public void setScaleRightWrapped(boolean b)
-  {
-    scaleRightWrapped = b;
-  }
-
-  public void setDataset(boolean b)
-  {
-    isDataset = b;
-  }
-
-  public boolean isDataset()
-  {
-    return isDataset;
-  }
-
-  public boolean getShowHiddenMarkers()
-  {
-    return showHiddenMarkers;
-  }
-
-  public void setShowHiddenMarkers(boolean show)
-  {
-    showHiddenMarkers = show;
-  }
-
-  /**
    * returns the visible column regions of the alignment
    * 
    * @param selectedRegionOnly
index 08b31fa..e8f1303 100644 (file)
@@ -25,6 +25,7 @@ import jalview.api.AlignCalcManagerI;
 import jalview.api.AlignViewportI;
 import jalview.api.AlignmentViewPanel;
 import jalview.api.FeaturesDisplayedI;
+import jalview.api.ViewStyleI;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
@@ -38,6 +39,7 @@ import jalview.schemes.Blosum62ColourScheme;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.PIDColourScheme;
 import jalview.schemes.ResidueProperties;
+import jalview.viewmodel.styles.ViewStyle;
 import jalview.workers.AlignCalcManager;
 import jalview.workers.ConsensusThread;
 import jalview.workers.StrucConsensusThread;
@@ -57,151 +59,429 @@ import java.util.Vector;
  * @author jimp
  * 
  */
-public abstract class AlignmentViewport implements AlignViewportI
+public abstract class AlignmentViewport implements AlignViewportI,
+        ViewStyleI
 {
+  protected ViewStyleI viewStyle = new ViewStyle();
+  
   /**
-   * alignment displayed in the viewport. Please use get/setter
+   * @param upperCasebold
+   * @see jalview.api.ViewStyleI#setUpperCasebold(boolean)
    */
-  protected AlignmentI alignment;
+  public void setUpperCasebold(boolean upperCasebold)
+  {
+    viewStyle.setUpperCasebold(upperCasebold);
+  }
 
-  protected String sequenceSetID;
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#isUpperCasebold()
+   */
+  public boolean isUpperCasebold()
+  {
+    return viewStyle.isUpperCasebold();
+  }
 
   /**
-   * probably unused indicator that view is of a dataset rather than an
-   * alignment
+   * @return
+   * @see jalview.api.ViewStyleI#isSeqNameItalics()
    */
-  protected boolean isDataset = false;
+  public boolean isSeqNameItalics()
+  {
+    return viewStyle.isSeqNameItalics();
+  }
 
-  private Map<SequenceI, SequenceCollectionI> hiddenRepSequences;
+  /**
+   * @param colourByReferenceSeq
+   * @see jalview.api.ViewStyleI#setColourByReferenceSeq(boolean)
+   */
+  public void setColourByReferenceSeq(boolean colourByReferenceSeq)
+  {
+    viewStyle.setColourByReferenceSeq(colourByReferenceSeq);
+  }
 
-  protected ColumnSelection colSel = new ColumnSelection();
+  /**
+   * @param b
+   * @see jalview.api.ViewStyleI#setColourAppliesToAllGroups(boolean)
+   */
+  public void setColourAppliesToAllGroups(boolean b)
+  {
+    viewStyle.setColourAppliesToAllGroups(b);
+  }
 
-  public boolean autoCalculateConsensus = true;
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getColourAppliesToAllGroups()
+   */
+  public boolean getColourAppliesToAllGroups()
+  {
+    return viewStyle.getColourAppliesToAllGroups();
+  }
 
-  protected boolean autoCalculateStrucConsensus = true;
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getAbovePIDThreshold()
+   */
+  public boolean getAbovePIDThreshold()
+  {
+    return viewStyle.getAbovePIDThreshold();
+  }
 
-  protected boolean ignoreGapsInConsensusCalculation = false;
+  /**
+   * @param inc
+   * @see jalview.api.ViewStyleI#setIncrement(int)
+   */
+  public void setIncrement(int inc)
+  {
+    viewStyle.setIncrement(inc);
+  }
 
-  protected ColourSchemeI globalColourScheme = null;
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getIncrement()
+   */
+  public int getIncrement()
+  {
+    return viewStyle.getIncrement();
+  }
 
   /**
-   * gui state - changes to colour scheme propagated to all groups
+   * @param b
+   * @see jalview.api.ViewStyleI#setConservationSelected(boolean)
    */
-  private boolean colourAppliesToAllGroups;
+  public void setConservationSelected(boolean b)
+  {
+    viewStyle.setConservationSelected(b);
+  }
 
   /**
-   * @param value
-   *          indicating if subsequent colourscheme changes will be propagated
-   *          to all groups
+   * @param show
+   * @see jalview.api.ViewStyleI#setShowHiddenMarkers(boolean)
    */
-  public void setColourAppliesToAllGroups(boolean b)
+  public void setShowHiddenMarkers(boolean show)
   {
-    colourAppliesToAllGroups = b;
+    viewStyle.setShowHiddenMarkers(show);
   }
 
   /**
-   * 
-   * 
-   * @return flag indicating if colourchanges propagated to all groups
+   * @return
+   * @see jalview.api.ViewStyleI#getShowHiddenMarkers()
    */
-  public boolean getColourAppliesToAllGroups()
+  public boolean getShowHiddenMarkers()
   {
-    return colourAppliesToAllGroups;
+    return viewStyle.getShowHiddenMarkers();
   }
 
-  boolean abovePIDThreshold = false;
+  /**
+   * @param b
+   * @see jalview.api.ViewStyleI#setScaleRightWrapped(boolean)
+   */
+  public void setScaleRightWrapped(boolean b)
+  {
+    viewStyle.setScaleRightWrapped(b);
+  }
 
   /**
-   * GUI state
-   * 
-   * @return true if percent identity threshold is applied to shading
+   * @param b
+   * @see jalview.api.ViewStyleI#setScaleLeftWrapped(boolean)
    */
-  public boolean getAbovePIDThreshold()
+  public void setScaleLeftWrapped(boolean b)
   {
-    return abovePIDThreshold;
+    viewStyle.setScaleLeftWrapped(b);
   }
 
   /**
-   * GUI state
-   * 
-   * 
    * @param b
-   *          indicate if percent identity threshold is applied to shading
+   * @see jalview.api.ViewStyleI#setScaleAboveWrapped(boolean)
    */
-  public void setAbovePIDThreshold(boolean b)
+  public void setScaleAboveWrapped(boolean b)
   {
-    abovePIDThreshold = b;
+    viewStyle.setScaleAboveWrapped(b);
   }
 
-  int threshold;
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getScaleLeftWrapped()
+   */
+  public boolean getScaleLeftWrapped()
+  {
+    return viewStyle.getScaleLeftWrapped();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getScaleAboveWrapped()
+   */
+  public boolean getScaleAboveWrapped()
+  {
+    return viewStyle.getScaleAboveWrapped();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getScaleRightWrapped()
+   */
+  public boolean getScaleRightWrapped()
+  {
+    return viewStyle.getScaleRightWrapped();
+  }
+
+  /**
+   * @param b
+   * @see jalview.api.ViewStyleI#setAbovePIDThreshold(boolean)
+   */
+  public void setAbovePIDThreshold(boolean b)
+  {
+    viewStyle.setAbovePIDThreshold(b);
+  }
 
   /**
-   * DOCUMENT ME!
-   * 
    * @param thresh
-   *          DOCUMENT ME!
+   * @see jalview.api.ViewStyleI#setThreshold(int)
    */
   public void setThreshold(int thresh)
   {
-    threshold = thresh;
+    viewStyle.setThreshold(thresh);
   }
 
   /**
-   * DOCUMENT ME!
-   * 
-   * @return DOCUMENT ME!
+   * @return
+   * @see jalview.api.ViewStyleI#getThreshold()
    */
   public int getThreshold()
   {
-    return threshold;
+    return viewStyle.getThreshold();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getShowJVSuffix()
+   */
+  public boolean getShowJVSuffix()
+  {
+    return viewStyle.getShowJVSuffix();
   }
 
-  int increment;
+  /**
+   * @param b
+   * @see jalview.api.ViewStyleI#setShowJVSuffix(boolean)
+   */
+  public void setShowJVSuffix(boolean b)
+  {
+    viewStyle.setShowJVSuffix(b);
+  }
 
   /**
-   * 
-   * @param inc
-   *          set the scalar for bleaching colourschemes according to degree of
-   *          conservation
+   * @param state
+   * @see jalview.api.ViewStyleI#setWrapAlignment(boolean)
    */
-  public void setIncrement(int inc)
+  public void setWrapAlignment(boolean state)
   {
-    increment = inc;
+    viewStyle.setWrapAlignment(state);
   }
 
   /**
-   * GUI State
-   * 
-   * @return get scalar for bleaching colourschemes by conservation
+   * @param state
+   * @see jalview.api.ViewStyleI#setShowText(boolean)
    */
-  public int getIncrement()
+  public void setShowText(boolean state)
   {
-    return increment;
+    viewStyle.setShowText(state);
   }
 
-  boolean conservationColourSelected = false;
+  /**
+   * @param state
+   * @see jalview.api.ViewStyleI#setRenderGaps(boolean)
+   */
+  public void setRenderGaps(boolean state)
+  {
+    viewStyle.setRenderGaps(state);
+  }
 
   /**
-   * GUI state
-   * 
-   * @return true if conservation based shading is enabled
+   * @return
+   * @see jalview.api.ViewStyleI#getColourText()
    */
-  public boolean getConservationSelected()
+  public boolean getColourText()
   {
-    return conservationColourSelected;
+    return viewStyle.getColourText();
   }
 
   /**
-   * GUI state
-   * 
-   * @param b
-   *          enable conservation based shading
+   * @param state
+   * @see jalview.api.ViewStyleI#setColourText(boolean)
    */
-  public void setConservationSelected(boolean b)
+  public void setColourText(boolean state)
   {
-    conservationColourSelected = b;
+    viewStyle.setColourText(state);
   }
 
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getWrapAlignment()
+   */
+  public boolean getWrapAlignment()
+  {
+    return viewStyle.getWrapAlignment();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getShowText()
+   */
+  public boolean getShowText()
+  {
+    return viewStyle.getShowText();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getWrappedWidth()
+   */
+  public int getWrappedWidth()
+  {
+    return viewStyle.getWrappedWidth();
+  }
+
+  /**
+   * @param w
+   * @see jalview.api.ViewStyleI#setWrappedWidth(int)
+   */
+  public void setWrappedWidth(int w)
+  {
+    viewStyle.setWrappedWidth(w);
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getCharHeight()
+   */
+  public int getCharHeight()
+  {
+    return viewStyle.getCharHeight();
+  }
+
+  /**
+   * @param h
+   * @see jalview.api.ViewStyleI#setCharHeight(int)
+   */
+  public void setCharHeight(int h)
+  {
+    viewStyle.setCharHeight(h);
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getCharWidth()
+   */
+  public int getCharWidth()
+  {
+    return viewStyle.getCharWidth();
+  }
+
+  /**
+   * @param w
+   * @see jalview.api.ViewStyleI#setCharWidth(int)
+   */
+  public void setCharWidth(int w)
+  {
+    viewStyle.setCharWidth(w);
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getShowBoxes()
+   */
+  public boolean getShowBoxes()
+  {
+    return viewStyle.getShowBoxes();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getShowUnconserved()
+   */
+  public boolean getShowUnconserved()
+  {
+    return viewStyle.getShowUnconserved();
+  }
+
+  /**
+   * @param showunconserved
+   * @see jalview.api.ViewStyleI#setShowUnconserved(boolean)
+   */
+  public void setShowUnconserved(boolean showunconserved)
+  {
+    viewStyle.setShowUnconserved(showunconserved);
+  }
+
+  /**
+   * @param default1
+   * @see jalview.api.ViewStyleI#setSeqNameItalics(boolean)
+   */
+  public void setSeqNameItalics(boolean default1)
+  {
+    viewStyle.setSeqNameItalics(default1);
+  }
+
+  /**
+   * @param selected
+   * @see jalview.api.ViewStyleI#setShowSeqFeaturesHeight(boolean)
+   */
+  public void setShowSeqFeaturesHeight(boolean selected)
+  {
+    viewStyle.setShowSeqFeaturesHeight(selected);
+  }
+
+  /**
+   * alignment displayed in the viewport. Please use get/setter
+   */
+  protected AlignmentI alignment;
+
+  @Override
+  public AlignmentI getAlignment()
+  {
+    return alignment;
+  }
+
+  @Override
+  public char getGapCharacter()
+  {
+    return alignment.getGapCharacter();
+  }
+
+  protected String sequenceSetID;
+
+  /**
+   * probably unused indicator that view is of a dataset rather than an
+   * alignment
+   */
+  protected boolean isDataset = false;
+
+  public void setDataset(boolean b)
+  {
+    isDataset = b;
+  }
+
+  public boolean isDataset()
+  {
+    return isDataset;
+  }
+
+
+  private Map<SequenceI, SequenceCollectionI> hiddenRepSequences;
+
+  protected ColumnSelection colSel = new ColumnSelection();
+
+  public boolean autoCalculateConsensus = true;
+
+  protected boolean autoCalculateStrucConsensus = true;
+
+  protected boolean ignoreGapsInConsensusCalculation = false;
+
+  protected ColourSchemeI globalColourScheme = null;
+
+
   @Override
   public void setGlobalColourScheme(ColourSchemeI cs)
   {
@@ -221,7 +501,8 @@ public abstract class AlignmentViewport implements AlignViewportI
               || cs instanceof Blosum62ColourScheme)
       {
         recalc = true;
-        cs.setThreshold(threshold, ignoreGapsInConsensusCalculation);
+        cs.setThreshold(viewStyle.getThreshold(),
+                ignoreGapsInConsensusCalculation);
       }
       else
       {
@@ -248,7 +529,8 @@ public abstract class AlignmentViewport implements AlignViewportI
         if (getAbovePIDThreshold() || cs instanceof PIDColourScheme
                 || cs instanceof Blosum62ColourScheme)
         {
-          sg.cs.setThreshold(threshold, getIgnoreGapsConsensus());
+          sg.cs.setThreshold(viewStyle.getThreshold(),
+                  getIgnoreGapsConsensus());
           recalc = true;
         }
         else
@@ -577,11 +859,6 @@ public abstract class AlignmentViewport implements AlignViewportI
   }
 
   /**
-   * show non-conserved residues only
-   */
-  protected boolean showUnconserved = false;
-
-  /**
    * when set, updateAlignment will always ensure sequences are of equal length
    */
   private boolean padGaps = false;
@@ -591,24 +868,6 @@ public abstract class AlignmentViewport implements AlignViewportI
    */
   public boolean sortByTree = false;
 
-  public boolean getShowUnconserved()
-  {
-    return showUnconserved;
-  }
-
-  public void setShowUnconserved(boolean showunconserved)
-  {
-    showUnconserved = showunconserved;
-  }
-
-  /**
-   * @param showNonconserved
-   *          the showUnconserved to set
-   */
-  public void setShowunconserved(boolean displayNonconserved)
-  {
-    this.showUnconserved = displayNonconserved;
-  }
 
   /**
    * 
@@ -1551,36 +1810,23 @@ public abstract class AlignmentViewport implements AlignViewportI
     }
     oldrfs.clear();
   }
-  /**
-   * show the reference sequence in the alignment view
-   */
-  private boolean displayReferenceSeq=false;
-  /**
-   * colour according to the reference sequence defined on the alignment
-   */
-  private boolean colourByReferenceSeq=false;
-
   @Override
   public boolean isDisplayReferenceSeq()
   {
-    return alignment.hasSeqrep() && displayReferenceSeq;
+    return alignment.hasSeqrep() && viewStyle.isDisplayReferenceSeq();
   }
 
   @Override
   public void setDisplayReferenceSeq(boolean displayReferenceSeq)
   {
-    this.displayReferenceSeq = displayReferenceSeq;
+    viewStyle.setDisplayReferenceSeq(displayReferenceSeq);
   }
 
   public boolean isColourByReferenceSeq()
   {
-    return alignment.hasSeqrep() && colourByReferenceSeq;
+    return alignment.hasSeqrep() && viewStyle.isColourByReferenceSeq();
   }
 
-  public void setColourByReferenceSeq(boolean colourByReferenceSeq)
-  {
-    this.colourByReferenceSeq = colourByReferenceSeq;
-  }
 
   @Override
   public Color getSequenceColour(SequenceI seq)
@@ -1661,11 +1907,6 @@ public abstract class AlignmentViewport implements AlignViewportI
   }
 
   /**
-   * display setting for showing/hiding sequence features on alignment view
-   */
-  boolean showSequenceFeatures = false;
-
-  /**
    * set the flag
    * 
    * @param b
@@ -1674,55 +1915,171 @@ public abstract class AlignmentViewport implements AlignViewportI
   @Override
   public void setShowSequenceFeatures(boolean b)
   {
-    showSequenceFeatures = b;
+    viewStyle.setShowSequenceFeatures(b);
   }
   @Override
   public boolean isShowSequenceFeatures()
   {
-    return showSequenceFeatures;
+    return viewStyle.isShowSequenceFeatures();
   }
 
-  boolean showSeqFeaturesHeight;
-
   @Override
   public void setShowSequenceFeaturesHeight(boolean selected)
   {
-    showSeqFeaturesHeight = selected;
+    viewStyle.setShowSeqFeaturesHeight(selected);
   }
 
   @Override
   public boolean isShowSequenceFeaturesHeight()
   {
-    return showSeqFeaturesHeight;
+    return viewStyle.isShowSequenceFeaturesHeight();
   }
 
-  private boolean showAnnotation = true;
-
-  private boolean rightAlignIds = false;
 
 
   @Override
   public void setShowAnnotation(boolean b)
   {
-    showAnnotation = b;
+    viewStyle.setShowAnnotation(b);
   }
 
   @Override
   public boolean isShowAnnotation()
   {
-    return showAnnotation;
+    return viewStyle.isShowAnnotation();
   }
 
   @Override
   public boolean isRightAlignIds()
   {
-    return rightAlignIds;
+    return viewStyle.isRightAlignIds();
   }
 
   @Override
   public void setRightAlignIds(boolean rightAlignIds)
   {
-    this.rightAlignIds = rightAlignIds;
+    viewStyle.setRightAlignIds(rightAlignIds);
+  }
+
+  @Override
+  public boolean getConservationSelected()
+  {
+    return viewStyle.getConservationSelected();
+  }
+
+  @Override
+  public void setShowBoxes(boolean state)
+  {
+    viewStyle.setShowBoxes(state);
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getTextColour()
+   */
+  public Color getTextColour()
+  {
+    return viewStyle.getTextColour();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getTextColour2()
+   */
+  public Color getTextColour2()
+  {
+    return viewStyle.getTextColour2();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#getThresholdTextColour()
+   */
+  public int getThresholdTextColour()
+  {
+    return viewStyle.getThresholdTextColour();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#isConservationColourSelected()
+   */
+  public boolean isConservationColourSelected()
+  {
+    return viewStyle.isConservationColourSelected();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#isRenderGaps()
+   */
+  public boolean isRenderGaps()
+  {
+    return viewStyle.isRenderGaps();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#isShowColourText()
+   */
+  public boolean isShowColourText()
+  {
+    return viewStyle.isShowColourText();
+  }
+
+  /**
+   * @return
+   * @see jalview.api.ViewStyleI#isShowSeqFeaturesHeight()
+   */
+  public boolean isShowSeqFeaturesHeight()
+  {
+    return viewStyle.isShowSeqFeaturesHeight();
+  }
+
+  /**
+   * @param conservationColourSelected
+   * @see jalview.api.ViewStyleI#setConservationColourSelected(boolean)
+   */
+  public void setConservationColourSelected(
+          boolean conservationColourSelected)
+  {
+    viewStyle.setConservationColourSelected(conservationColourSelected);
+  }
+
+  /**
+   * @param showColourText
+   * @see jalview.api.ViewStyleI#setShowColourText(boolean)
+   */
+  public void setShowColourText(boolean showColourText)
+  {
+    viewStyle.setShowColourText(showColourText);
+  }
+
+  /**
+   * @param textColour
+   * @see jalview.api.ViewStyleI#setTextColour(java.awt.Color)
+   */
+  public void setTextColour(Color textColour)
+  {
+    viewStyle.setTextColour(textColour);
+  }
+
+  /**
+   * @param thresholdTextColour
+   * @see jalview.api.ViewStyleI#setThresholdTextColour(int)
+   */
+  public void setThresholdTextColour(int thresholdTextColour)
+  {
+    viewStyle.setThresholdTextColour(thresholdTextColour);
+  }
+
+  /**
+   * @param textColour2
+   * @see jalview.api.ViewStyleI#setTextColour2(java.awt.Color)
+   */
+  public void setTextColour2(Color textColour2)
+  {
+    viewStyle.setTextColour2(textColour2);
   }
 
 }
diff --git a/src/jalview/viewmodel/styles/ViewStyle.java b/src/jalview/viewmodel/styles/ViewStyle.java
new file mode 100644 (file)
index 0000000..c7430ec
--- /dev/null
@@ -0,0 +1,766 @@
+package jalview.viewmodel.styles;
+
+import jalview.api.ViewStyleI;
+
+import java.awt.Color;
+
+/**
+ * A container for holding alignment view properties. View properties are
+ * data-independent, which means they can be safely copied between views
+ * involving different alignment data without causing exceptions in the
+ * rendering system.
+ * 
+ * @author jprocter
+ *
+ */
+public class ViewStyle implements ViewStyleI
+{
+
+  private boolean abovePIDThreshold = false;
+
+  int charHeight;
+
+  int charWidth;
+
+  /**
+   * gui state - changes to colour scheme propagated to all groups
+   */
+  private boolean colourAppliesToAllGroups;
+
+  /**
+   * colour according to the reference sequence defined on the alignment
+   */
+  private boolean colourByReferenceSeq = false;
+
+  boolean conservationColourSelected = false;
+
+  /**
+   * show the reference sequence in the alignment view
+   */
+  private boolean displayReferenceSeq = false;
+
+  private int increment;
+
+  /**
+   * display gap characters
+   */
+  boolean renderGaps = true;
+
+  private boolean rightAlignIds = false;
+
+  boolean scaleAboveWrapped = false;
+
+  boolean scaleLeftWrapped = true;
+
+  boolean scaleRightWrapped = true;
+
+  boolean seqNameItalics;
+
+  /**
+   * show annotation tracks on the alignment
+   */
+  private boolean showAnnotation = true;
+
+  /**
+   * render each residue in a coloured box
+   */
+  boolean showBoxes = true;
+
+  /**
+   * Colour sequence text
+   */
+  boolean showColourText = false;
+
+  /**
+   * show blue triangles
+   */
+  boolean showHiddenMarkers = true;
+
+  /**
+   * show /start-end in ID panel
+   */
+  boolean showJVSuffix = true;
+
+  /**
+   * scale features height according to score
+   */
+  boolean showSeqFeaturesHeight;
+
+  /**
+   * display setting for showing/hiding sequence features on alignment view
+   */
+  boolean showSequenceFeatures = false;
+
+  /**
+   * display sequence symbols
+   */
+  boolean showText = true;
+
+  /**
+   * show non-conserved residues only
+   */
+  protected boolean showUnconserved = false;
+
+  Color textColour = Color.black;
+
+  Color textColour2 = Color.white;
+
+  /**
+   * PID or consensus threshold
+   */
+  int threshold;
+
+  /**
+   * threshold for switching between textColour & textColour2
+   */
+  int thresholdTextColour = 0;
+
+  /**
+   * upper case characters in sequence are shown in bold
+   */
+  boolean upperCasebold = false;
+
+  /**
+   * @return the upperCasebold
+   */
+  @Override
+  public boolean isUpperCasebold()
+  {
+    return upperCasebold;
+  }
+
+  /**
+   * @param upperCasebold
+   *          the upperCasebold to set
+   */
+  @Override
+  public void setUpperCasebold(boolean upperCasebold)
+  {
+    this.upperCasebold = upperCasebold;
+  }
+
+  /**
+   * flag for wrapping
+   */
+  boolean wrapAlignment = false;
+
+  /**
+   * number columns in wrapped alignment
+   */
+  int wrappedWidth;
+
+  /**
+   * GUI state
+   * 
+   * @return true if percent identity threshold is applied to shading
+   */
+  @Override
+  public boolean getAbovePIDThreshold()
+  {
+    return abovePIDThreshold;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public int getCharHeight()
+  {
+    return charHeight;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public int getCharWidth()
+  {
+    return charWidth;
+  }
+
+  /**
+   * 
+   * 
+   * @return flag indicating if colourchanges propagated to all groups
+   */
+  @Override
+  public boolean getColourAppliesToAllGroups()
+  {
+    return colourAppliesToAllGroups;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getColourText()
+  {
+    return showColourText;
+  }
+
+  /**
+   * GUI state
+   * 
+   * @return true if conservation based shading is enabled
+   */
+  @Override
+  public boolean getConservationSelected()
+  {
+    return conservationColourSelected;
+  }
+
+  /**
+   * GUI State
+   * 
+   * @return get scalar for bleaching colourschemes by conservation
+   */
+  @Override
+  public int getIncrement()
+  {
+    return increment;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getScaleAboveWrapped()
+  {
+    return scaleAboveWrapped;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getScaleLeftWrapped()
+  {
+    return scaleLeftWrapped;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getScaleRightWrapped()
+  {
+    return scaleRightWrapped;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getShowBoxes()
+  {
+    return showBoxes;
+  }
+
+  @Override
+  public boolean getShowHiddenMarkers()
+  {
+    return showHiddenMarkers;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getShowJVSuffix()
+  {
+    return showJVSuffix;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getShowText()
+  {
+    return showText;
+  }
+
+  @Override
+  public boolean getShowUnconserved()
+  {
+    return showUnconserved;
+  }
+
+  /**
+   * @return the textColour
+   */
+  @Override
+  public Color getTextColour()
+  {
+    return textColour;
+  }
+
+  /**
+   * @return the textColour2
+   */
+  @Override
+  public Color getTextColour2()
+  {
+    return textColour2;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public int getThreshold()
+  {
+    return threshold;
+  }
+
+  /**
+   * @return the thresholdTextColour
+   */
+  @Override
+  public int getThresholdTextColour()
+  {
+    return thresholdTextColour;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public boolean getWrapAlignment()
+  {
+    return wrapAlignment;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @return DOCUMENT ME!
+   */
+  @Override
+  public int getWrappedWidth()
+  {
+    return wrappedWidth;
+  }
+
+  @Override
+  public boolean isColourByReferenceSeq()
+  {
+    return colourByReferenceSeq;
+  }
+
+  /**
+   * @return the conservationColourSelected
+   */
+  @Override
+  public boolean isConservationColourSelected()
+  {
+    return conservationColourSelected;
+  }
+
+  @Override
+  public boolean isDisplayReferenceSeq()
+  {
+    return displayReferenceSeq;
+  }
+
+  /**
+   * @return the renderGaps
+   */
+  @Override
+  public boolean isRenderGaps()
+  {
+    return renderGaps;
+  }
+
+  @Override
+  public boolean isRightAlignIds()
+  {
+    return rightAlignIds;
+  }
+
+  /**
+   * @return the seqNameItalics
+   */
+  @Override
+  public boolean isSeqNameItalics()
+  {
+    return seqNameItalics;
+  }
+
+  @Override
+  public boolean isShowAnnotation()
+  {
+    return showAnnotation;
+  }
+
+  /**
+   * @return the showColourText
+   */
+  @Override
+  public boolean isShowColourText()
+  {
+    return showColourText;
+  }
+
+  /**
+   * @return the showSeqFeaturesHeight
+   */
+  @Override
+  public boolean isShowSeqFeaturesHeight()
+  {
+    return showSeqFeaturesHeight;
+  }
+
+  @Override
+  public boolean isShowSequenceFeatures()
+  {
+    return showSequenceFeatures;
+  }
+
+  @Override
+  public boolean isShowSequenceFeaturesHeight()
+  {
+
+    return showSeqFeaturesHeight;
+  }
+
+  /**
+   * GUI state
+   * 
+   * 
+   * @param b
+   *          indicate if percent identity threshold is applied to shading
+   */
+  @Override
+  public void setAbovePIDThreshold(boolean b)
+  {
+    abovePIDThreshold = b;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param h
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setCharHeight(int h)
+  {
+    this.charHeight = h;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param w
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setCharWidth(int w)
+  {
+    this.charWidth = w;
+  }
+
+
+  /**
+   * @param value
+   *          indicating if subsequent colourscheme changes will be propagated
+   *          to all groups
+   */
+  @Override
+  public void setColourAppliesToAllGroups(boolean b)
+  {
+    colourAppliesToAllGroups = b;
+  }
+
+  @Override
+  public void setColourByReferenceSeq(boolean colourByReferenceSeq)
+  {
+    this.colourByReferenceSeq = colourByReferenceSeq;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param state
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setColourText(boolean state)
+  {
+    showColourText = state;
+  }
+
+  /**
+   * @param conservationColourSelected
+   *          the conservationColourSelected to set
+   */
+  @Override
+  public void setConservationColourSelected(
+          boolean conservationColourSelected)
+  {
+    this.conservationColourSelected = conservationColourSelected;
+  }
+
+  /**
+   * GUI state
+   * 
+   * @param b
+   *          enable conservation based shading
+   */
+  @Override
+  public void setConservationSelected(boolean b)
+  {
+    conservationColourSelected = b;
+  }
+
+  @Override
+  public void setDisplayReferenceSeq(boolean displayReferenceSeq)
+  {
+    this.displayReferenceSeq = displayReferenceSeq;
+  }
+
+  /**
+   * 
+   * @param inc
+   *          set the scalar for bleaching colourschemes according to degree of
+   *          conservation
+   */
+  @Override
+  public void setIncrement(int inc)
+  {
+    increment = inc;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param state
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setRenderGaps(boolean state)
+  {
+    renderGaps = state;
+  }
+
+  @Override
+  public void setRightAlignIds(boolean rightAlignIds)
+  {
+    this.rightAlignIds = rightAlignIds;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param b
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setScaleAboveWrapped(boolean b)
+  {
+    scaleAboveWrapped = b;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param b
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setScaleLeftWrapped(boolean b)
+  {
+    scaleLeftWrapped = b;
+  }
+
+  /**
+   * 
+   * 
+   * @param scaleRightWrapped
+   *          - true or false
+   */
+
+  @Override
+  public void setScaleRightWrapped(boolean b)
+  {
+    scaleRightWrapped = b;
+  }
+
+  @Override
+  public void setSeqNameItalics(boolean italics)
+  {
+    seqNameItalics = italics;
+  }
+
+  @Override
+  public void setShowAnnotation(boolean b)
+  {
+    showAnnotation = b;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param state
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setShowBoxes(boolean state)
+  {
+    showBoxes = state;
+  }
+
+  /**
+   * @param showColourText
+   *          the showColourText to set
+   */
+  @Override
+  public void setShowColourText(boolean showColourText)
+  {
+    this.showColourText = showColourText;
+  }
+
+  @Override
+  public void setShowHiddenMarkers(boolean show)
+  {
+    showHiddenMarkers = show;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param b
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setShowJVSuffix(boolean b)
+  {
+    showJVSuffix = b;
+  }
+
+  @Override
+  public void setShowSeqFeaturesHeight(boolean selected)
+  {
+    showSeqFeaturesHeight = selected;
+
+  }
+
+  /**
+   * set the flag
+   * 
+   * @param b
+   *          features are displayed if true
+   */
+  @Override
+  public void setShowSequenceFeatures(boolean b)
+  {
+    showSequenceFeatures = b;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param state
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setShowText(boolean state)
+  {
+    showText = state;
+  }
+
+  @Override
+  public void setShowUnconserved(boolean showunconserved)
+  {
+    showUnconserved = showunconserved;
+  }
+
+  /**
+   * @param textColour
+   *          the textColour to set
+   */
+  @Override
+  public void setTextColour(Color textColour)
+  {
+    this.textColour = textColour;
+  }
+
+  /**
+   * @param textColour2
+   *          the textColour2 to set
+   */
+  @Override
+  public void setTextColour2(Color textColour2)
+  {
+    this.textColour2 = textColour2;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param thresh
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setThreshold(int thresh)
+  {
+    threshold = thresh;
+  }
+
+  /**
+   * @param thresholdTextColour
+   *          the thresholdTextColour to set
+   */
+  @Override
+  public void setThresholdTextColour(int thresholdTextColour)
+  {
+    this.thresholdTextColour = thresholdTextColour;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param state
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setWrapAlignment(boolean state)
+  {
+    wrapAlignment = state;
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param w
+   *          DOCUMENT ME!
+   */
+  @Override
+  public void setWrappedWidth(int w)
+  {
+    this.wrappedWidth = w;
+  }
+}