2fcb3e5d0e278c19b51c7c750fbf6817a8718e2b
[jalview.git] / src / jalview / structure / StructureViewSettings.java
1 package jalview.structure;
2
3 public class StructureViewSettings
4 {
5   private String dbRefType;
6
7   /**
8    * set to true to add derived sequence annotations (temp factor read from
9    * file, or computed secondary structure) to the alignment
10    */
11   private static boolean visibleChainAnnotation = false;
12
13   /**
14    * Set true to predict secondary structure (using JMol for protein, Annotate3D
15    * for RNA)
16    */
17   private static boolean predictSecStr = false;
18
19   /**
20    * Set true (with predictSecondaryStructure=true) to predict secondary
21    * structure using an external service (currently Annotate3D for RNA only)
22    */
23   private static boolean externalSecondaryStructure = false;
24
25   private static boolean showSeqFeatures = true;
26
27   public static void addSettings(boolean addAlignmentAnnotations,
28           boolean predictSecStr, boolean externalSecStr)
29   {
30     StructureViewSettings.visibleChainAnnotation = addAlignmentAnnotations;
31     StructureViewSettings.predictSecStr = predictSecStr;
32     StructureViewSettings.externalSecondaryStructure = externalSecStr;
33     StructureViewSettings.showSeqFeatures = true;
34   }
35
36   public static boolean isVisibleChainAnnotation()
37   {
38     return visibleChainAnnotation;
39   }
40
41   public static void setVisibleChainAnnotation(
42           boolean visibleChainAnnotation)
43   {
44     StructureViewSettings.visibleChainAnnotation = visibleChainAnnotation;
45   }
46
47   public static boolean isPredictSecondaryStructure()
48   {
49     return predictSecStr;
50   }
51
52   public static void setPredictSecondaryStructure(
53           boolean predictSecondaryStructure)
54   {
55     StructureViewSettings.predictSecStr = predictSecondaryStructure;
56   }
57
58   public static boolean isExternalSecondaryStructure()
59   {
60     return externalSecondaryStructure;
61   }
62
63   public static void setExternalSecondaryStructure(
64           boolean externalSecondaryStructure)
65   {
66     StructureViewSettings.externalSecondaryStructure = externalSecondaryStructure;
67   }
68
69   public static boolean isShowSeqFeatures()
70   {
71     return showSeqFeatures;
72   }
73
74   public static void setShowSeqFeatures(boolean showSeqFeatures)
75   {
76     StructureViewSettings.showSeqFeatures = showSeqFeatures;
77   }
78
79 }