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;
45 // TODO and possibly a list of chains?
48 * Constructor given structure file path and id.
53 public StructureData(String pdbFile, String id)
55 this.filePath = pdbFile;
57 this.seqList = new ArrayList<SequenceI>();
60 public String getFilePath()
65 protected void setFilePath(String filePath)
67 this.filePath = filePath;
70 public String getPdbId()
75 protected void setPdbId(String pdbId)
80 public List<SequenceI> getSeqList()
85 protected void setSeqList(List<SequenceI> seqList)
87 this.seqList = seqList;
91 public StructureViewerModel(int x, int y, int width, int height,
92 boolean alignWithPanel, boolean colourWithAlignPanel,
93 boolean colourByViewer, String viewId, String type)
99 this.alignWithPanel = alignWithPanel;
100 this.colourWithAlignPanel = colourWithAlignPanel;
101 this.colourByViewer = colourByViewer;
102 this.viewId = viewId;
111 protected void setX(int x)
121 protected void setY(int y)
126 public int getWidth()
131 protected void setWidth(int width)
136 public int getHeight()
141 public void setHeight(int height)
143 this.height = height;
146 public boolean isAlignWithPanel()
148 return alignWithPanel;
151 public void setAlignWithPanel(boolean alignWithPanel)
153 this.alignWithPanel = alignWithPanel;
156 public boolean isColourWithAlignPanel()
158 return colourWithAlignPanel;
161 public void setColourWithAlignPanel(boolean colourWithAlignPanel)
163 this.colourWithAlignPanel = colourWithAlignPanel;
166 public boolean isColourByViewer()
168 return colourByViewer;
171 public void setColourByViewer(boolean colourByViewer)
173 this.colourByViewer = colourByViewer;
176 public String getStateData()
181 public void setStateData(String stateData)
183 this.stateData = stateData;
186 public Map<File, StructureData> getFileData()
191 protected void setFileData(Map<File, StructureData> fileData)
193 this.fileData = fileData;
196 public String getViewId()
201 public String getType()