1 Clazz.declarePackage ("jalview.appletgui");
\r
2 Clazz.load (["awt2swing.Panel", "jalview.structure.SelectionListener", "$.SequenceListener", "java.awt.event.MouseListener", "$.MouseMotionListener", "java.lang.Thread"], "jalview.appletgui.SeqPanel", ["jalview.api.AlignViewportI", "jalview.appletgui.APopupMenu", "$.AlignViewport", "$.PaintRefresher", "$.SeqCanvas", "$.SliderPanel", "$.Tooltip", "jalview.commands.EditCommand", "jalview.datamodel.ColumnSelection", "$.SearchResults", "$.SequenceGroup", "jalview.schemes.ResidueProperties", "jalview.structure.StructureSelectionManager", "jalview.util.Comparison", "$.MappingUtils", "$.MessageManager", "java.awt.BorderLayout", "$.Font", "java.lang.StringBuffer", "$.StringBuilder", "java.util.Vector"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.seqCanvas = null;
\r
9 this.seqEditOccurred = false;
\r
10 this.scrollThread = null;
\r
11 this.mouseDragging = false;
\r
12 this.editingSeqs = false;
\r
13 this.groupEditing = false;
\r
15 this.changeEndSeq = false;
\r
16 this.changeStartSeq = false;
\r
17 this.changeEndRes = false;
\r
18 this.changeStartRes = false;
\r
19 this.stretchGroup = null;
\r
20 this.keyboardNo1 = null;
\r
21 this.keyboardNo2 = null;
\r
22 this.mouseWheelPressed = false;
\r
23 this.lastMousePress = null;
\r
24 this.editCommand = null;
\r
26 this.startWrapBlock = -1;
\r
27 this.wrappedBlock = -1;
\r
28 this.lastMessage = null;
\r
29 this.tooltip = null;
\r
30 if (!Clazz.isClassDefined ("jalview.appletgui.SeqPanel.ScrollThread")) {
\r
31 jalview.appletgui.SeqPanel.$SeqPanel$ScrollThread$ ();
\r
33 Clazz.instantialize (this, arguments);
\r
34 }, jalview.appletgui, "SeqPanel", awt2swing.Panel, [java.awt.event.MouseMotionListener, java.awt.event.MouseListener, jalview.structure.SequenceListener, jalview.structure.SelectionListener]);
\r
35 Clazz.makeConstructor (c$,
\r
37 Clazz.superConstructor (this, jalview.appletgui.SeqPanel, []);
\r
39 this.setName ("seqPanel");
\r
40 this.seqCanvas = new jalview.appletgui.SeqCanvas (avp);
\r
41 this.setLayout ( new java.awt.BorderLayout ());
\r
42 this.add (this.seqCanvas);
\r
44 this.seqCanvas.addMouseMotionListener (this);
\r
45 this.seqCanvas.addMouseListener (this);
\r
46 this.ssm = jalview.structure.StructureSelectionManager.getStructureSelectionManager (this.av.applet);
\r
47 this.ssm.addStructureViewerListener (this);
\r
48 this.ssm.addSelectionListener (this);
\r
49 this.seqCanvas.repaint ();
\r
50 }, "jalview.appletgui.AlignViewport,jalview.appletgui.AlignmentPanel");
\r
51 Clazz.defineMethod (c$, "endEditing",
\r
53 if (this.editCommand != null && this.editCommand.getSize () > 0) {
\r
54 this.ap.alignFrame.addHistoryItem (this.editCommand);
\r
55 this.av.firePropertyChange ("alignment", null, this.av.getAlignment ().getSequences ());
\r
56 }this.startseq = -1;
\r
58 this.editingSeqs = false;
\r
59 this.groupEditing = false;
\r
60 this.keyboardNo1 = null;
\r
61 this.keyboardNo2 = null;
\r
62 this.editCommand = null;
\r
64 Clazz.defineMethod (c$, "setCursorRow",
\r
66 this.seqCanvas.cursorY = this.getKeyboardNo1 () - 1;
\r
67 this.scrollToVisible ();
\r
69 Clazz.defineMethod (c$, "setCursorColumn",
\r
71 this.seqCanvas.cursorX = this.getKeyboardNo1 () - 1;
\r
72 this.scrollToVisible ();
\r
74 Clazz.defineMethod (c$, "setCursorRowAndColumn",
\r
76 if (this.keyboardNo2 == null) {
\r
77 this.keyboardNo2 = new StringBuffer ();
\r
79 this.seqCanvas.cursorX = this.getKeyboardNo1 () - 1;
\r
80 this.seqCanvas.cursorY = this.getKeyboardNo2 () - 1;
\r
81 this.scrollToVisible ();
\r
83 Clazz.defineMethod (c$, "setCursorPosition",
\r
85 var sequence = this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY);
\r
86 this.seqCanvas.cursorX = sequence.findIndex (this.getKeyboardNo1 ()) - 1;
\r
87 this.scrollToVisible ();
\r
89 Clazz.defineMethod (c$, "moveCursor",
\r
91 this.seqCanvas.cursorX += dx;
\r
92 this.seqCanvas.cursorY += dy;
\r
93 if (this.av.hasHiddenColumns () && !this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX)) {
\r
94 var original = this.seqCanvas.cursorX - dx;
\r
95 var maxWidth = this.av.getAlignment ().getWidth ();
\r
96 while (!this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX) && this.seqCanvas.cursorX < maxWidth && this.seqCanvas.cursorX > 0) {
\r
97 this.seqCanvas.cursorX += dx;
\r
99 if (this.seqCanvas.cursorX >= maxWidth || !this.av.getColumnSelection ().isVisible (this.seqCanvas.cursorX)) {
\r
100 this.seqCanvas.cursorX = original;
\r
101 }}this.scrollToVisible ();
\r
103 Clazz.defineMethod (c$, "scrollToVisible",
\r
105 if (this.seqCanvas.cursorX < 0) {
\r
106 this.seqCanvas.cursorX = 0;
\r
107 } else if (this.seqCanvas.cursorX > this.av.getAlignment ().getWidth () - 1) {
\r
108 this.seqCanvas.cursorX = this.av.getAlignment ().getWidth () - 1;
\r
109 }if (this.seqCanvas.cursorY < 0) {
\r
110 this.seqCanvas.cursorY = 0;
\r
111 } else if (this.seqCanvas.cursorY > this.av.getAlignment ().getHeight () - 1) {
\r
112 this.seqCanvas.cursorY = this.av.getAlignment ().getHeight () - 1;
\r
113 }this.endEditing ();
\r
114 if (this.av.getWrapAlignment ()) {
\r
115 this.ap.scrollToWrappedVisible (this.seqCanvas.cursorX);
\r
117 while (this.seqCanvas.cursorY < this.av.startSeq) {
\r
118 this.ap.scrollUp (true);
\r
120 while (this.seqCanvas.cursorY + 1 > this.av.endSeq) {
\r
121 this.ap.scrollUp (false);
\r
123 while (this.seqCanvas.cursorX < this.av.getColumnSelection ().adjustForHiddenColumns (this.av.startRes)) {
\r
124 if (!this.ap.scrollRight (false)) {
\r
127 while (this.seqCanvas.cursorX > this.av.getColumnSelection ().adjustForHiddenColumns (this.av.endRes)) {
\r
128 if (!this.ap.scrollRight (true)) {
\r
131 }this.setStatusMessage (this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY), this.seqCanvas.cursorX, this.seqCanvas.cursorY);
\r
132 this.seqCanvas.repaint ();
\r
134 Clazz.defineMethod (c$, "setSelectionAreaAtCursor",
\r
135 function (topLeft) {
\r
136 var sequence = this.av.getAlignment ().getSequenceAt (this.seqCanvas.cursorY);
\r
137 if (this.av.getSelectionGroup () != null) {
\r
138 var sg = this.av.getSelectionGroup ();
\r
139 var min = this.av.getAlignment ().getHeight ();
\r
141 for (var i = 0; i < sg.getSize (); i++) {
\r
142 var index = this.av.getAlignment ().findIndex (sg.getSequenceAt (i));
\r
145 }if (index < min) {
\r
150 sg.setStartRes (this.seqCanvas.cursorX);
\r
151 if (sg.getEndRes () < this.seqCanvas.cursorX) {
\r
152 sg.setEndRes (this.seqCanvas.cursorX);
\r
153 }min = this.seqCanvas.cursorY;
\r
155 sg.setEndRes (this.seqCanvas.cursorX);
\r
156 if (sg.getStartRes () > this.seqCanvas.cursorX) {
\r
157 sg.setStartRes (this.seqCanvas.cursorX);
\r
158 }max = this.seqCanvas.cursorY + 1;
\r
160 this.av.setSelectionGroup (null);
\r
163 for (var i = min; i < max; i++) {
\r
164 sg.addSequence (this.av.getAlignment ().getSequenceAt (i), false);
\r
166 }}if (this.av.getSelectionGroup () == null) {
\r
167 var sg = new jalview.datamodel.SequenceGroup ();
\r
168 sg.setStartRes (this.seqCanvas.cursorX);
\r
169 sg.setEndRes (this.seqCanvas.cursorX);
\r
170 sg.addSequence (sequence, false);
\r
171 this.av.setSelectionGroup (sg);
\r
172 }this.ap.paintAlignment (false);
\r
173 this.av.sendSelection ();
\r
175 Clazz.defineMethod (c$, "insertGapAtCursor",
\r
177 this.groupEditing = group;
\r
178 this.startseq = this.seqCanvas.cursorY;
\r
179 this.lastres = this.seqCanvas.cursorX;
\r
180 this.editSequence (true, this.seqCanvas.cursorX + this.getKeyboardNo1 ());
\r
181 this.endEditing ();
\r
183 Clazz.defineMethod (c$, "deleteGapAtCursor",
\r
185 this.groupEditing = group;
\r
186 this.startseq = this.seqCanvas.cursorY;
\r
187 this.lastres = this.seqCanvas.cursorX + this.getKeyboardNo1 ();
\r
188 this.editSequence (false, this.seqCanvas.cursorX);
\r
189 this.endEditing ();
\r
191 Clazz.defineMethod (c$, "numberPressed",
\r
193 if (this.keyboardNo1 == null) {
\r
194 this.keyboardNo1 = new StringBuffer ();
\r
195 }if (this.keyboardNo2 != null) {
\r
196 this.keyboardNo2.append (value);
\r
198 this.keyboardNo1.append (value);
\r
200 Clazz.defineMethod (c$, "getKeyboardNo1",
\r
203 if (this.keyboardNo1 != null) {
\r
204 var value = Integer.parseInt (this.keyboardNo1.toString ());
\r
205 this.keyboardNo1 = null;
\r
208 if (Clazz.exceptionOf (x, Exception)) {
\r
213 this.keyboardNo1 = null;
\r
216 Clazz.defineMethod (c$, "getKeyboardNo2",
\r
219 if (this.keyboardNo2 != null) {
\r
220 var value = Integer.parseInt (this.keyboardNo2.toString ());
\r
221 this.keyboardNo2 = null;
\r
224 if (Clazz.exceptionOf (x, Exception)) {
\r
229 this.keyboardNo2 = null;
\r
232 Clazz.defineMethod (c$, "setStatusMessage",
\r
233 function (sequence, res, seq) {
\r
234 var text = new StringBuilder (32);
\r
235 var seqno = seq == -1 ? "" : " " + (seq + 1);
\r
236 text.append ("Sequence" + seqno + " ID: " + sequence.getName ());
\r
237 var residue = null;
\r
238 var displayChar = String.valueOf (sequence.getCharAt (res));
\r
239 if (this.av.getAlignment ().isNucleotide ()) {
\r
240 residue = jalview.schemes.ResidueProperties.nucleotideName.get (displayChar);
\r
241 if (residue != null) {
\r
242 text.append (" Nucleotide: ").append (residue);
\r
244 residue = "X".equalsIgnoreCase (displayChar) ? "X" : jalview.schemes.ResidueProperties.aa2Triplet.get (displayChar);
\r
245 if (residue != null) {
\r
246 text.append (" Residue: ").append (residue);
\r
248 if (residue != null) {
\r
249 pos = sequence.findPosition (res);
\r
250 text.append (" (").append (Integer.toString (pos)).append (")");
\r
251 }this.ap.alignFrame.setStatus (text.toString ());
\r
252 }, "jalview.datamodel.SequenceI,~N,~N");
\r
253 Clazz.defineMethod (c$, "setStatusMessage",
\r
254 ($fz = function (results) {
\r
255 var matches = results.getResults ();
\r
256 if (!matches.isEmpty ()) {
\r
257 var m = matches.get (0);
\r
258 var seq = m.getSequence ();
\r
259 var sequenceIndex = this.av.getAlignment ().findIndex (seq);
\r
260 var start = m.getStart () - 1;
\r
261 this.setStatusMessage (seq, start, sequenceIndex);
\r
262 }}, $fz.isPrivate = true, $fz), "jalview.datamodel.SearchResults");
\r
263 Clazz.overrideMethod (c$, "mousePressed",
\r
265 this.lastMousePress = evt.getPoint ();
\r
266 if ((evt.getModifiers () & 8) == 8 && !this.av.MAC) {
\r
267 this.mouseWheelPressed = true;
\r
269 }if (evt.isShiftDown () || evt.isControlDown () || evt.isAltDown ()) {
\r
270 if (evt.isControlDown () || evt.isAltDown ()) {
\r
271 this.groupEditing = true;
\r
272 }this.editingSeqs = true;
\r
274 this.doMousePressedDefineMode (evt);
\r
276 }var seq = this.findSeq (evt);
\r
277 var res = this.findRes (evt);
\r
278 if (seq < 0 || res < 0) {
\r
280 }if ((seq < this.av.getAlignment ().getHeight ()) && (res < this.av.getAlignment ().getSequenceAt (seq).getLength ())) {
\r
281 this.startseq = seq;
\r
282 this.lastres = res;
\r
284 this.startseq = -1;
\r
287 }, "java.awt.event.MouseEvent");
\r
288 Clazz.overrideMethod (c$, "mouseClicked",
\r
290 var sequence = this.av.getAlignment ().getSequenceAt (this.findSeq (evt));
\r
291 if (evt.getClickCount () > 1) {
\r
292 if (this.av.getSelectionGroup () != null && this.av.getSelectionGroup ().getSize () == 1 && this.av.getSelectionGroup ().getEndRes () - this.av.getSelectionGroup ().getStartRes () < 2) {
\r
293 this.av.setSelectionGroup (null);
\r
294 }var features = this.findFeaturesAtRes (sequence, sequence.findPosition (this.findRes (evt)));
\r
295 if (features != null && features.length > 0) {
\r
296 var highlight = new jalview.datamodel.SearchResults ();
\r
297 highlight.addResult (sequence, features[0].getBegin (), features[0].getEnd ());
\r
298 this.seqCanvas.highlightSearchResults (highlight);
\r
299 }if (features != null && features.length > 0) {
\r
300 this.seqCanvas.getFeatureRenderer ().amendFeatures ( Clazz.newArray (-1, [sequence]), features, false, this.ap);
\r
301 this.seqCanvas.highlightSearchResults (null);
\r
302 }}}, "java.awt.event.MouseEvent");
\r
303 Clazz.overrideMethod (c$, "mouseReleased",
\r
305 this.mouseDragging = false;
\r
306 this.mouseWheelPressed = false;
\r
307 this.ap.paintAlignment (true);
\r
308 if (!this.editingSeqs) {
\r
309 this.doMouseReleasedDefineMode (evt);
\r
311 }this.endEditing ();
\r
312 }, "java.awt.event.MouseEvent");
\r
313 Clazz.defineMethod (c$, "findRes",
\r
316 var x = evt.getX ();
\r
317 if (this.av.getWrapAlignment ()) {
\r
318 var hgap = this.av.getCharHeight ();
\r
319 if (this.av.getScaleAboveWrapped ()) {
\r
320 hgap += this.av.getCharHeight ();
\r
321 }var cHeight = this.av.getAlignment ().getHeight () * this.av.getCharHeight () + hgap + this.seqCanvas.getAnnotationHeight ();
\r
322 var y = evt.getY ();
\r
324 x -= this.seqCanvas.LABEL_WEST;
\r
325 var cwidth = this.seqCanvas.getWrappedCanvasWidth (this.getSize ().width);
\r
328 }this.wrappedBlock = Clazz.doubleToInt (y / cHeight);
\r
329 this.wrappedBlock += Clazz.doubleToInt (this.av.getStartRes () / cwidth);
\r
330 res = this.wrappedBlock * cwidth + Clazz.doubleToInt (x / this.av.getCharWidth ());
\r
332 res = (Clazz.doubleToInt (x / this.av.getCharWidth ())) + this.av.getStartRes ();
\r
333 }if (this.av.hasHiddenColumns ()) {
\r
334 res = this.av.getColumnSelection ().adjustForHiddenColumns (res);
\r
336 }, "java.awt.event.MouseEvent");
\r
337 Clazz.defineMethod (c$, "findSeq",
\r
339 var sqnum = this.findAlRow (evt);
\r
340 return (sqnum < 0) ? 0 : sqnum;
\r
341 }, "java.awt.event.MouseEvent");
\r
342 Clazz.defineMethod (c$, "findAlRow",
\r
343 ($fz = function (evt) {
\r
345 var y = evt.getY ();
\r
346 if (this.av.getWrapAlignment ()) {
\r
347 var hgap = this.av.getCharHeight ();
\r
348 if (this.av.getScaleAboveWrapped ()) {
\r
349 hgap += this.av.getCharHeight ();
\r
350 }var cHeight = this.av.getAlignment ().getHeight () * this.av.getCharHeight () + hgap + this.seqCanvas.getAnnotationHeight ();
\r
352 seq = Math.min (Clazz.doubleToInt ((y % cHeight) / this.av.getCharHeight ()), this.av.getAlignment ().getHeight () - 1);
\r
356 seq = Math.min ((Clazz.doubleToInt (y / this.av.getCharHeight ())) + this.av.getStartSeq (), this.av.getAlignment ().getHeight () - 1);
\r
360 }, $fz.isPrivate = true, $fz), "java.awt.event.MouseEvent");
\r
361 Clazz.defineMethod (c$, "doMousePressed",
\r
363 var seq = this.findSeq (evt);
\r
364 var res = this.findRes (evt);
\r
365 if (seq < this.av.getAlignment ().getHeight () && res < this.av.getAlignment ().getSequenceAt (seq).getLength ()) {
\r
366 this.startseq = seq;
\r
367 this.lastres = res;
\r
369 this.startseq = -1;
\r
372 }, "java.awt.event.MouseEvent");
\r
373 Clazz.overrideMethod (c$, "mouseOverSequence",
\r
374 function (sequence, index, pos) {
\r
375 var tmp = sequence.hashCode () + index + "";
\r
376 if (this.lastMessage == null || !this.lastMessage.equals (tmp)) {
\r
377 this.ssm.mouseOverSequence (sequence, index, pos, this.av);
\r
378 }this.lastMessage = tmp;
\r
379 }, "jalview.datamodel.SequenceI,~N,~N");
\r
380 Clazz.overrideMethod (c$, "highlightSequence",
\r
381 function (results) {
\r
382 if (this.av.isFollowHighlight ()) {
\r
383 if (this.ap.scrollToPosition (results, true)) {
\r
384 this.ap.alignFrame.repaint ();
\r
385 }}this.setStatusMessage (results);
\r
386 this.seqCanvas.highlightSearchResults (results);
\r
387 }, "jalview.datamodel.SearchResults");
\r
388 Clazz.overrideMethod (c$, "getVamsasSource",
\r
390 return this.ap == null ? null : this.ap.av;
\r
392 Clazz.overrideMethod (c$, "updateColours",
\r
393 function (seq, index) {
\r
394 System.out.println ("update the seqPanel colours");
\r
395 }, "jalview.datamodel.SequenceI,~N");
\r
396 Clazz.overrideMethod (c$, "mouseMoved",
\r
398 var res = this.findRes (evt);
\r
399 var seq = this.findSeq (evt);
\r
400 if (seq >= this.av.getAlignment ().getHeight () || seq < 0 || res < 0) {
\r
401 if (this.tooltip != null) {
\r
402 this.tooltip.setTip ("");
\r
404 }var sequence = this.av.getAlignment ().getSequenceAt (seq);
\r
405 if (res > sequence.getLength ()) {
\r
406 if (this.tooltip != null) {
\r
407 this.tooltip.setTip ("");
\r
409 }var respos = sequence.findPosition (res);
\r
410 if (this.ssm != null) {
\r
411 this.mouseOverSequence (sequence, res, respos);
\r
412 }var text = new StringBuilder ();
\r
413 text.append ("Sequence ").append (Integer.toString (seq + 1)).append (" ID: ").append (sequence.getName ());
\r
415 var ch = String.valueOf (sequence.getCharAt (res));
\r
416 if (this.av.getAlignment ().isNucleotide ()) {
\r
417 obj = jalview.schemes.ResidueProperties.nucleotideName.get (ch);
\r
419 text.append (" Nucleotide: ").append (obj);
\r
421 obj = "X".equalsIgnoreCase (ch) ? "X" : jalview.schemes.ResidueProperties.aa2Triplet.get (ch);
\r
423 text.append (" Residue: ").append (obj);
\r
424 }}if (obj != null) {
\r
425 text.append (" (").append (Integer.toString (respos)).append (")");
\r
426 }this.ap.alignFrame.setStatus (text.toString ());
\r
427 var tooltipText = new StringBuilder ();
\r
428 var groups = this.av.getAlignment ().findAllGroups (sequence);
\r
429 if (groups != null) {
\r
430 for (var g = 0; g < groups.length; g++) {
\r
431 if (groups[g].getStartRes () <= res && groups[g].getEndRes () >= res) {
\r
432 if (!groups[g].getName ().startsWith ("JTreeGroup") && !groups[g].getName ().startsWith ("JGroup")) {
\r
433 tooltipText.append (groups[g].getName ()).append (" ");
\r
434 }if (groups[g].getDescription () != null) {
\r
435 tooltipText.append (groups[g].getDescription ());
\r
436 }tooltipText.append ("\n");
\r
438 }var allFeatures = this.findFeaturesAtRes (sequence, sequence.findPosition (res));
\r
440 while (index < allFeatures.length) {
\r
441 var sf = allFeatures[index];
\r
442 tooltipText.append (sf.getType () + " " + sf.begin + ":" + sf.end);
\r
443 if (sf.getDescription () != null) {
\r
444 tooltipText.append (" " + sf.getDescription ());
\r
445 }if (sf.getValue ("status") != null) {
\r
446 var status = sf.getValue ("status").toString ();
\r
447 if (status.length > 0) {
\r
448 tooltipText.append (" (" + sf.getValue ("status") + ")");
\r
449 }}tooltipText.append ("\n");
\r
452 if (this.tooltip == null) {
\r
453 this.tooltip = new jalview.appletgui.Tooltip (tooltipText.toString (), this.seqCanvas);
\r
455 this.tooltip.setTip (tooltipText.toString ());
\r
456 }}, "java.awt.event.MouseEvent");
\r
457 Clazz.defineMethod (c$, "findFeaturesAtRes",
\r
458 function (sequence, res) {
\r
459 var tmp = new java.util.Vector ();
\r
460 var features = sequence.getSequenceFeatures ();
\r
461 if (features != null) {
\r
462 for (var i = 0; i < features.length; i++) {
\r
463 if (this.av.getFeaturesDisplayed () == null || !this.av.getFeaturesDisplayed ().isVisible (features[i].getType ())) {
\r
465 }if (features[i].featureGroup != null && !this.seqCanvas.fr.checkGroupVisibility (features[i].featureGroup, false)) {
\r
467 }if ((features[i].getBegin () <= res) && (features[i].getEnd () >= res)) {
\r
468 tmp.addElement (features[i]);
\r
470 }features = new Array (tmp.size ());
\r
471 tmp.copyInto (features);
\r
473 }, "jalview.datamodel.SequenceI,~N");
\r
474 Clazz.overrideMethod (c$, "mouseDragged",
\r
476 if (this.mouseWheelPressed) {
\r
477 var oldWidth = this.av.getCharWidth ();
\r
478 if (Math.abs (evt.getY () - this.lastMousePress.y) > Math.abs (evt.getX () - this.lastMousePress.x)) {
\r
479 var fontSize = this.av.font.getSize ();
\r
480 if (evt.getY () < this.lastMousePress.y && this.av.getCharHeight () > 1) {
\r
482 } else if (evt.getY () > this.lastMousePress.y) {
\r
484 }if (fontSize < 1) {
\r
486 }this.av.setFont ( new java.awt.Font (this.av.font.getName (), this.av.font.getStyle (), fontSize));
\r
487 this.av.setCharWidth (oldWidth);
\r
489 if (evt.getX () < this.lastMousePress.x && this.av.getCharWidth () > 1) {
\r
490 this.av.setCharWidth (this.av.getCharWidth () - 1);
\r
491 } else if (evt.getX () > this.lastMousePress.x) {
\r
492 this.av.setCharWidth (this.av.getCharWidth () + 1);
\r
493 }if (this.av.getCharWidth () < 1) {
\r
494 this.av.setCharWidth (1);
\r
495 }}this.ap.fontChanged ();
\r
496 var fm = this.getFontMetrics (this.av.getFont ());
\r
497 this.av.validCharWidth = fm.charWidth ('M') <= this.av.getCharWidth ();
\r
498 this.lastMousePress = evt.getPoint ();
\r
499 this.ap.paintAlignment (false);
\r
500 this.ap.annotationPanel.image = null;
\r
502 }if (!this.editingSeqs) {
\r
503 this.doMouseDraggedDefineMode (evt);
\r
505 }var res = this.findRes (evt);
\r
508 }if ((this.lastres == -1) || (this.lastres == res)) {
\r
510 }if ((res < this.av.getAlignment ().getWidth ()) && (res < this.lastres)) {
\r
511 this.editSequence (false, res);
\r
513 this.editSequence (true, res);
\r
514 }this.mouseDragging = true;
\r
515 if (this.scrollThread != null) {
\r
516 this.scrollThread.setEvent (evt);
\r
517 }}, "java.awt.event.MouseEvent");
\r
518 Clazz.defineMethod (c$, "editSequence",
\r
519 function (insertGap, startres) {
\r
520 var fixedLeft = -1;
\r
521 var fixedRight = -1;
\r
522 var fixedColumns = false;
\r
523 var sg = this.av.getSelectionGroup ();
\r
524 var seq = this.av.getAlignment ().getSequenceAt (this.startseq);
\r
525 if (!this.groupEditing && this.av.hasHiddenRows ()) {
\r
526 if (this.av.isHiddenRepSequence (seq)) {
\r
527 sg = this.av.getRepresentedSequences (seq);
\r
528 this.groupEditing = true;
\r
529 }}var message = new StringBuffer ();
\r
530 if (this.groupEditing) {
\r
531 message.append (jalview.util.MessageManager.getString ("action.edit_group")).append (":");
\r
532 if (this.editCommand == null) {
\r
533 this.editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.getString ("action.edit_group"));
\r
535 message.append (jalview.util.MessageManager.getString ("label.edit_sequence")).append (" " + seq.getName ());
\r
536 var label = seq.getName ();
\r
537 if (label.length > 10) {
\r
538 label = label.substring (0, 10);
\r
539 }if (this.editCommand == null) {
\r
540 this.editCommand = new jalview.commands.EditCommand (jalview.util.MessageManager.formatMessage ("label.edit_params", Clazz.newArray (-1, [label])));
\r
542 message.append (" insert ");
\r
544 message.append (" delete ");
\r
545 }message.append (Math.abs (startres - this.lastres) + " gaps.");
\r
546 this.ap.alignFrame.setStatus (message.toString ());
\r
547 if (this.groupEditing || (sg != null && sg.getSequences (this.av.getHiddenRepSequences ()).contains (seq))) {
\r
548 fixedColumns = true;
\r
550 if (!this.av.isHiddenRepSequence (seq)) {
\r
551 this.endEditing ();
\r
553 }sg = this.av.getRepresentedSequences (seq);
\r
554 }fixedLeft = sg.getStartRes ();
\r
555 fixedRight = sg.getEndRes ();
\r
556 if ((startres < fixedLeft && this.lastres >= fixedLeft) || (startres >= fixedLeft && this.lastres < fixedLeft) || (startres > fixedRight && this.lastres <= fixedRight) || (startres <= fixedRight && this.lastres > fixedRight)) {
\r
557 this.endEditing ();
\r
559 }if (fixedLeft > startres) {
\r
560 fixedRight = fixedLeft - 1;
\r
562 } else if (fixedRight < startres) {
\r
563 fixedLeft = fixedRight;
\r
565 }}if (this.av.hasHiddenColumns ()) {
\r
566 fixedColumns = true;
\r
567 var y1 = this.av.getColumnSelection ().getHiddenBoundaryLeft (startres);
\r
568 var y2 = this.av.getColumnSelection ().getHiddenBoundaryRight (startres);
\r
569 if ((insertGap && startres > y1 && this.lastres < y1) || (!insertGap && startres < y2 && this.lastres > y2)) {
\r
570 this.endEditing ();
\r
572 }if (fixedLeft < y1 && (fixedRight > y2 || fixedRight == -1)) {
\r
573 if (startres >= y2) {
\r
576 fixedRight = y2 - 1;
\r
577 }}}if (this.groupEditing) {
\r
578 var groupSeqs = sg.getSequences (this.av.getHiddenRepSequences ()).toArray ( new Array (0));
\r
580 if (sg.getStartRes () == 0 && sg.getEndRes () == fixedRight && sg.getEndRes () == this.av.getAlignment ().getWidth () - 1) {
\r
581 sg.setEndRes (this.av.getAlignment ().getWidth () + startres - this.lastres);
\r
582 fixedRight = sg.getEndRes ();
\r
583 }var blank = false;
\r
584 for (fixedRight = fixedRight; fixedRight > this.lastres; fixedRight--) {
\r
586 for (var gs, $gs = 0, $$gs = groupSeqs; $gs < $$gs.length && ((gs = $$gs[$gs]) || true); $gs++) {
\r
587 for (var j = 0; j < startres - this.lastres; j++) {
\r
588 if (!jalview.util.Comparison.isGap (gs.getCharAt (fixedRight - j))) {
\r
597 if (sg.getSize () == this.av.getAlignment ().getHeight ()) {
\r
598 if ((this.av.hasHiddenColumns () && startres < this.av.getColumnSelection ().getHiddenBoundaryRight (startres))) {
\r
599 this.endEditing ();
\r
601 }var alWidth = this.av.getAlignment ().getWidth ();
\r
602 if (this.av.hasHiddenRows ()) {
\r
603 var hwidth = this.av.getAlignment ().getHiddenSequences ().getWidth ();
\r
604 if (hwidth > alWidth) {
\r
606 }}sg.setEndRes (sg.getEndRes () + startres - this.lastres);
\r
607 fixedRight = alWidth + startres - this.lastres;
\r
609 this.endEditing ();
\r
611 }}} else if (!insertGap) {
\r
612 for (var gs, $gs = 0, $$gs = groupSeqs; $gs < $$gs.length && ((gs = $$gs[$gs]) || true); $gs++) {
\r
613 for (var j = startres; j < this.lastres; j++) {
\r
614 if (gs.getLength () <= j) {
\r
616 }if (!jalview.util.Comparison.isGap (gs.getCharAt (j))) {
\r
617 this.endEditing ();
\r
622 if (fixedColumns && fixedRight != -1) {
\r
623 for (var j = this.lastres; j < startres; j++) {
\r
624 this.insertChar (j, groupSeqs, fixedRight);
\r
627 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, groupSeqs, startres, startres - this.lastres, this.av.getAlignment (), true);
\r
629 if (fixedColumns && fixedRight != -1) {
\r
630 for (var j = this.lastres; j > startres; j--) {
\r
631 this.deleteChar (startres, groupSeqs, fixedRight);
\r
634 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, groupSeqs, startres, this.lastres - startres, this.av.getAlignment (), true);
\r
637 if (fixedColumns && fixedRight != -1) {
\r
638 for (var j = this.lastres; j < startres; j++) {
\r
639 this.insertChar (j, Clazz.newArray (-1, [seq]), fixedRight);
\r
642 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, Clazz.newArray (-1, [seq]), this.lastres, startres - this.lastres, this.av.getAlignment (), true);
\r
644 if (fixedColumns && fixedRight != -1) {
\r
645 for (var j = this.lastres; j > startres; j--) {
\r
646 if (!jalview.util.Comparison.isGap (seq.getCharAt (startres))) {
\r
647 this.endEditing ();
\r
649 }this.deleteChar (startres, Clazz.newArray (-1, [seq]), fixedRight);
\r
653 for (var m = startres; m < this.lastres; m++) {
\r
654 if (!jalview.util.Comparison.isGap (seq.getCharAt (m))) {
\r
659 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, Clazz.newArray (-1, [seq]), startres, max, this.av.getAlignment (), true);
\r
660 }}}}this.lastres = startres;
\r
661 this.seqCanvas.repaint ();
\r
663 Clazz.defineMethod (c$, "insertChar",
\r
664 function (j, seq, fixedColumn) {
\r
665 var blankColumn = fixedColumn;
\r
666 for (var s = 0; s < seq.length; s++) {
\r
667 for (blankColumn = fixedColumn; blankColumn > j; blankColumn--) {
\r
668 if (jalview.util.Comparison.isGap (seq[s].getCharAt (blankColumn))) {
\r
671 if (blankColumn <= j) {
\r
672 blankColumn = fixedColumn;
\r
673 this.endEditing ();
\r
676 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seq, blankColumn, 1, this.av.getAlignment (), true);
\r
677 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, seq, j, 1, this.av.getAlignment (), true);
\r
679 Clazz.defineMethod (c$, "deleteChar",
\r
680 function (j, seq, fixedColumn) {
\r
681 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.DELETE_GAP, seq, j, 1, this.av.getAlignment (), true);
\r
682 this.editCommand.appendEdit (jalview.commands.EditCommand.Action.INSERT_GAP, seq, fixedColumn, 1, this.av.getAlignment (), true);
\r
684 Clazz.defineMethod (c$, "doMousePressedDefineMode",
\r
686 if (this.scrollThread != null) {
\r
687 this.scrollThread.running = false;
\r
688 this.scrollThread = null;
\r
689 }var res = this.findRes (evt);
\r
690 var seq = this.findSeq (evt);
\r
692 this.startWrapBlock = this.wrappedBlock;
\r
695 }var sequence = this.av.getAlignment ().getSequenceAt (seq);
\r
696 if (sequence == null || res > sequence.getLength ()) {
\r
698 }this.stretchGroup = this.av.getSelectionGroup ();
\r
699 if (this.stretchGroup == null) {
\r
700 this.stretchGroup = this.av.getAlignment ().findGroup (sequence);
\r
701 if (this.stretchGroup != null && res > this.stretchGroup.getStartRes () && res < this.stretchGroup.getEndRes ()) {
\r
702 this.av.setSelectionGroup (this.stretchGroup);
\r
704 this.stretchGroup = null;
\r
705 }} else if (!this.stretchGroup.getSequences (null).contains (sequence) || this.stretchGroup.getStartRes () > res || this.stretchGroup.getEndRes () < res) {
\r
706 this.stretchGroup = null;
\r
707 var allGroups = this.av.getAlignment ().findAllGroups (sequence);
\r
708 if (allGroups != null) {
\r
709 for (var i = 0; i < allGroups.length; i++) {
\r
710 if (allGroups[i].getStartRes () <= res && allGroups[i].getEndRes () >= res) {
\r
711 this.stretchGroup = allGroups[i];
\r
714 }this.av.setSelectionGroup (this.stretchGroup);
\r
715 }if ((evt.getModifiers () & 4) == 4) {
\r
716 var allFeatures = this.findFeaturesAtRes (sequence, sequence.findPosition (res));
\r
718 if (allFeatures != null) {
\r
719 for (var i = 0; i < allFeatures.length; i++) {
\r
720 if (allFeatures[i].links != null) {
\r
721 if (links == null) {
\r
722 links = new java.util.Vector ();
\r
723 }for (var j = 0; j < allFeatures[i].links.size (); j++) {
\r
724 links.addElement (allFeatures[i].links.elementAt (j));
\r
727 }var popup = new jalview.appletgui.APopupMenu (this.ap, null, links);
\r
729 popup.show (this, evt.getX (), evt.getY ());
\r
731 }if (this.av.cursorMode) {
\r
732 this.seqCanvas.cursorX = this.findRes (evt);
\r
733 this.seqCanvas.cursorY = this.findSeq (evt);
\r
734 this.seqCanvas.repaint ();
\r
736 }if (this.stretchGroup == null) {
\r
737 var sg = new jalview.datamodel.SequenceGroup ();
\r
738 sg.setStartRes (res);
\r
739 sg.setEndRes (res);
\r
740 sg.addSequence (sequence, false);
\r
741 this.av.setSelectionGroup (sg);
\r
742 this.stretchGroup = sg;
\r
743 if (this.av.getConservationSelected ()) {
\r
744 jalview.appletgui.SliderPanel.setConservationSlider (this.ap, this.av.getGlobalColourScheme (), "Background");
\r
745 }if (this.av.getAbovePIDThreshold ()) {
\r
746 jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, this.av.getGlobalColourScheme (), "Background");
\r
747 }}}, "java.awt.event.MouseEvent");
\r
748 Clazz.defineMethod (c$, "doMouseReleasedDefineMode",
\r
750 if (this.stretchGroup == null) {
\r
752 }this.stretchGroup.recalcConservation ();
\r
753 if (this.stretchGroup.cs != null) {
\r
754 this.stretchGroup.cs.alignmentChanged (this.stretchGroup, this.av.getHiddenRepSequences ());
\r
755 if (this.stretchGroup.cs.conservationApplied ()) {
\r
756 jalview.appletgui.SliderPanel.setConservationSlider (this.ap, this.stretchGroup.cs, this.stretchGroup.getName ());
\r
758 jalview.appletgui.SliderPanel.setPIDSliderSource (this.ap, this.stretchGroup.cs, this.stretchGroup.getName ());
\r
759 }}this.changeEndRes = false;
\r
760 this.changeStartRes = false;
\r
761 this.stretchGroup = null;
\r
762 jalview.appletgui.PaintRefresher.Refresh (this.ap, this.av.getSequenceSetId ());
\r
763 this.ap.paintAlignment (true);
\r
764 this.av.sendSelection ();
\r
765 }, "java.awt.event.MouseEvent");
\r
766 Clazz.defineMethod (c$, "doMouseDraggedDefineMode",
\r
768 var res = this.findRes (evt);
\r
769 var y = this.findSeq (evt);
\r
770 if (this.wrappedBlock != this.startWrapBlock) {
\r
772 }if (this.stretchGroup == null) {
\r
774 }this.mouseDragging = true;
\r
775 if (y > this.av.getAlignment ().getHeight ()) {
\r
776 y = this.av.getAlignment ().getHeight () - 1;
\r
777 }if (res >= this.av.getAlignment ().getWidth ()) {
\r
778 res = this.av.getAlignment ().getWidth () - 1;
\r
779 }if (this.stretchGroup.getEndRes () == res) {
\r
780 this.changeEndRes = true;
\r
781 } else if (this.stretchGroup.getStartRes () == res) {
\r
782 this.changeStartRes = true;
\r
785 }if (this.changeEndRes) {
\r
786 if (res > (this.stretchGroup.getStartRes () - 1)) {
\r
787 this.stretchGroup.setEndRes (res);
\r
788 }} else if (this.changeStartRes) {
\r
789 if (res < (this.stretchGroup.getEndRes () + 1)) {
\r
790 this.stretchGroup.setStartRes (res);
\r
791 }}var dragDirection = 0;
\r
792 if (y > this.oldSeq) {
\r
794 } else if (y < this.oldSeq) {
\r
795 dragDirection = -1;
\r
796 }while ((y != this.oldSeq) && (this.oldSeq > -1) && (y < this.av.getAlignment ().getHeight ())) {
\r
797 var seq = this.av.getAlignment ().getSequenceAt (this.oldSeq);
\r
798 this.oldSeq += dragDirection;
\r
799 if (this.oldSeq < 0) {
\r
801 }var nextSeq = this.av.getAlignment ().getSequenceAt (this.oldSeq);
\r
802 if (this.stretchGroup.getSequences (null).contains (nextSeq)) {
\r
803 this.stretchGroup.deleteSequence (seq, false);
\r
806 this.stretchGroup.addSequence (seq, false);
\r
807 }this.stretchGroup.addSequence (nextSeq, false);
\r
809 if (this.oldSeq < 0) {
\r
811 }if (res > this.av.endRes || res < this.av.startRes || y < this.av.startSeq || y > this.av.endSeq) {
\r
812 this.mouseExited (evt);
\r
813 }if (this.scrollThread != null) {
\r
814 this.scrollThread.setEvent (evt);
\r
815 }this.seqCanvas.repaint ();
\r
816 }, "java.awt.event.MouseEvent");
\r
817 Clazz.overrideMethod (c$, "mouseEntered",
\r
819 if (this.oldSeq < 0) {
\r
821 }if (this.scrollThread != null) {
\r
822 this.scrollThread.running = false;
\r
823 this.scrollThread = null;
\r
824 }}, "java.awt.event.MouseEvent");
\r
825 Clazz.overrideMethod (c$, "mouseExited",
\r
827 if (this.av.getWrapAlignment ()) {
\r
829 }if (this.mouseDragging && this.scrollThread == null) {
\r
830 this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.SeqPanel.ScrollThread, this, null);
\r
831 }}, "java.awt.event.MouseEvent");
\r
832 Clazz.defineMethod (c$, "scrollCanvas",
\r
835 if (this.scrollThread != null) {
\r
836 this.scrollThread.running = false;
\r
837 this.scrollThread = null;
\r
838 }this.mouseDragging = false;
\r
840 if (this.scrollThread == null) {
\r
841 this.scrollThread = Clazz.innerTypeInstance (jalview.appletgui.SeqPanel.ScrollThread, this, null);
\r
842 }this.mouseDragging = true;
\r
843 this.scrollThread.setEvent (evt);
\r
844 }}, "java.awt.event.MouseEvent");
\r
845 Clazz.overrideMethod (c$, "selection",
\r
846 function (seqsel, colsel, source) {
\r
847 if (this.av != null && (this.av === source || !this.av.followSelection || (Clazz.instanceOf (source, jalview.appletgui.AlignViewport) && (source).getSequenceSetId ().equals (this.av.getSequenceSetId ())))) {
\r
849 }if (this.selectionFromTranslation (seqsel, colsel, source)) {
\r
851 }var repaint = false;
\r
852 var copycolsel = true;
\r
853 if (this.av.getSelectionGroup () == null || !this.av.isSelectionGroupChanged (true)) {
\r
855 if (seqsel != null && seqsel.getSize () > 0) {
\r
856 if (this.av.getAlignment () == null) {
\r
857 System.out.println ("Selection message: alignviewport av SeqSetId=" + this.av.getSequenceSetId () + " ViewId=" + this.av.getViewId () + " 's alignment is NULL! returning immediatly.");
\r
859 }sgroup = seqsel.intersect (this.av.getAlignment (), (this.av.hasHiddenRows ()) ? this.av.getHiddenRepSequences () : null);
\r
860 if ((sgroup == null || sgroup.getSize () == 0) && (colsel == null || colsel.size () == 0)) {
\r
861 copycolsel = false;
\r
862 }}if (sgroup != null && sgroup.getSize () > 0) {
\r
863 this.av.setSelectionGroup (sgroup);
\r
865 this.av.setSelectionGroup (null);
\r
866 }repaint = this.av.isSelectionGroupChanged (true);
\r
867 }if (copycolsel && (this.av.getColumnSelection () == null || !this.av.isColSelChanged (true))) {
\r
868 if (colsel == null || colsel.size () == 0) {
\r
869 if (this.av.getColumnSelection () != null) {
\r
870 this.av.getColumnSelection ().clear ();
\r
872 if (this.av.getColumnSelection () == null) {
\r
873 this.av.setColumnSelection ( new jalview.datamodel.ColumnSelection (colsel));
\r
875 this.av.getColumnSelection ().setElementsFrom (colsel);
\r
876 }}repaint = new Boolean (repaint | this.av.isColSelChanged (true)).valueOf ();
\r
877 }if (copycolsel && this.av.hasHiddenColumns () && (this.av.getColumnSelection () == null || this.av.getColumnSelection ().getHiddenColumns () == null)) {
\r
878 System.err.println ("Bad things");
\r
880 this.ap.scalePanelHolder.repaint ();
\r
881 this.ap.repaint ();
\r
882 }}, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource");
\r
883 Clazz.defineMethod (c$, "scrollTo",
\r
884 function (row, column) {
\r
885 row = row < 0 ? this.ap.av.startSeq : row;
\r
886 column = column < 0 ? this.ap.av.startRes : column;
\r
887 this.ap.scrollTo (column, column, row, true, true);
\r
889 Clazz.defineMethod (c$, "scrollToRow",
\r
891 row = row < 0 ? this.ap.av.startSeq : row;
\r
892 this.ap.scrollTo (this.ap.av.startRes, this.ap.av.startRes, row, true, true);
\r
894 Clazz.defineMethod (c$, "scrollToColumn",
\r
895 function (column) {
\r
896 column = column < 0 ? this.ap.av.startRes : column;
\r
897 this.ap.scrollTo (column, column, this.ap.av.startSeq, true, true);
\r
899 Clazz.defineMethod (c$, "selectionFromTranslation",
\r
900 function (seqsel, colsel, source) {
\r
901 if (!(Clazz.instanceOf (source, jalview.api.AlignViewportI))) {
\r
903 }var sourceAv = source;
\r
904 if (sourceAv.getCodingComplement () !== this.av && this.av.getCodingComplement () !== sourceAv) {
\r
906 }var sg = jalview.util.MappingUtils.mapSequenceGroup (seqsel, sourceAv, this.av);
\r
907 this.av.setSelectionGroup (sg);
\r
908 this.av.isSelectionGroupChanged (true);
\r
909 var cs = jalview.util.MappingUtils.mapColumnSelection (colsel, sourceAv, this.av);
\r
910 this.av.setColumnSelection (cs);
\r
911 this.av.isColSelChanged (true);
\r
912 this.ap.scalePanelHolder.repaint ();
\r
913 this.ap.repaint ();
\r
915 }, "jalview.datamodel.SequenceGroup,jalview.datamodel.ColumnSelection,jalview.structure.SelectionSource");
\r
916 c$.$SeqPanel$ScrollThread$ = function () {
\r
918 c$ = Clazz.decorateAsClass (function () {
\r
919 Clazz.prepareCallback (this, arguments);
\r
921 this.running = false;
\r
922 Clazz.instantialize (this, arguments);
\r
923 }, jalview.appletgui.SeqPanel, "ScrollThread", Thread);
\r
924 Clazz.makeConstructor (c$,
\r
926 Clazz.superConstructor (this, jalview.appletgui.SeqPanel.ScrollThread, []);
\r
929 Clazz.defineMethod (c$, "setEvent",
\r
932 }, "java.awt.event.MouseEvent");
\r
933 Clazz.defineMethod (c$, "stopScrolling",
\r
935 this.running = false;
\r
937 Clazz.overrideMethod (c$, "run",
\r
939 this.running = true;
\r
940 while (this.running) {
\r
941 if (this.evt != null) {
\r
942 if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getY () < 0 && this.b$["jalview.appletgui.SeqPanel"].av.getStartSeq () > 0) {
\r
943 this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollUp (true);
\r
944 }if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getY () >= this.b$["jalview.appletgui.SeqPanel"].getSize ().height && this.b$["jalview.appletgui.SeqPanel"].av.getAlignment ().getHeight () > this.b$["jalview.appletgui.SeqPanel"].av.getEndSeq ()) {
\r
945 this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollUp (false);
\r
946 }if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getX () < 0) {
\r
947 this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollRight (false);
\r
948 } else if (this.b$["jalview.appletgui.SeqPanel"].mouseDragging && this.evt.getX () >= this.b$["jalview.appletgui.SeqPanel"].getSize ().width) {
\r
949 this.running = this.b$["jalview.appletgui.SeqPanel"].ap.scrollRight (true);
\r
953 if (Clazz.exceptionOf (ex, Exception)) {
\r