JAL-1645 source formatting and organise imports
[jalview.git] / src / jalview / datamodel / StructureViewerModel.java
1 package jalview.datamodel;
2
3 import java.io.File;
4 import java.util.ArrayList;
5 import java.util.HashMap;
6 import java.util.List;
7 import java.util.Map;
8
9 /**
10  * A data bean to hold stored data about a structure viewer.
11  */
12 public class StructureViewerModel
13 {
14   private int x;
15
16   private int y;
17
18   private int width;
19
20   private int height;
21
22   private boolean alignWithPanel;
23
24   private boolean colourWithAlignPanel;
25
26   private boolean colourByViewer;
27
28   private String stateData = "";
29
30   private String viewId;
31
32   // CHIMERA or JMOL (for projects from Jalview 2.9 on)
33   private String type;
34
35   private Map<File, StructureData> fileData = new HashMap<File, StructureData>();
36
37   public class StructureData
38   {
39     private String filePath;
40
41     private String pdbId;
42
43     private List<SequenceI> seqList;
44
45     // TODO and possibly a list of chains?
46
47     /**
48      * Constructor given structure file path and id.
49      * 
50      * @param pdbFile
51      * @param id
52      */
53     public StructureData(String pdbFile, String id)
54     {
55       this.filePath = pdbFile;
56       this.pdbId = id;
57       this.seqList = new ArrayList<SequenceI>();
58     }
59
60     public String getFilePath()
61     {
62       return filePath;
63     }
64
65     protected void setFilePath(String filePath)
66     {
67       this.filePath = filePath;
68     }
69
70     public String getPdbId()
71     {
72       return pdbId;
73     }
74
75     protected void setPdbId(String pdbId)
76     {
77       this.pdbId = pdbId;
78     }
79
80     public List<SequenceI> getSeqList()
81     {
82       return seqList;
83     }
84
85     protected void setSeqList(List<SequenceI> seqList)
86     {
87       this.seqList = seqList;
88     }
89   }
90
91   public StructureViewerModel(int x, int y, int width, int height,
92           boolean alignWithPanel, boolean colourWithAlignPanel,
93           boolean colourByViewer, String viewId, String type)
94   {
95     this.x = x;
96     this.y = y;
97     this.width = width;
98     this.height = height;
99     this.alignWithPanel = alignWithPanel;
100     this.colourWithAlignPanel = colourWithAlignPanel;
101     this.colourByViewer = colourByViewer;
102     this.viewId = viewId;
103     this.type = type;
104   }
105
106   public int getX()
107   {
108     return x;
109   }
110
111   protected void setX(int x)
112   {
113     this.x = x;
114   }
115
116   public int getY()
117   {
118     return y;
119   }
120
121   protected void setY(int y)
122   {
123     this.y = y;
124   }
125
126   public int getWidth()
127   {
128     return width;
129   }
130
131   protected void setWidth(int width)
132   {
133     this.width = width;
134   }
135
136   public int getHeight()
137   {
138     return height;
139   }
140
141   public void setHeight(int height)
142   {
143     this.height = height;
144   }
145
146   public boolean isAlignWithPanel()
147   {
148     return alignWithPanel;
149   }
150
151   public void setAlignWithPanel(boolean alignWithPanel)
152   {
153     this.alignWithPanel = alignWithPanel;
154   }
155
156   public boolean isColourWithAlignPanel()
157   {
158     return colourWithAlignPanel;
159   }
160
161   public void setColourWithAlignPanel(boolean colourWithAlignPanel)
162   {
163     this.colourWithAlignPanel = colourWithAlignPanel;
164   }
165
166   public boolean isColourByViewer()
167   {
168     return colourByViewer;
169   }
170
171   public void setColourByViewer(boolean colourByViewer)
172   {
173     this.colourByViewer = colourByViewer;
174   }
175
176   public String getStateData()
177   {
178     return stateData;
179   }
180
181   public void setStateData(String stateData)
182   {
183     this.stateData = stateData;
184   }
185
186   public Map<File, StructureData> getFileData()
187   {
188     return fileData;
189   }
190
191   protected void setFileData(Map<File, StructureData> fileData)
192   {
193     this.fileData = fileData;
194   }
195
196   public String getViewId()
197   {
198     return this.viewId;
199   }
200
201   public String getType()
202   {
203     return this.type;
204   }
205 }