JAL-1640 getters and setters for viewStyleI - note the caller needs to trigger view...
authorJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 17:41:46 +0000 (17:41 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Mon, 2 Feb 2015 17:41:46 +0000 (17:41 +0000)
src/jalview/api/AlignViewportI.java
src/jalview/viewmodel/AlignmentViewport.java

index 2dea15e..5d3f89d 100644 (file)
@@ -354,4 +354,16 @@ 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);
 }
index e8f1303..5e17e68 100644 (file)
@@ -2082,4 +2082,15 @@ public abstract class AlignmentViewport implements AlignViewportI,
     viewStyle.setTextColour2(textColour2);
   }
 
+  @Override
+  public ViewStyleI getViewStyle()
+  {
+    return new ViewStyle(viewStyle);
+  }
+
+  @Override
+  public void setViewStyle(ViewStyleI settingsForView)
+  {
+    viewStyle = new ViewStyle(settingsForView);
+  }
 }