From 2d3bf89e4c4a93d78af9772a78e94d5be7d15402 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 27 Jan 2015 08:58:12 +0000 Subject: [PATCH] JAL-1588 new class renamed --- .../{ViewerData.java => StructureViewerModel.java} | 4 +-- src/jalview/gui/Jalview2XML.java | 30 ++++++++++---------- src/jalview/gui/StructureViewer.java | 4 +-- 3 files changed, 19 insertions(+), 19 deletions(-) rename src/jalview/datamodel/{ViewerData.java => StructureViewerModel.java} (96%) diff --git a/src/jalview/datamodel/ViewerData.java b/src/jalview/datamodel/StructureViewerModel.java similarity index 96% rename from src/jalview/datamodel/ViewerData.java rename to src/jalview/datamodel/StructureViewerModel.java index 0b6b8d1..098372b 100644 --- a/src/jalview/datamodel/ViewerData.java +++ b/src/jalview/datamodel/StructureViewerModel.java @@ -9,7 +9,7 @@ import java.util.Map; /** * A data bean to hold stored data about a structure viewer. */ -public class ViewerData +public class StructureViewerModel { private int x; @@ -83,7 +83,7 @@ public class ViewerData } } - public ViewerData(int x, int y, int width, int height, + public StructureViewerModel(int x, int y, int width, int height, boolean alignWithPanel, boolean colourWithAlignPanel, boolean colourByViewer) { diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 102e463..a2cd147 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -27,8 +27,8 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; -import jalview.datamodel.ViewerData; -import jalview.datamodel.ViewerData.StructureData; +import jalview.datamodel.StructureViewerModel; +import jalview.datamodel.StructureViewerModel.StructureData; import jalview.schemabinding.version2.AlcodMap; import jalview.schemabinding.version2.Alcodon; import jalview.schemabinding.version2.AlcodonFrame; @@ -3044,7 +3044,7 @@ public class Jalview2XML * Run through all PDB ids on the alignment, and collect mappings between * distinct view ids and all sequences referring to that view. */ - Map structureViewers = new LinkedHashMap(); + Map structureViewers = new LinkedHashMap(); for (int i = 0; i < jseqs.length; i++) { @@ -3086,7 +3086,7 @@ public class Jalview2XML } if (!structureViewers.containsKey(sviewid)) { - structureViewers.put(sviewid, new ViewerData(x, y, width, height, + structureViewers.put(sviewid, new StructureViewerModel(x, y, width, height, false, false, true)); // Legacy pre-2.7 conversion JAL-823 : // do not assume any view has to be linked for colour by @@ -3097,7 +3097,7 @@ public class Jalview2XML // file }, orig_fileloc, SequenceI[][] {{ seqs_file 1 }, { // seqs_file 2}, boolean[] { // linkAlignPanel,superposeWithAlignpanel}} from hash - ViewerData jmoldat = structureViewers.get(sviewid); + StructureViewerModel jmoldat = structureViewers.get(sviewid); jmoldat.setAlignWithPanel(jmoldat.isAlignWithPanel() | (structureState.hasAlignwithAlignPanel() ? structureState .getAlignwithAlignPanel() : false)); @@ -3156,7 +3156,7 @@ public class Jalview2XML } } // Instantiate the associated structure views - for (Entry entry : structureViewers.entrySet()) + for (Entry entry : structureViewers.entrySet()) { createOrLinkStructureViewer(entry, af, ap); } @@ -3169,10 +3169,10 @@ public class Jalview2XML * @param ap */ protected void createOrLinkStructureViewer( - Entry viewerData, AlignFrame af, + Entry viewerData, AlignFrame af, AlignmentPanel ap) { - final ViewerData svattrib = viewerData.getValue(); + final StructureViewerModel svattrib = viewerData.getValue(); /* * Search for any viewer windows already open from other alignment views @@ -3206,10 +3206,10 @@ public class Jalview2XML * @param viewerData * @param af */ - protected void createChimeraViewer(Entry viewerData, + protected void createChimeraViewer(Entry viewerData, AlignFrame af) { - final ViewerData data = viewerData.getValue(); + final StructureViewerModel data = viewerData.getValue(); String chimeraSession = data.getStateData(); if (new File(chimeraSession).exists()) @@ -3255,9 +3255,9 @@ public class Jalview2XML * @param af */ protected void createJmolViewer( - final Entry viewerData, AlignFrame af) + final Entry viewerData, AlignFrame af) { - final ViewerData svattrib = viewerData.getValue(); + final StructureViewerModel svattrib = viewerData.getValue(); String state = svattrib.getStateData(); List pdbfilenames = new ArrayList(); List seqmaps = new ArrayList(); @@ -3400,10 +3400,10 @@ public class Jalview2XML * @return */ protected StructureViewerBase findMatchingViewer( - Entry viewerData) + Entry viewerData) { final String sviewid = viewerData.getKey(); - final ViewerData svattrib = viewerData.getValue(); + final StructureViewerModel svattrib = viewerData.getValue(); StructureViewerBase comp = null; JInternalFrame[] frames = getAllFrames(); for (JInternalFrame frame : frames) @@ -3447,7 +3447,7 @@ public class Jalview2XML * @param viewerColouring */ protected void linkStructureViewer(AlignmentPanel ap, - StructureViewerBase viewer, ViewerData svattrib) + StructureViewerBase viewer, StructureViewerModel svattrib) { // NOTE: if the jalview project is part of a shared session then // view synchronization should/could be done here. diff --git a/src/jalview/gui/StructureViewer.java b/src/jalview/gui/StructureViewer.java index b3b1962..8ff4c70 100644 --- a/src/jalview/gui/StructureViewer.java +++ b/src/jalview/gui/StructureViewer.java @@ -24,7 +24,7 @@ import jalview.api.structures.JalviewStructureDisplayI; import jalview.bin.Cache; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; -import jalview.datamodel.ViewerData; +import jalview.datamodel.StructureViewerModel; import jalview.structure.StructureSelectionManager; import java.awt.Rectangle; @@ -132,7 +132,7 @@ public class StructureViewer */ public JalviewStructureDisplayI createView(ViewerType type, String[] pdbf, String[] id, SequenceI[][] sq, - AlignmentPanel alignPanel, ViewerData viewerData, String fileloc, + AlignmentPanel alignPanel, StructureViewerModel viewerData, String fileloc, Rectangle rect, String vid) { final boolean useinViewerSuperpos = viewerData.isAlignWithPanel(); -- 1.7.10.2