JAL-1919 refactor moved StructureViewerSettings
[jalview.git] / src / jalview / structure / StructureViewSettings.java
diff --git a/src/jalview/structure/StructureViewSettings.java b/src/jalview/structure/StructureViewSettings.java
new file mode 100644 (file)
index 0000000..2fcb3e5
--- /dev/null
@@ -0,0 +1,79 @@
+package jalview.structure;
+
+public class StructureViewSettings
+{
+  private String dbRefType;
+
+  /**
+   * set to true to add derived sequence annotations (temp factor read from
+   * file, or computed secondary structure) to the alignment
+   */
+  private static boolean visibleChainAnnotation = false;
+
+  /**
+   * Set true to predict secondary structure (using JMol for protein, Annotate3D
+   * for RNA)
+   */
+  private static boolean predictSecStr = false;
+
+  /**
+   * Set true (with predictSecondaryStructure=true) to predict secondary
+   * structure using an external service (currently Annotate3D for RNA only)
+   */
+  private static boolean externalSecondaryStructure = false;
+
+  private static boolean showSeqFeatures = true;
+
+  public static void addSettings(boolean addAlignmentAnnotations,
+          boolean predictSecStr, boolean externalSecStr)
+  {
+    StructureViewSettings.visibleChainAnnotation = addAlignmentAnnotations;
+    StructureViewSettings.predictSecStr = predictSecStr;
+    StructureViewSettings.externalSecondaryStructure = externalSecStr;
+    StructureViewSettings.showSeqFeatures = true;
+  }
+
+  public static boolean isVisibleChainAnnotation()
+  {
+    return visibleChainAnnotation;
+  }
+
+  public static void setVisibleChainAnnotation(
+          boolean visibleChainAnnotation)
+  {
+    StructureViewSettings.visibleChainAnnotation = visibleChainAnnotation;
+  }
+
+  public static boolean isPredictSecondaryStructure()
+  {
+    return predictSecStr;
+  }
+
+  public static void setPredictSecondaryStructure(
+          boolean predictSecondaryStructure)
+  {
+    StructureViewSettings.predictSecStr = predictSecondaryStructure;
+  }
+
+  public static boolean isExternalSecondaryStructure()
+  {
+    return externalSecondaryStructure;
+  }
+
+  public static void setExternalSecondaryStructure(
+          boolean externalSecondaryStructure)
+  {
+    StructureViewSettings.externalSecondaryStructure = externalSecondaryStructure;
+  }
+
+  public static boolean isShowSeqFeatures()
+  {
+    return showSeqFeatures;
+  }
+
+  public static void setShowSeqFeatures(boolean showSeqFeatures)
+  {
+    StructureViewSettings.showSeqFeatures = showSeqFeatures;
+  }
+
+}