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 String viewId; // CHIMERA or JMOL (for projects from Jalview 2.9 on) private String type; private Map fileData = new HashMap(); public class StructureData { private String filePath; private String pdbId; private List 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(); } 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 getSeqList() { return seqList; } protected void setSeqList(List seqList) { this.seqList = seqList; } } public StructureViewerModel(int x, int y, int width, int height, boolean alignWithPanel, boolean colourWithAlignPanel, boolean colourByViewer, String viewId, String type) { this.x = x; this.y = y; this.width = width; this.height = height; this.alignWithPanel = alignWithPanel; this.colourWithAlignPanel = colourWithAlignPanel; this.colourByViewer = colourByViewer; this.viewId = viewId; this.type = type; } 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 getFileData() { return fileData; } protected void setFileData(Map fileData) { this.fileData = fileData; } public String getViewId() { return this.viewId; } public String getType() { return this.type; } }