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 Map<File, StructureData> fileData = new HashMap<File, StructureData>();
32 public class StructureData
34 private String filePath;
38 private List<SequenceI> seqList;
40 // TODO and possibly a list of chains?
43 * Constructor given structure file path and id.
48 public StructureData(String pdbFile, String id)
50 this.filePath = pdbFile;
52 this.seqList = new ArrayList<SequenceI>();
55 public String getFilePath()
60 protected void setFilePath(String filePath)
62 this.filePath = filePath;
65 public String getPdbId()
70 protected void setPdbId(String pdbId)
75 public List<SequenceI> getSeqList()
80 protected void setSeqList(List<SequenceI> seqList)
82 this.seqList = seqList;
86 public StructureViewerModel(int x, int y, int width, int height,
87 boolean alignWithPanel, boolean colourWithAlignPanel,
88 boolean colourByViewer)
94 this.alignWithPanel = alignWithPanel;
95 this.colourWithAlignPanel = colourWithAlignPanel;
96 this.colourByViewer = colourByViewer;
104 protected void setX(int x)
114 protected void setY(int y)
119 public int getWidth()
124 protected void setWidth(int width)
129 public int getHeight()
134 public void setHeight(int height)
136 this.height = height;
139 public boolean isAlignWithPanel()
141 return alignWithPanel;
144 public void setAlignWithPanel(boolean alignWithPanel)
146 this.alignWithPanel = alignWithPanel;
149 public boolean isColourWithAlignPanel()
151 return colourWithAlignPanel;
154 public void setColourWithAlignPanel(boolean colourWithAlignPanel)
156 this.colourWithAlignPanel = colourWithAlignPanel;
159 public boolean isColourByViewer()
161 return colourByViewer;
164 public void setColourByViewer(boolean colourByViewer)
166 this.colourByViewer = colourByViewer;
169 public String getStateData()
174 public void setStateData(String stateData)
176 this.stateData = stateData;
179 public Map<File, StructureData> getFileData()
184 protected void setFileData(Map<File, StructureData> fileData)
186 this.fileData = fileData;