From: gmungoc Date: Tue, 4 Feb 2020 16:14:42 +0000 (+0000) Subject: JAL-2422 pull up refactoring in preparation for ChimeraX subclasses X-Git-Tag: Release_2_11_2_0~37^2~37 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f2511dd2e8e37b8e999e924f8a53d150377b21b5;p=jalview.git JAL-2422 pull up refactoring in preparation for ChimeraX subclasses --- diff --git a/src/jalview/api/structures/JalviewStructureDisplayI.java b/src/jalview/api/structures/JalviewStructureDisplayI.java index 8f778f7..f59e4cb 100644 --- a/src/jalview/api/structures/JalviewStructureDisplayI.java +++ b/src/jalview/api/structures/JalviewStructureDisplayI.java @@ -125,4 +125,41 @@ public interface JalviewStructureDisplayI */ void raiseViewer(); + AlignmentViewPanel getAlignmentPanel(); + + /** + * Answers true if the given alignment view is used to colour structures by + * sequence, false if not + * + * @param ap + * @return + */ + boolean isUsedForColourBy(AlignmentViewPanel ap); + + /** + * If implemented, shows a command line console in the structure viewer + * + * @param show + * true to show, false to hide + */ + void showConsole(boolean show); + + /** + * Remove references to the given alignment view for this structure viewer + * + * @param avp + */ + void removeAlignmentPanel(AlignmentViewPanel avp); + + /** + * Updates the progress bar if there is one. Call stopProgressBar with the + * returned handle to remove the message. + * + * @param msg + * @return handle + */ + long startProgressBar(String progressMsg); + + void stopProgressBar(Object object, long handle); + } diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 3bb5fe8..846000a 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -3962,7 +3962,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, * without an additional javascript library to exchange messages between the * distinct applets. See http://issues.jalview.org/browse/JAL-621 * - * @param viewer + * @param jmolViewer * JmolViewer instance * @param sequenceIds * - sequence Ids to search for associations diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index 3d1442d..2cd9ee5 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -307,7 +307,7 @@ public class AppletJmol extends EmbmenuFrame implements else if (protocol == DataSourceType.FILE || protocol == DataSourceType.URL) { - jmb.viewer.openFile(pdbentry.getFile()); + jmb.jmolViewer.openFile(pdbentry.getFile()); } else { @@ -350,7 +350,7 @@ public class AppletJmol extends EmbmenuFrame implements throw new Exception(MessageManager.getString( "exception.invalid_datasource_couldnt_obtain_reader")); } - jmb.viewer.openReader(pdbentry.getFile(), pdbentry.getId(), + jmb.jmolViewer.openReader(pdbentry.getFile(), pdbentry.getId(), freader); } catch (Exception e) { @@ -658,7 +658,7 @@ public class AppletJmol extends EmbmenuFrame implements { currentSize = this.getSize(); - if (jmb.viewer == null) + if (jmb.jmolViewer == null) { g.setColor(Color.black); g.fillRect(0, 0, currentSize.width, currentSize.height); @@ -669,7 +669,7 @@ public class AppletJmol extends EmbmenuFrame implements } else { - jmb.viewer.renderScreenImage(g, currentSize.width, + jmb.jmolViewer.renderScreenImage(g, currentSize.width, currentSize.height); } } diff --git a/src/jalview/appletgui/AppletJmolBinding.java b/src/jalview/appletgui/AppletJmolBinding.java index e5767b6..dd6dea3 100644 --- a/src/jalview/appletgui/AppletJmolBinding.java +++ b/src/jalview/appletgui/AppletJmolBinding.java @@ -51,13 +51,6 @@ class AppletJmolBinding extends JalviewJmolBinding } @Override - public jalview.api.FeatureRenderer getFeatureRenderer( - AlignmentViewPanel alignment) - { - return appletJmolBinding.ap.getFeatureRenderer(); - } - - @Override public jalview.api.SequenceRenderer getSequenceRenderer( AlignmentViewPanel alignment) { @@ -154,7 +147,7 @@ class AppletJmolBinding extends JalviewJmolBinding Container consolePanel, String buttonsToShow) { JmolAppConsoleInterface appc = new AppletConsole(); - appc.start(viewer); + appc.start(jmolViewer); return appc; } diff --git a/src/jalview/appletgui/ExtJmol.java b/src/jalview/appletgui/ExtJmol.java index b0d3f7a..179cd55 100644 --- a/src/jalview/appletgui/ExtJmol.java +++ b/src/jalview/appletgui/ExtJmol.java @@ -21,7 +21,6 @@ package jalview.appletgui; import jalview.api.AlignmentViewPanel; -import jalview.api.FeatureRenderer; import jalview.api.SequenceRenderer; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; @@ -76,21 +75,6 @@ public class ExtJmol extends JalviewJmolBinding } @Override - public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment) - { - AlignmentPanel alignPanel = (AlignmentPanel) alignment; - if (alignPanel.av.isShowSequenceFeatures()) - { - return alignPanel.getFeatureRenderer(); - } - else - { - return null; - } - } - - - @Override public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment) { return ((AlignmentPanel) alignment).getSequenceRenderer(); diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 1ceabd1..e19bb29 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -95,7 +95,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel StringBuffer resetLastRes = new StringBuffer(); - public Viewer viewer; + public Viewer jmolViewer; public JalviewJmolBinding(StructureSelectionManager ssm, PDBEntry[] pdbentry, SequenceI[][] sequenceIs, @@ -116,9 +116,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel { super(ssm, seqs); - viewer = theViewer; - viewer.setJmolStatusListener(this); - viewer.addSelectionListener(this); + jmolViewer = theViewer; + jmolViewer.setJmolStatusListener(this); + jmolViewer.addSelectionListener(this); } /** @@ -166,9 +166,9 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel { // remove listeners for all structures in viewer getSsm().removeStructureViewerListener(this, this.getStructureFiles()); - viewer.dispose(); + jmolViewer.dispose(); lastCommand = null; - viewer = null; + jmolViewer = null; releaseUIResources(); } @@ -237,7 +237,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel public String superposeStructures(AlignmentI[] _alignment, int[] _refStructure, HiddenColumns[] _hiddenCols) { - while (viewer.isScriptExecuting()) + while (jmolViewer.isScriptExecuting()) { try { @@ -472,7 +472,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel jmolHistory(false); if (lastCommand == null || !lastCommand.equals(command)) { - viewer.evalStringQuiet(command + "\n"); + jmolViewer.evalStringQuiet(command + "\n"); } jmolHistory(true); lastCommand = command; @@ -579,7 +579,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel } // TODO: verify atomIndex is selecting correct model. // return new Color(viewer.getAtomArgb(atomIndex)); Jmol 12.2.4 - int colour = viewer.ms.at[atomIndex].atomPropertyInt(T.color); + int colour = jmolViewer.ms.at[atomIndex].atomPropertyInt(T.color); return new Color(colour); } @@ -618,18 +618,18 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel public synchronized String[] getStructureFiles() { List mset = new ArrayList<>(); - if (viewer == null) + if (jmolViewer == null) { return new String[0]; } if (modelFileNames == null) { - int modelCount = viewer.ms.mc; + int modelCount = jmolViewer.ms.mc; String filePath = null; for (int i = 0; i < modelCount; ++i) { - filePath = viewer.ms.getModelFileName(i); + filePath = jmolViewer.ms.getModelFileName(i); if (!mset.contains(filePath)) { mset.add(filePath); @@ -670,7 +670,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel { if (resetLastRes.length() > 0) { - viewer.evalStringQuiet(resetLastRes.toString()); + jmolViewer.evalStringQuiet(resetLastRes.toString()); resetLastRes.setLength(0); } for (AtomSpec atom : atoms) @@ -728,7 +728,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel cmd.append("spacefill 200;select none"); - viewer.evalStringQuiet(cmd.toString()); + jmolViewer.evalStringQuiet(cmd.toString()); jmolHistory(true); } @@ -737,7 +737,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel private void jmolHistory(boolean enable) { - viewer.evalStringQuiet("History " + ((debug || enable) ? "on" : "off")); + jmolViewer.evalStringQuiet("History " + ((debug || enable) ? "on" : "off")); } public void loadInline(String string) @@ -751,7 +751,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel // Then, construct pass a reader for the string to Jmol. // ((org.jmol.Viewer.Viewer) viewer).loadModelFromFile(fullPathName, // fileName, null, reader, false, null, null, 0); - viewer.openStringInline(string); + jmolViewer.openStringInline(string); } protected void mouseOverStructure(int atomIndex, final String strInfo) @@ -828,7 +828,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel if (pdbfilename == null) { - pdbfilename = new File(viewer.ms.getModelFileName(mnumber)) + pdbfilename = new File(jmolViewer.ms.getModelFileName(mnumber)) .getAbsolutePath(); } } @@ -915,12 +915,12 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel if (!atomsPicked.contains(picked)) { - viewer.evalStringQuiet("select " + picked + ";label %n %r:%c"); + jmolViewer.evalStringQuiet("select " + picked + ";label %n %r:%c"); atomsPicked.addElement(picked); } else { - viewer.evalString("select " + picked + ";label off"); + jmolViewer.evalString("select " + picked + ";label off"); atomsPicked.removeElement(picked); } jmolHistory(true); @@ -1088,7 +1088,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel // calculate essential attributes for the pdb data imported inline. // prolly need to resolve modelnumber properly - for now just use our // 'best guess' - pdbfile = viewer.getData( + pdbfile = jmolViewer.getData( "" + (1 + _modelFileNameMap[modelnum]) + ".0", "PDB"); } // search pdbentries and sequences to find correct pdbentry for this @@ -1160,7 +1160,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel // this is a foreign pdb file that jalview doesn't know about - add // it to the dataset and try to find a home - either on a matching // sequence or as a new sequence. - String pdbcontent = viewer.getData("/" + (modelnum + 1) + ".1", + String pdbcontent = jmolViewer.getData("/" + (modelnum + 1) + ".1", "PDB"); // parse pdb file into a chain, etc. // locate best match for pdb in associated views and add mapping to @@ -1179,7 +1179,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel // } if (!isLoadingFromArchive()) { - viewer.evalStringQuiet( + jmolViewer.evalStringQuiet( "model *; select backbone;restrict;cartoon;wireframe off;spacefill off"); } // register ourselves as a listener and notify the gui that it needs to @@ -1345,12 +1345,12 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel { commandOptions = ""; } - viewer = (Viewer) JmolViewer.allocateViewer(renderPanel, + jmolViewer = (Viewer) JmolViewer.allocateViewer(renderPanel, (jmolfileio ? new SmarterJmolAdapter() : null), htmlName + ((Object) this).toString(), documentBase, codeBase, commandOptions, this); - viewer.setJmolStatusListener(this); // extends JmolCallbackListener + jmolViewer.setJmolStatusListener(this); // extends JmolCallbackListener console = createJmolConsole(consolePanel, buttonsToShow); if (consolePanel != null) @@ -1370,7 +1370,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel public void setBackgroundColour(java.awt.Color col) { jmolHistory(false); - viewer.evalStringQuiet("background [" + col.getRed() + "," + jmolViewer.evalStringQuiet("background [" + col.getRed() + "," + col.getGreen() + "," + col.getBlue() + "];"); jmolHistory(true); } diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index d0fa5ef..fc9b445 100644 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@ -87,7 +87,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel /* * Object through which we talk to Chimera */ - private ChimeraManager viewer; + private ChimeraManager chimeraManager; /* * Object which listens to Chimera notifications @@ -138,7 +138,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel try { List modelsToMap = new ArrayList<>(); - List oldList = viewer.getModelList(); + List oldList = chimeraManager.getModelList(); boolean alreadyOpen = false; /* @@ -159,8 +159,8 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ if (!alreadyOpen) { - viewer.openModel(file, pe.getId(), ModelType.PDB_MODEL); - if (viewer.isChimeraX()) + chimeraManager.openModel(file, pe.getId(), ModelType.PDB_MODEL); + if (chimeraManager.isChimeraX()) { /* * ChimeraX hack: force chimera model name to pdbId @@ -178,7 +178,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel * Chimera: query for actual models and find the one with * matching model name - set in viewer.openModel() */ - List newList = viewer.getModelList(); + List newList = chimeraManager.getModelList(); // JAL-1728 newList.removeAll(oldList) does not work for (ChimeraModel cm : newList) { @@ -219,9 +219,9 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel DataSourceType protocol) { super(ssm, pdbentry, sequenceIs, protocol); - viewer = new ChimeraManager(new StructureManager(true)); + chimeraManager = new ChimeraManager(new StructureManager(true)); String viewerType = Cache.getProperty(Preferences.STRUCTURE_DISPLAY); - viewer.setChimeraX(ViewerType.CHIMERAX.name().equals(viewerType)); + chimeraManager.setChimeraX(ViewerType.CHIMERAX.name().equals(viewerType)); } @@ -232,7 +232,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ protected void startChimeraProcessMonitor() { - final Process p = viewer.getChimeraProcess(); + final Process p = chimeraManager.getChimeraProcess(); chimeraMonitor = new Thread(new Runnable() { @@ -265,7 +265,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel try { chimeraListener = new ChimeraListener(this); - viewer.startListening(chimeraListener.getUri()); + chimeraManager.startListening(chimeraListener.getUri()); } catch (BindException e) { System.err.println( @@ -319,14 +319,14 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel getSsm().removeStructureViewerListener(this, this.getStructureFiles()); if (closeChimera) { - viewer.exitChimera(); + chimeraManager.exitChimera(); } if (this.chimeraListener != null) { chimeraListener.shutdown(); chimeraListener = null; } - viewer = null; + chimeraManager = null; if (chimeraMonitor != null) { @@ -355,7 +355,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel public void colourByCharge() { colourBySequence = false; - String command = viewer.isChimeraX() + String command = chimeraManager.isChimeraX() ? "color white;color :ASP,GLU red;color :LYS,ARG blue;color :CYS yellow" : "color white;color red ::ASP;color red ::GLU;color blue ::LYS;color blue ::ARG;color yellow ::CYS"; sendAsynchronousCommand(command, COLOURING_CHIMERA); @@ -378,7 +378,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel refreshPdbEntries(); StringBuilder selectioncom = new StringBuilder(256); - boolean chimeraX = viewer.isChimeraX(); + boolean chimeraX = chimeraManager.isChimeraX(); for (int a = 0; a < _alignment.length; a++) { int refStructure = _refStructure[a]; @@ -676,13 +676,13 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ public boolean launchChimera() { - if (viewer.isChimeraLaunched()) + if (chimeraManager.isChimeraLaunched()) { return true; } - boolean launched = viewer.launchChimera( - StructureManager.getChimeraPaths(viewer.isChimeraX())); + boolean launched = chimeraManager.launchChimera( + StructureManager.getChimeraPaths(chimeraManager.isChimeraX())); if (launched) { startChimeraProcessMonitor(); @@ -702,7 +702,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ public boolean isChimeraRunning() { - return viewer.isChimeraLaunched(); + return chimeraManager.isChimeraLaunched(); } /** @@ -717,7 +717,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel public List sendChimeraCommand(final String command, boolean getResponse) { - if (viewer == null) + if (chimeraManager == null) { // ? thread running after viewer shut down return null; @@ -727,7 +727,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel if (true /*lastCommand == null || !lastCommand.equals(command)*/) { // trim command or it may never find a match in the replyLog!! - List lastReply = viewer.sendChimeraCommand(command.trim(), + List lastReply = chimeraManager.sendChimeraCommand(command.trim(), getResponse); if (getResponse) { @@ -783,7 +783,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel String[] files, SequenceRenderer sr, AlignmentViewPanel viewPanel) { return ChimeraCommands.getColourBySequenceCommand(getSsm(), files, - getSequence(), sr, viewPanel, viewer.isChimeraX()); + getSequence(), sr, viewPanel, chimeraManager.isChimeraX()); } /** @@ -798,7 +798,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel private void waitForChimera() { - while (viewer != null && viewer.isBusy()) + while (chimeraManager != null && chimeraManager.isBusy()) { try { @@ -831,7 +831,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel @Override public synchronized String[] getStructureFiles() { - if (viewer == null) + if (chimeraManager == null) { return new String[0]; } @@ -852,7 +852,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel return; } - boolean forChimeraX = viewer.isChimeraX(); + boolean forChimeraX = chimeraManager.isChimeraX(); StringBuilder cmd = new StringBuilder(128); boolean first = true; boolean found = false; @@ -906,11 +906,11 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ if (lastHighlightCommand != null) { - viewer.sendChimeraCommand("~" + lastHighlightCommand, false); + chimeraManager.sendChimeraCommand("~" + lastHighlightCommand, false); } if (found) { - viewer.sendChimeraCommand(command, false); + chimeraManager.sendChimeraCommand(command, false); } this.lastHighlightCommand = command; } @@ -923,7 +923,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel /* * Ask Chimera for its current selection */ - List selection = viewer.getSelectedResidueSpecs(); + List selection = chimeraManager.getSelectedResidueSpecs(); /* * Parse model number, residue and chain for each selected position, @@ -949,7 +949,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel protected List convertStructureResiduesToAlignment( List structureSelection) { - boolean chimeraX = viewer.isChimeraX(); + boolean chimeraX = chimeraManager.isChimeraX(); List atomSpecs = new ArrayList<>(); for (String atomSpec : structureSelection) { @@ -1028,7 +1028,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel * Chimera format: color colorCode ::VAL * ChimeraX format: color :VAL colourCode */ - boolean chimeraX = viewer.isChimeraX(); + boolean chimeraX = chimeraManager.isChimeraX(); for (String resName : residueSet) { char res = resName.length() == 3 @@ -1101,7 +1101,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel { viewerCommandHistory(false); String command = "set bgColor " + ColorUtils.toTkCode(col); - viewer.sendChimeraCommand(command, false); + chimeraManager.sendChimeraCommand(command, false); viewerCommandHistory(true); } @@ -1121,7 +1121,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel * ChimeraX: https://www.cgl.ucsf.edu/chimerax/docs/user/commands/save.html */ String command = isChimeraX() ? "save session " : "save "; - List reply = viewer.sendChimeraCommand(command + filepath, + List reply = chimeraManager.sendChimeraCommand(command + filepath, true); if (reply.contains("Session written")) { @@ -1172,7 +1172,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ public void focusView() { - sendChimeraCommand(viewer.isChimeraX() ? "view" : "focus", false); + sendChimeraCommand(chimeraManager.isChimeraX() ? "view" : "focus", false); } /** @@ -1223,7 +1223,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel StructureMappingcommandSet commandSet = ChimeraCommands .getSetAttributeCommandsForFeatures(getSsm(), files, - getSequence(), avp, viewer.isChimeraX()); + getSequence(), avp, chimeraManager.isChimeraX()); String[] commands = commandSet.commands; if (commands.length > 10) { @@ -1248,7 +1248,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ protected void sendCommandsByFile(String[] commands) { - boolean toChimeraX = viewer.isChimeraX(); + boolean toChimeraX = chimeraManager.isChimeraX(); try { File tmp = File.createTempFile("chim", toChimeraX ? ".cxc" : ".com"); @@ -1320,7 +1320,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel { boolean featureAdded = false; String featureGroup = getViewerFeatureGroup(); - boolean chimeraX = viewer.isChimeraX(); + boolean chimeraX = chimeraManager.isChimeraX(); for (String residue : residues) { @@ -1433,7 +1433,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel */ public List getChimeraAttributes() { - List atts = viewer.getAttrList(); + List atts = chimeraManager.getAttrList(); Iterator it = atts.iterator(); while (it.hasNext()) { @@ -1450,6 +1450,6 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel public boolean isChimeraX() { - return viewer.isChimeraX(); + return chimeraManager.isChimeraX(); } } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index fcb6572..0ff6f0c 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -398,7 +398,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, addKeyListener(); - final List selviews = new ArrayList<>(); + final List selviews = new ArrayList<>(); final List origview = new ArrayList<>(); final String menuLabel = MessageManager .getString("label.copy_format_from"); diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index e9c5416..83ec177 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.AlignmentViewPanel; import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; @@ -154,14 +155,6 @@ public class AppJmol extends StructureViewerBase .getString("label.let_jmol_manage_structure_colours")); } - IProgressIndicator progressBar = null; - - @Override - protected IProgressIndicator getIProgressIndicator() - { - return progressBar; - } - /** * display a single PDB structure in a new Jmol view * @@ -173,7 +166,7 @@ public class AppJmol extends StructureViewerBase public AppJmol(PDBEntry pdbentry, SequenceI[] seq, String[] chains, final AlignmentPanel ap) { - progressBar = ap.alignFrame; + setProgressIndicator(ap.alignFrame); openNewJmol(ap, alignAddedStructures, new PDBEntry[] { pdbentry }, new SequenceI[][] @@ -184,7 +177,7 @@ public class AppJmol extends StructureViewerBase PDBEntry[] pdbentrys, SequenceI[][] seqs) { - progressBar = ap.alignFrame; + setProgressIndicator(ap.alignFrame); jmb = new AppJmolBinding(this, ap.getStructureSelectionManager(), pdbentrys, seqs, null); addAlignmentPanel(ap); @@ -396,7 +389,7 @@ public class AppJmol extends StructureViewerBase } // refresh the sequence colours for the new structure(s) - for (AlignmentPanel ap : _colourwith) + for (AlignmentViewPanel ap : _colourwith) { jmb.updateColours(ap); } @@ -418,7 +411,7 @@ public class AppJmol extends StructureViewerBase @Override public void run() { - if (jmb.viewer.isScriptExecuting()) + if (jmb.jmolViewer.isScriptExecuting()) { SwingUtilities.invokeLater(this); try @@ -469,12 +462,9 @@ public class AppJmol extends StructureViewerBase AlignmentI pdbseq = null; pdbid = jmb.getPdbEntry(pi).getId(); long hdl = pdbid.hashCode() - System.currentTimeMillis(); - if (progressBar != null) - { - progressBar.setProgressBar(MessageManager - .formatMessage("status.fetching_pdb", new String[] - { pdbid }), hdl); - } + setProgressMessage(MessageManager + .formatMessage("status.fetching_pdb", new String[] + { pdbid }), hdl); try { pdbseq = pdbclient.getSequenceRecords(pdbid); @@ -487,12 +477,8 @@ public class AppJmol extends StructureViewerBase errormsgs.append("'").append(pdbid).append("'"); } finally { - if (progressBar != null) - { - progressBar.setProgressBar( - MessageManager.getString("label.state_completed"), - hdl); - } + setProgressMessage( + MessageManager.getString("label.state_completed"), hdl); } if (pdbseq != null) { @@ -590,7 +576,7 @@ public class AppJmol extends StructureViewerBase if (im.getGraphics() != null) { - jmb.viewer.renderScreenImage(im.getGraphics(), width, height); + jmb.jmolViewer.renderScreenImage(im.getGraphics(), width, height); im.writeImage(); } } @@ -608,9 +594,9 @@ public class AppJmol extends StructureViewerBase } } + @Override public void showConsole(boolean showConsole) { - if (showConsole) { if (splitPane == null) @@ -676,7 +662,7 @@ public class AppJmol extends StructureViewerBase } } } - else if (jmb == null || jmb.viewer == null || !jmb.isFinishedInit()) + else if (jmb == null || jmb.jmolViewer == null || !jmb.isFinishedInit()) { g.setColor(Color.black); g.fillRect(0, 0, currentSize.width, currentSize.height); @@ -687,7 +673,7 @@ public class AppJmol extends StructureViewerBase } else { - jmb.viewer.renderScreenImage(g, currentSize.width, + jmb.jmolViewer.renderScreenImage(g, currentSize.width, currentSize.height); } } @@ -702,7 +688,7 @@ public class AppJmol extends StructureViewerBase @Override public String getStateInfo() { - return jmb == null ? null : jmb.viewer.getStateInfo(); + return jmb == null ? null : jmb.jmolViewer.getStateInfo(); } @Override diff --git a/src/jalview/gui/AppJmolBinding.java b/src/jalview/gui/AppJmolBinding.java index 724cec1..aa6a159 100644 --- a/src/jalview/gui/AppJmolBinding.java +++ b/src/jalview/gui/AppJmolBinding.java @@ -32,26 +32,20 @@ import jalview.structure.StructureSelectionManager; import java.awt.Container; import java.util.Map; +import javax.swing.JComponent; + import org.jmol.api.JmolAppConsoleInterface; import org.jmol.java.BS; import org.openscience.jmol.app.jmolpanel.console.AppConsole; public class AppJmolBinding extends JalviewJmolBinding { - private AppJmol appJmolWindow; - public AppJmolBinding(AppJmol appJmol, StructureSelectionManager sSm, PDBEntry[] pdbentry, SequenceI[][] sequenceIs, DataSourceType protocol) { super(sSm, pdbentry, sequenceIs, protocol); - appJmolWindow = appJmol; - } - - @Override - protected IProgressIndicator getIProgressIndicator() - { - return appJmolWindow.progressBar; + setViewer(appJmol); } @Override @@ -102,8 +96,9 @@ public class AppJmolBinding extends JalviewJmolBinding @Override public void run() { - appJmolWindow.updateTitleAndMenus(); - appJmolWindow.revalidate(); + JalviewStructureDisplayI theViewer = getViewer(); + theViewer.updateTitleAndMenus(); + ((JComponent) theViewer).revalidate(); } }); } @@ -113,7 +108,7 @@ public class AppJmolBinding extends JalviewJmolBinding { AlignmentPanel ap = (AlignmentPanel) source; // ignore events from panels not used to colour this view - if (!appJmolWindow.isUsedforcolourby(ap)) + if (!getViewer().isUsedForColourBy(ap)) { return; } @@ -161,21 +156,21 @@ public class AppJmolBinding extends JalviewJmolBinding @Override public void showConsole(boolean b) { - appJmolWindow.showConsole(b); + getViewer().showConsole(b); } @Override protected JmolAppConsoleInterface createJmolConsole( Container consolePanel, String buttonsToShow) { - viewer.setJmolCallbackListener(this); - return new AppConsole(viewer, consolePanel, buttonsToShow); + jmolViewer.setJmolCallbackListener(this); + return new AppConsole(jmolViewer, consolePanel, buttonsToShow); } @Override protected void releaseUIResources() { - appJmolWindow = null; + setViewer(null); closeConsole(); } @@ -184,7 +179,7 @@ public class AppJmolBinding extends JalviewJmolBinding { if (svl instanceof SeqPanel) { - appJmolWindow.removeAlignmentPanel(((SeqPanel) svl).ap); + getViewer().removeAlignmentPanel(((SeqPanel) svl).ap); } } @@ -194,25 +189,4 @@ public class AppJmolBinding extends JalviewJmolBinding // TODO Auto-generated method stub return null; } - - @Override - public JalviewStructureDisplayI getViewer() - { - return appJmolWindow; - } - - @Override - public jalview.api.FeatureRenderer getFeatureRenderer( - AlignmentViewPanel alignment) - { - AlignmentPanel ap = (alignment == null) - ? appJmolWindow.getAlignmentPanel() - : (AlignmentPanel) alignment; - if (ap.av.isShowSequenceFeatures()) - { - return ap.av.getAlignPanel().getSeqPanel().seqCanvas.fr; - } - - return null; - } } diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index 183b475..22876a4 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.AlignmentViewPanel; import jalview.api.FeatureRenderer; import jalview.bin.Cache; import jalview.datamodel.AlignmentI; @@ -46,7 +47,6 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Random; import javax.swing.JCheckBoxMenuItem; import javax.swing.JInternalFrame; @@ -65,8 +65,6 @@ public class ChimeraViewFrame extends StructureViewerBase { private JalviewChimeraBinding jmb; - private IProgressIndicator progressBar = null; - /* * Path to Chimera session file. This is set when an open Jalview/Chimera * session is saved, or on restore from a Jalview project (if it holds the @@ -74,8 +72,6 @@ public class ChimeraViewFrame extends StructureViewerBase */ private String chimeraSessionFile = null; - private Random random = new Random(); - private int myWidth = 500; private int myHeight = 150; @@ -203,9 +199,9 @@ public class ChimeraViewFrame extends StructureViewerBase */ protected void createProgressBar() { - if (progressBar == null) + if (getProgressIndicator() == null) { - progressBar = new ProgressBar(statusPanel, statusBar); + setProgressIndicator(new ProgressBar(statusPanel, statusBar)); } } @@ -535,7 +531,7 @@ public class ChimeraViewFrame extends StructureViewerBase pdb = jmb.getSsm().setMapping(jmb.getSequence()[pos], jmb.getChains()[pos], pe.getFile(), protocol, - progressBar); + getProgressIndicator()); stashFoundChains(pdb, pe.getFile()); } catch (OutOfMemoryError oomerror) @@ -570,7 +566,7 @@ public class ChimeraViewFrame extends StructureViewerBase } // refresh the sequence colours for the new structure(s) - for (AlignmentPanel ap : _colourwith) + for (AlignmentViewPanel ap : _colourwith) { jmb.updateColours(ap); } @@ -657,40 +653,6 @@ public class ChimeraViewFrame extends StructureViewerBase return filePath; } - /** - * Convenience method to update the progress bar if there is one. Be sure to - * call stopProgressBar with the returned handle to remove the message. - * - * @param msg - * @param handle - */ - public long startProgressBar(String msg) - { - // TODO would rather have startProgress/stopProgress as the - // IProgressIndicator interface - long tm = random.nextLong(); - if (progressBar != null) - { - progressBar.setProgressBar(msg, tm); - } - return tm; - } - - /** - * End the progress bar with the specified handle, leaving a message (if not - * null) on the status bar - * - * @param msg - * @param handle - */ - public void stopProgressBar(String msg, long handle) - { - if (progressBar != null) - { - progressBar.setProgressBar(msg, handle); - } - } - @Override public void eps_actionPerformed(ActionEvent e) { @@ -831,10 +793,4 @@ public class ChimeraViewFrame extends StructureViewerBase } return reply; } - - @Override - protected IProgressIndicator getIProgressIndicator() - { - return progressBar; - } } diff --git a/src/jalview/gui/JalviewChimeraBindingModel.java b/src/jalview/gui/JalviewChimeraBindingModel.java index 9d63c6a..31f24df 100644 --- a/src/jalview/gui/JalviewChimeraBindingModel.java +++ b/src/jalview/gui/JalviewChimeraBindingModel.java @@ -27,33 +27,18 @@ import jalview.datamodel.SequenceI; import jalview.ext.rbvi.chimera.JalviewChimeraBinding; import jalview.io.DataSourceType; import jalview.structure.StructureSelectionManager; -import jalview.viewmodel.seqfeatures.FeatureRendererModel; +import javax.swing.JComponent; import javax.swing.SwingUtilities; public class JalviewChimeraBindingModel extends JalviewChimeraBinding { - private ChimeraViewFrame cvf; - public JalviewChimeraBindingModel(ChimeraViewFrame chimeraViewFrame, StructureSelectionManager ssm, PDBEntry[] pdbentry, SequenceI[][] sequenceIs, DataSourceType protocol) { super(ssm, pdbentry, sequenceIs, protocol); - cvf = chimeraViewFrame; - } - - @Override - public FeatureRendererModel getFeatureRenderer(AlignmentViewPanel alignment) - { - AlignmentPanel ap = (alignment == null) ? cvf.getAlignmentPanel() - : (AlignmentPanel) alignment; - if (ap.av.isShowSequenceFeatures()) - { - return ap.getSeqPanel().seqCanvas.fr; - } - - return null; + setViewer(chimeraViewFrame); } @Override @@ -71,8 +56,9 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding @Override public void run() { - cvf.updateTitleAndMenus(); - cvf.revalidate(); + JalviewStructureDisplayI theViewer = getViewer(); + theViewer.updateTitleAndMenus(); + ((JComponent) theViewer).revalidate(); } }); } @@ -80,9 +66,9 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding @Override public void updateColours(Object source) { - AlignmentPanel ap = (AlignmentPanel) source; + AlignmentViewPanel ap = (AlignmentViewPanel) source; // ignore events from panels not used to colour this view - if (!cvf.isUsedforcolourby(ap)) + if (!getViewer().isUsedForColourBy(ap)) { return; } @@ -116,7 +102,7 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding final String progressMsg) { final long handle = progressMsg == null ? 0 - : cvf.startProgressBar(progressMsg); + : getViewer().startProgressBar(progressMsg); SwingUtilities.invokeLater(new Runnable() { @Override @@ -129,16 +115,10 @@ public class JalviewChimeraBindingModel extends JalviewChimeraBinding { if (progressMsg != null) { - cvf.stopProgressBar(null, handle); + getViewer().stopProgressBar(null, handle); } } } }); } - - @Override - public JalviewStructureDisplayI getViewer() - { - return cvf; - } } diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index 35a5475..c9607c6 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -53,6 +53,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; +import java.util.Random; import java.util.Vector; import javax.swing.ButtonGroup; @@ -90,13 +91,13 @@ public abstract class StructureViewerBase extends GStructureViewer /** * list of alignment panels to use for superposition */ - protected Vector _alignwith = new Vector<>(); + protected Vector _alignwith = new Vector<>(); /** * list of alignment panels that are used for colouring structures by aligned * sequences */ - protected Vector _colourwith = new Vector<>(); + protected Vector _colourwith = new Vector<>(); private String viewId = null; @@ -121,6 +122,10 @@ public abstract class StructureViewerBase extends GStructureViewer */ protected volatile boolean seqColoursApplied = false; + private IProgressIndicator progressBar = null; + + private Random random = new Random(); + /** * Default constructor */ @@ -159,13 +164,14 @@ public abstract class StructureViewerBase extends GStructureViewer return _aps.contains(ap2.av.getSequenceSetId()); } - public boolean isUsedforaligment(AlignmentPanel ap2) + public boolean isUsedforaligment(AlignmentViewPanel ap2) { return (_alignwith != null) && _alignwith.contains(ap2); } - public boolean isUsedforcolourby(AlignmentPanel ap2) + @Override + public boolean isUsedForColourBy(AlignmentViewPanel ap2) { return (_colourwith != null) && _colourwith.contains(ap2); } @@ -215,6 +221,7 @@ public abstract class StructureViewerBase extends GStructureViewer } } + @Override public AlignmentPanel getAlignmentPanel() { return ap; @@ -267,7 +274,8 @@ public abstract class StructureViewerBase extends GStructureViewer * * @param nap */ - public void removeAlignmentPanel(AlignmentPanel nap) + @Override + public void removeAlignmentPanel(AlignmentViewPanel nap) { try { @@ -339,8 +347,6 @@ public abstract class StructureViewerBase extends GStructureViewer public abstract ViewerType getViewerType(); - protected abstract IProgressIndicator getIProgressIndicator(); - /** * add a new structure (with associated sequences and chains) to this viewer, * retrieving it if necessary first. @@ -449,7 +455,7 @@ public abstract class StructureViewerBase extends GStructureViewer * create the mappings */ apanel.getStructureSelectionManager().setMapping(seq, chains, - pdbFilename, DataSourceType.FILE, getIProgressIndicator()); + pdbFilename, DataSourceType.FILE, getProgressIndicator()); /* * alert the FeatureRenderer to show new (PDB RESNUM) features @@ -784,11 +790,11 @@ public abstract class StructureViewerBase extends GStructureViewer int[] alm = new int[_alignwith.size()]; int a = 0; - for (AlignmentPanel alignPanel : _alignwith) + for (AlignmentViewPanel alignPanel : _alignwith) { - als[a] = alignPanel.av.getAlignment(); + als[a] = alignPanel.getAlignment(); alm[a] = -1; - alc[a++] = alignPanel.av.getAlignment().getHiddenColumns(); + alc[a++] = alignPanel.getAlignment().getHiddenColumns(); } reply = getBinding().superposeStructures(als, alm, alc); if (reply != null) @@ -800,9 +806,9 @@ public abstract class StructureViewerBase extends GStructureViewer } catch (Exception e) { StringBuffer sp = new StringBuffer(); - for (AlignmentPanel alignPanel : _alignwith) + for (AlignmentViewPanel alignPanel : _alignwith) { - sp.append("'" + alignPanel.alignFrame.getTitle() + "' "); + sp.append("'" + alignPanel.getViewName() + "' "); } Cache.log.info("Couldn't align structures with the " + sp.toString() + "associated alignment panels.", e); @@ -866,7 +872,7 @@ public abstract class StructureViewerBase extends GStructureViewer } } // Set the colour using the current view for the associated alignframe - for (AlignmentPanel alignPanel : _colourwith) + for (AlignmentViewPanel alignPanel : _colourwith) { binding.colourBySequence(alignPanel); } @@ -1041,4 +1047,61 @@ public abstract class StructureViewerBase extends GStructureViewer toFront(); } + @Override + public long startProgressBar(String msg) + { + // TODO would rather have startProgress/stopProgress as the + // IProgressIndicator interface + long tm = random.nextLong(); + if (progressBar != null) + { + progressBar.setProgressBar(msg, tm); + } + return tm; + } + + /** + * End the progress bar with the specified handle, leaving a message (if not + * null) on the status bar + * + * @param msg + * @param handle + */ + public void stopProgressBar(String msg, long handle) + { + if (progressBar != null) + { + progressBar.setProgressBar(msg, handle); + } + } + + @Override + public void stopProgressBar(Object object, long handle) + { + } + + protected IProgressIndicator getProgressIndicator() + { + return progressBar; + } + + protected void setProgressIndicator(IProgressIndicator pi) + { + progressBar = pi; + } + + protected void setProgressMessage(String message, long id) + { + if (progressBar != null) + { + progressBar.setProgressBar(message, id); + } + } + + @Override + public void showConsole(boolean show) + { + // default does nothing + } + } diff --git a/src/jalview/gui/ViewSelectionMenu.java b/src/jalview/gui/ViewSelectionMenu.java index 2a7743a..a1529fc 100644 --- a/src/jalview/gui/ViewSelectionMenu.java +++ b/src/jalview/gui/ViewSelectionMenu.java @@ -20,6 +20,7 @@ */ package jalview.gui; +import jalview.api.AlignmentViewPanel; import jalview.util.MessageManager; import java.awt.Component; @@ -56,7 +57,7 @@ public class ViewSelectionMenu extends JMenu private ViewSetProvider _allviews; - private List _selectedviews; + private List _selectedviews; private ItemListener _handler; @@ -79,7 +80,7 @@ public class ViewSelectionMenu extends JMenu * selection/deselection state */ public ViewSelectionMenu(String title, final ViewSetProvider allviews, - final List selectedviews, + final List selectedviews, final ItemListener handler) { super(title); diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 2d8a4a6..1943a45 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -2110,7 +2110,7 @@ public class Jalview2XML final String viewId = viewFrame.getViewId(); state.setViewId(viewId); state.setAlignwithAlignPanel(viewFrame.isUsedforaligment(ap)); - state.setColourwithAlignPanel(viewFrame.isUsedforcolourby(ap)); + state.setColourwithAlignPanel(viewFrame.isUsedForColourBy(ap)); state.setColourByJmol(viewFrame.isColouredByViewer()); state.setType(viewFrame.getViewerType().toString()); // pdb.addStructureState(state); diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index 2528286..b4e9dd2 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -21,6 +21,7 @@ package jalview.structures.models; import jalview.api.AlignmentViewPanel; +import jalview.api.FeatureRenderer; import jalview.api.SequenceRenderer; import jalview.api.StructureSelectionManagerProvider; import jalview.api.structures.JalviewStructureDisplayI; @@ -57,6 +58,11 @@ public abstract class AAStructureBindingModel extends SequenceStructureBindingModel implements StructureListener, StructureSelectionManagerProvider { + /* + * the Jalview panel through which the user interacts + * with the structure viewer + */ + private JalviewStructureDisplayI viewer; private StructureSelectionManager ssm; @@ -355,8 +361,8 @@ public abstract class AAStructureBindingModel { Integer.valueOf(pe).toString() })); } final String nullChain = "TheNullChain"; - List s = new ArrayList(); - List c = new ArrayList(); + List s = new ArrayList<>(); + List c = new ArrayList<>(); if (getChains() == null) { setChains(new String[getPdbCount()][]); @@ -425,8 +431,8 @@ public abstract class AAStructureBindingModel public synchronized PDBEntry[] addSequenceAndChain(PDBEntry[] pdbe, SequenceI[][] seq, String[][] chns) { - List v = new ArrayList(); - List rtn = new ArrayList(); + List v = new ArrayList<>(); + List rtn = new ArrayList<>(); for (int i = 0; i < getPdbCount(); i++) { v.add(getPdbEntry(i)); @@ -745,7 +751,12 @@ public abstract class AAStructureBindingModel */ public JalviewStructureDisplayI getViewer() { - return null; + return viewer; + } + + public void setViewer(JalviewStructureDisplayI v) + { + viewer = v; } public abstract void setJalviewColourScheme(ColourSchemeI cs); @@ -821,6 +832,19 @@ public abstract class AAStructureBindingModel return fileLoadingError != null && fileLoadingError.length() > 0; } - public abstract jalview.api.FeatureRenderer getFeatureRenderer( - AlignmentViewPanel alignment); + /** + * Returns the FeatureRenderer for the given alignment view, or null if + * feature display is turned off in the view. + * + * @param avp + * @return + */ + public FeatureRenderer getFeatureRenderer(AlignmentViewPanel avp) + { + AlignmentViewPanel ap = (avp == null) ? getViewer().getAlignmentPanel() + : avp; + return ap.getAlignViewport().isShowSequenceFeatures() + ? ap.getFeatureRenderer() + : null; + } } diff --git a/test/jalview/structures/models/AAStructureBindingModelTest.java b/test/jalview/structures/models/AAStructureBindingModelTest.java index af02d5e..2e2a9f2 100644 --- a/test/jalview/structures/models/AAStructureBindingModelTest.java +++ b/test/jalview/structures/models/AAStructureBindingModelTest.java @@ -25,7 +25,6 @@ import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; import jalview.api.AlignmentViewPanel; -import jalview.api.FeatureRenderer; import jalview.api.SequenceRenderer; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; @@ -194,13 +193,6 @@ public class AAStructureBindingModelTest } @Override - public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment) - { - // TODO Auto-generated method stub - return null; - } - - @Override protected StructureMappingcommandSet[] getColourBySequenceCommands( String[] files, SequenceRenderer sr, AlignmentViewPanel avp) { @@ -356,13 +348,6 @@ public class AAStructureBindingModelTest public void colourByCharge() { } - - @Override - public FeatureRenderer getFeatureRenderer( - AlignmentViewPanel alignment) - { - return null; - } }; }