X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjavascript%2FMouseOverStructureListener.java;h=f0b31322f647049ae5aaccb2cce685503a15a1a7;hb=7cfe01e2f50e0be1965741ebde2e02cacc6aafa2;hp=607193317fb359e82ed041342c5ee71581e1be88;hpb=14193747f3831242bc7dfac12394eb20eb0ba480;p=jalview.git diff --git a/src/jalview/javascript/MouseOverStructureListener.java b/src/jalview/javascript/MouseOverStructureListener.java index 6071933..f0b3132 100644 --- a/src/jalview/javascript/MouseOverStructureListener.java +++ b/src/jalview/javascript/MouseOverStructureListener.java @@ -30,7 +30,6 @@ import jalview.ext.jmol.JmolCommands; import jalview.structure.AtomSpec; import jalview.structure.StructureListener; import jalview.structure.StructureMapping; -import jalview.structure.StructureMappingcommandSet; import jalview.structure.StructureSelectionManager; import jalview.util.HttpUtils; @@ -157,7 +156,7 @@ public class MouseOverStructureListener extends JSFunctionExec "" + (atom.getPdbResNum()), "" + atom.getAtomIndex() }); } catch (Exception ex) { - System.err.println("Couldn't execute callback with " + _listenerfn + jalview.bin.Console.errPrintln("Couldn't execute callback with " + _listenerfn + " for atomSpec: " + atom); ex.printStackTrace(); } @@ -173,7 +172,7 @@ public class MouseOverStructureListener extends JSFunctionExec if (JalviewLite.debug) { - System.err.println( + jalview.bin.Console.errPrintln( this.getClass().getName() + " modelSet[0]: " + modelSet[0]); ssm.reportMapping(); } @@ -198,7 +197,7 @@ public class MouseOverStructureListener extends JSFunctionExec } // if (jvlite.debug) // { - // System.err.println("Mapped '" + modelSet[m] + "' to " + // jalview.bin.Console.errPrintln("Mapped '" + modelSet[m] + "' to " // + sequence[m].length + " sequences."); // } } @@ -220,21 +219,21 @@ public class MouseOverStructureListener extends JSFunctionExec // Form a colour command from the given alignment panel for each distinct // structure - ArrayList ccomands = new ArrayList(); - ArrayList pdbfn = new ArrayList(); - StructureMappingcommandSet[] colcommands = JmolCommands - .getColourBySequenceCommand(ssm, modelSet, sequence, sr, - (AlignmentViewPanel) source); + ArrayList ccomands = new ArrayList<>(); + ArrayList pdbfn = new ArrayList<>(); + String[] colcommands = new JmolCommands().colourBySequence(ssm, + modelSet, sequence, sr, (AlignmentViewPanel) source); if (colcommands == null) { return; } int sz = 0; - for (jalview.structure.StructureMappingcommandSet ccset : colcommands) + // for (jalview.structure.StructureMappingcommandSet ccset : colcommands) + for (String command : colcommands) { - sz += ccset.commands.length; - ccomands.add(ccset.commands); - pdbfn.add(ccset.mapping); + // sz += ccset.commands.length; + // ccomands.add(command); // ccset.commands); + // pdbfn.add(ccset.mapping); } String mclass, mhandle; @@ -261,7 +260,7 @@ public class MouseOverStructureListener extends JSFunctionExec executeJavascriptFunction(true, _listenerfn, st); } catch (Exception ex) { - System.err.println("Couldn't execute callback with " + _listenerfn + jalview.bin.Console.errPrintln("Couldn't execute callback with " + _listenerfn + " using args { " + st[0] + ", " + st[1] + ", " + st[2] + "," + st[3] + "}"); // + ","+st[4]+"\n"); ex.printStackTrace(); @@ -275,7 +274,7 @@ public class MouseOverStructureListener extends JSFunctionExec * executeJavascriptFunction( false, _listenerfn, st = new String[] { * "colourstruct", "" + ((jalview.appletgui.AlignmentPanel) source).av * .getViewId(), handle, "" }); } catch (Exception ex) { - * System.err.println("Couldn't execute callback with " + _listenerfn + + * jalview.bin.Console.errPrintln("Couldn't execute callback with " + _listenerfn + * " using args { " + st[0] + ", " + st[1] + ", " + st[2] + "," + st[3] + * "\n"); ex.printStackTrace(); *