1 package jalview.datamodel;
4 import java.util.ArrayList;
5 import java.util.HashMap;
10 * A data bean to hold stored data about a structure viewer.
12 public class StructureViewerModel
22 private boolean alignWithPanel;
24 private boolean colourWithAlignPanel;
26 private boolean colourByViewer;
28 private String stateData = "";
30 private String viewId;
32 // CHIMERA or JMOL (for projects from Jalview 2.9 on)
35 private Map<File, StructureData> fileData = new HashMap<File, StructureData>();
37 public class StructureData
39 private String filePath;
43 private List<SequenceI> seqList;
44 // TODO and possibly a list of chains?
47 * Constructor given structure file path and id.
52 public StructureData(String pdbFile, String id)
54 this.filePath = pdbFile;
56 this.seqList = new ArrayList<SequenceI>();
59 public String getFilePath()
64 protected void setFilePath(String filePath)
66 this.filePath = filePath;
69 public String getPdbId()
74 protected void setPdbId(String pdbId)
79 public List<SequenceI> getSeqList()
84 protected void setSeqList(List<SequenceI> seqList)
86 this.seqList = seqList;
90 public StructureViewerModel(int x, int y, int width, int height,
91 boolean alignWithPanel, boolean colourWithAlignPanel,
92 boolean colourByViewer, String viewId, String type)
98 this.alignWithPanel = alignWithPanel;
99 this.colourWithAlignPanel = colourWithAlignPanel;
100 this.colourByViewer = colourByViewer;
101 this.viewId = viewId;
110 protected void setX(int x)
120 protected void setY(int y)
125 public int getWidth()
130 protected void setWidth(int width)
135 public int getHeight()
140 public void setHeight(int height)
142 this.height = height;
145 public boolean isAlignWithPanel()
147 return alignWithPanel;
150 public void setAlignWithPanel(boolean alignWithPanel)
152 this.alignWithPanel = alignWithPanel;
155 public boolean isColourWithAlignPanel()
157 return colourWithAlignPanel;
160 public void setColourWithAlignPanel(boolean colourWithAlignPanel)
162 this.colourWithAlignPanel = colourWithAlignPanel;
165 public boolean isColourByViewer()
167 return colourByViewer;
170 public void setColourByViewer(boolean colourByViewer)
172 this.colourByViewer = colourByViewer;
175 public String getStateData()
180 public void setStateData(String stateData)
182 this.stateData = stateData;
185 public Map<File, StructureData> getFileData()
190 protected void setFileData(Map<File, StructureData> fileData)
192 this.fileData = fileData;
195 public String getViewId()
200 public String getType()