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