JAL-1690 'scale protein as cDNA' options in Preferences, FontChooser
[jalview.git] / src / jalview / viewmodel / styles / ViewStyle.java
index 1e97af4..fc34be8 100644 (file)
@@ -1,11 +1,11 @@
 package jalview.viewmodel.styles;
 
-import jalview.api.ViewStyleI;
-
 import java.awt.Color;
 import java.lang.reflect.Method;
 import java.util.HashMap;
 
+import jalview.api.ViewStyleI;
+
 /**
  * A container for holding alignment view properties. View properties are
  * data-independent, which means they can be safely copied between views
@@ -139,11 +139,18 @@ public class ViewStyle implements ViewStyleI
    * name of base font for view
    */
   private String fontName;
+
   /**
    * size for base font
    */
   private int fontSize;
-  
+
+  /*
+   * If true, scale protein residues to 3 times width of cDNA bases (in
+   * SplitFrame views only)
+   */
+  private boolean scaleProteinAsCdna = false;
+
   public ViewStyle(ViewStyleI viewStyle)
   {
     ViewStyle.configureFrom(this, viewStyle);
@@ -1004,4 +1011,16 @@ public class ViewStyle implements ViewStyleI
   {
     this.shownpfeats = shownpfeats;
   }
+
+  @Override
+  public boolean isScaleProteinAsCdna()
+  {
+    return this.scaleProteinAsCdna;
+  }
+
+  @Override
+  public void setScaleProteinAsCdna(boolean b)
+  {
+    this.scaleProteinAsCdna = b;
+  }
 }