--- /dev/null
+package jalview.datamodel;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A data bean to hold stored data about a structure viewer.
+ */
+public class StructureViewerModel
+{
+ private int x;
+
+ private int y;
+
+ private int width;
+
+ private int height;
+
+ private boolean alignWithPanel;
+
+ private boolean colourWithAlignPanel;
+
+ private boolean colourByViewer;
+
+ private String stateData = "";
+
+ private Map<File, StructureData> fileData = new HashMap<File, StructureData>();
+
+ public class StructureData
+ {
+ private String filePath;
+
+ private String pdbId;
+
+ private List<SequenceI> seqList;
+
+ // TODO and possibly a list of chains?
+
+ /**
+ * Constructor given structure file path and id.
+ *
+ * @param pdbFile
+ * @param id
+ */
+ public StructureData(String pdbFile, String id)
+ {
+ this.filePath = pdbFile;
+ this.pdbId = id;
+ this.seqList = new ArrayList<SequenceI>();
+ }
+
+ public String getFilePath()
+ {
+ return filePath;
+ }
+
+ protected void setFilePath(String filePath)
+ {
+ this.filePath = filePath;
+ }
+
+ public String getPdbId()
+ {
+ return pdbId;
+ }
+
+ protected void setPdbId(String pdbId)
+ {
+ this.pdbId = pdbId;
+ }
+
+ public List<SequenceI> getSeqList()
+ {
+ return seqList;
+ }
+
+ protected void setSeqList(List<SequenceI> seqList)
+ {
+ this.seqList = seqList;
+ }
+ }
+
+ public StructureViewerModel(int x, int y, int width, int height,
+ boolean alignWithPanel, boolean colourWithAlignPanel,
+ boolean colourByViewer)
+ {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ this.alignWithPanel = alignWithPanel;
+ this.colourWithAlignPanel = colourWithAlignPanel;
+ this.colourByViewer = colourByViewer;
+ }
+
+ public int getX()
+ {
+ return x;
+ }
+
+ protected void setX(int x)
+ {
+ this.x = x;
+ }
+
+ public int getY()
+ {
+ return y;
+ }
+
+ protected void setY(int y)
+ {
+ this.y = y;
+ }
+
+ public int getWidth()
+ {
+ return width;
+ }
+
+ protected void setWidth(int width)
+ {
+ this.width = width;
+ }
+
+ public int getHeight()
+ {
+ return height;
+ }
+
+ public void setHeight(int height)
+ {
+ this.height = height;
+ }
+
+ public boolean isAlignWithPanel()
+ {
+ return alignWithPanel;
+ }
+
+ public void setAlignWithPanel(boolean alignWithPanel)
+ {
+ this.alignWithPanel = alignWithPanel;
+ }
+
+ public boolean isColourWithAlignPanel()
+ {
+ return colourWithAlignPanel;
+ }
+
+ public void setColourWithAlignPanel(boolean colourWithAlignPanel)
+ {
+ this.colourWithAlignPanel = colourWithAlignPanel;
+ }
+
+ public boolean isColourByViewer()
+ {
+ return colourByViewer;
+ }
+
+ public void setColourByViewer(boolean colourByViewer)
+ {
+ this.colourByViewer = colourByViewer;
+ }
+
+ public String getStateData()
+ {
+ return stateData;
+ }
+
+ public void setStateData(String stateData)
+ {
+ this.stateData = stateData;
+ }
+
+ public Map<File, StructureData> getFileData()
+ {
+ return fileData;
+ }
+
+ protected void setFileData(Map<File, StructureData> fileData)
+ {
+ this.fileData = fileData;
+ }
+
+}