1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.gui; |
22 |
|
|
23 |
|
import java.awt.BorderLayout; |
24 |
|
import java.awt.event.ActionEvent; |
25 |
|
import java.awt.event.ActionListener; |
26 |
|
import java.awt.event.MouseEvent; |
27 |
|
import java.awt.event.MouseListener; |
28 |
|
import java.awt.event.MouseMotionListener; |
29 |
|
import java.util.List; |
30 |
|
|
31 |
|
import javax.swing.JPanel; |
32 |
|
import javax.swing.JPopupMenu; |
33 |
|
import javax.swing.SwingUtilities; |
34 |
|
import javax.swing.Timer; |
35 |
|
import javax.swing.ToolTipManager; |
36 |
|
|
37 |
|
import jalview.datamodel.AlignmentAnnotation; |
38 |
|
import jalview.datamodel.Sequence; |
39 |
|
import jalview.datamodel.SequenceGroup; |
40 |
|
import jalview.datamodel.SequenceI; |
41 |
|
import jalview.gui.SeqPanel.MousePos; |
42 |
|
import jalview.io.SequenceAnnotationReport; |
43 |
|
import jalview.util.MessageManager; |
44 |
|
import jalview.util.Platform; |
45 |
|
import jalview.viewmodel.AlignmentViewport; |
46 |
|
import jalview.viewmodel.ViewportRanges; |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
|
|
| 6.7% |
Uncovered Elements: 208 (223) |
Complexity: 65 |
Complexity Density: 0.47 |
|
52 |
|
public class IdPanel extends JPanel |
53 |
|
implements MouseListener, MouseMotionListener |
54 |
|
{ |
55 |
|
private IdCanvas idCanvas; |
56 |
|
|
57 |
|
protected AlignmentViewport av; |
58 |
|
|
59 |
|
protected AlignmentPanel alignPanel; |
60 |
|
|
61 |
|
ScrollThread scrollThread = null; |
62 |
|
|
63 |
|
int offy; |
64 |
|
|
65 |
|
|
66 |
|
int lastid = -1; |
67 |
|
|
68 |
|
boolean mouseDragging = false; |
69 |
|
|
70 |
|
private final SequenceAnnotationReport seqAnnotReport; |
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
@param |
76 |
|
@param |
77 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 1 |
Complexity Density: 0.1 |
|
78 |
242 |
public IdPanel(AlignViewport av, AlignmentPanel parent)... |
79 |
|
{ |
80 |
242 |
this.av = av; |
81 |
242 |
alignPanel = parent; |
82 |
242 |
setIdCanvas(new IdCanvas(av)); |
83 |
242 |
seqAnnotReport = new SequenceAnnotationReport(true); |
84 |
242 |
setLayout(new BorderLayout()); |
85 |
242 |
add(getIdCanvas(), BorderLayout.CENTER); |
86 |
242 |
addMouseListener(this); |
87 |
242 |
addMouseMotionListener(this); |
88 |
242 |
addMouseWheelListener(alignPanel.getSeqPanel()); |
89 |
242 |
ToolTipManager.sharedInstance().registerComponent(this); |
90 |
|
} |
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
|
|
96 |
|
@param |
97 |
|
|
|
|
| 0% |
Uncovered Elements: 21 (21) |
Complexity: 3 |
Complexity Density: 0.18 |
|
98 |
0 |
@Override... |
99 |
|
public void mouseMoved(MouseEvent e) |
100 |
|
{ |
101 |
0 |
SeqPanel sp = alignPanel.getSeqPanel(); |
102 |
0 |
MousePos pos = sp.findMousePosition(e); |
103 |
0 |
if (pos.isOverAnnotation()) |
104 |
|
{ |
105 |
|
|
106 |
|
|
107 |
|
|
108 |
0 |
AlignmentAnnotation[] anns = av.getAlignment() |
109 |
|
.getAlignmentAnnotation(); |
110 |
0 |
AlignmentAnnotation annotation = anns[pos.annotationIndex]; |
111 |
0 |
setToolTipText(AnnotationLabels.getTooltip(annotation)); |
112 |
0 |
alignPanel.alignFrame.setStatus( |
113 |
|
AnnotationLabels.getStatusMessage(annotation, anns)); |
114 |
|
} |
115 |
|
else |
116 |
|
{ |
117 |
0 |
int seq = Math.max(0, pos.seqIndex); |
118 |
0 |
if (seq < av.getAlignment().getHeight()) |
119 |
|
{ |
120 |
0 |
SequenceI sequence = av.getAlignment().getSequenceAt(seq); |
121 |
0 |
StringBuilder tip = new StringBuilder(64); |
122 |
0 |
tip.append(sequence.getDisplayId(true)).append(" "); |
123 |
0 |
seqAnnotReport.createTooltipAnnotationReport(tip, sequence, |
124 |
|
av.isShowDBRefs(), av.isShowNPFeats(), sp.seqCanvas.fr); |
125 |
0 |
setToolTipText(JvSwingUtils.wrapTooltip(true, tip.toString())); |
126 |
|
|
127 |
0 |
StringBuilder text = new StringBuilder(); |
128 |
0 |
text.append("Sequence ").append(String.valueOf(seq + 1)) |
129 |
|
.append(" ID: ").append(sequence.getName()); |
130 |
0 |
alignPanel.alignFrame.setStatus(text.toString()); |
131 |
|
} |
132 |
|
} |
133 |
|
} |
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
|
138 |
|
|
139 |
|
@param |
140 |
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 4 |
Complexity Density: 0.36 |
|
141 |
0 |
@Override... |
142 |
|
public void mouseDragged(MouseEvent e) |
143 |
|
{ |
144 |
0 |
mouseDragging = true; |
145 |
|
|
146 |
0 |
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e); |
147 |
0 |
if (pos.isOverAnnotation()) |
148 |
|
{ |
149 |
|
|
150 |
0 |
return; |
151 |
|
} |
152 |
|
|
153 |
0 |
int seq = Math.max(0, pos.seqIndex); |
154 |
|
|
155 |
0 |
if (seq < lastid) |
156 |
|
{ |
157 |
0 |
selectSeqs(lastid - 1, seq); |
158 |
|
} |
159 |
0 |
else if (seq > lastid) |
160 |
|
{ |
161 |
0 |
selectSeqs(lastid + 1, seq); |
162 |
|
} |
163 |
|
|
164 |
0 |
lastid = seq; |
165 |
0 |
alignPanel.paintAlignment(false, false); |
166 |
|
} |
167 |
|
|
168 |
|
|
169 |
|
|
170 |
|
|
171 |
|
|
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
@param |
177 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 6 |
Complexity Density: 0.5 |
|
178 |
0 |
@Override... |
179 |
|
public void mouseClicked(MouseEvent e) |
180 |
|
{ |
181 |
|
|
182 |
|
|
183 |
|
|
184 |
|
|
185 |
0 |
if (e.getClickCount() < 2 || SwingUtilities.isRightMouseButton(e)) |
186 |
|
{ |
187 |
|
|
188 |
|
|
189 |
0 |
return; |
190 |
|
} |
191 |
|
|
192 |
0 |
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e); |
193 |
0 |
int seq = pos.seqIndex; |
194 |
0 |
if (pos.isOverAnnotation() || seq < 0) |
195 |
|
{ |
196 |
0 |
return; |
197 |
|
} |
198 |
|
|
199 |
0 |
String id = av.getAlignment().getSequenceAt(seq).getName(); |
200 |
0 |
String url = Preferences.sequenceUrlLinks.getPrimaryUrl(id); |
201 |
|
|
202 |
0 |
try |
203 |
|
{ |
204 |
0 |
jalview.util.BrowserLauncher.openURL(url); |
205 |
|
} catch (Exception ex) |
206 |
|
{ |
207 |
0 |
JvOptionPane.showInternalMessageDialog(Desktop.desktop, |
208 |
|
MessageManager.getString("label.web_browser_not_found_unix"), |
209 |
|
MessageManager.getString("label.web_browser_not_found"), |
210 |
|
JvOptionPane.WARNING_MESSAGE); |
211 |
0 |
ex.printStackTrace(); |
212 |
|
} |
213 |
|
} |
214 |
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
|
@param |
219 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
220 |
0 |
@Override... |
221 |
|
public void mouseEntered(MouseEvent e) |
222 |
|
{ |
223 |
0 |
stopScrolling(); |
224 |
|
} |
225 |
|
|
226 |
|
|
227 |
|
|
228 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
229 |
0 |
void stopScrolling()... |
230 |
|
{ |
231 |
0 |
if (scrollThread != null) |
232 |
|
{ |
233 |
0 |
scrollThread.stopScrolling(); |
234 |
0 |
scrollThread = null; |
235 |
|
} |
236 |
|
} |
237 |
|
|
238 |
|
|
239 |
|
|
240 |
|
|
241 |
|
@param |
242 |
|
|
243 |
|
|
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 7 |
Complexity Density: 0.88 |
|
244 |
0 |
@Override... |
245 |
|
public void mouseExited(MouseEvent e) |
246 |
|
{ |
247 |
0 |
if (av.getWrapAlignment()) |
248 |
|
{ |
249 |
0 |
return; |
250 |
|
} |
251 |
|
|
252 |
0 |
if (mouseDragging) |
253 |
|
{ |
254 |
|
|
255 |
|
|
256 |
|
|
257 |
|
|
258 |
0 |
ViewportRanges ranges = av.getRanges(); |
259 |
0 |
if (e.getY() < 0 && ranges.getStartSeq() > 0) |
260 |
|
{ |
261 |
0 |
startScrolling(true); |
262 |
|
} |
263 |
0 |
else if (e.getY() >= getHeight() |
264 |
|
&& ranges.getEndSeq() <= av.getAlignment().getHeight()) |
265 |
|
{ |
266 |
0 |
startScrolling(false); |
267 |
|
} |
268 |
|
} |
269 |
|
} |
270 |
|
|
271 |
|
|
272 |
|
|
273 |
|
|
274 |
|
@param |
275 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
276 |
0 |
void startScrolling(boolean up)... |
277 |
|
{ |
278 |
0 |
scrollThread = new ScrollThread(up); |
279 |
0 |
if (Platform.isJS()) |
280 |
|
{ |
281 |
|
|
282 |
|
|
283 |
|
|
284 |
0 |
Timer t = new Timer(20, new ActionListener() |
285 |
|
{ |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
286 |
0 |
@Override... |
287 |
|
public void actionPerformed(ActionEvent e) |
288 |
|
{ |
289 |
0 |
if (scrollThread != null) |
290 |
|
{ |
291 |
|
|
292 |
0 |
scrollThread.scrollOnce(); |
293 |
|
} |
294 |
|
} |
295 |
|
}); |
296 |
0 |
t.addActionListener(new ActionListener() |
297 |
|
{ |
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
298 |
0 |
@Override... |
299 |
|
public void actionPerformed(ActionEvent e) |
300 |
|
{ |
301 |
0 |
if (scrollThread == null) |
302 |
|
{ |
303 |
|
|
304 |
0 |
t.stop(); |
305 |
|
} |
306 |
|
} |
307 |
|
}); |
308 |
0 |
t.start(); |
309 |
|
} |
310 |
|
else |
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
|
315 |
|
|
316 |
|
{ |
317 |
0 |
scrollThread.start(); |
318 |
|
} |
319 |
|
} |
320 |
|
|
321 |
|
|
322 |
|
|
323 |
|
|
324 |
|
|
325 |
|
|
326 |
|
|
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
|
332 |
|
@param |
333 |
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 11 |
Complexity Density: 0.65 |
|
334 |
0 |
@Override... |
335 |
|
public void mousePressed(MouseEvent e) |
336 |
|
{ |
337 |
0 |
if (e.getClickCount() == 2 && SwingUtilities.isLeftMouseButton(e)) |
338 |
|
{ |
339 |
0 |
return; |
340 |
|
} |
341 |
|
|
342 |
0 |
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e); |
343 |
|
|
344 |
0 |
if (e.isPopupTrigger()) |
345 |
|
{ |
346 |
0 |
showPopupMenu(e, pos); |
347 |
0 |
return; |
348 |
|
} |
349 |
|
|
350 |
|
|
351 |
|
|
352 |
|
|
353 |
|
|
354 |
|
|
355 |
0 |
if (Platform.isWinRightButton(e)) |
356 |
|
{ |
357 |
0 |
return; |
358 |
|
} |
359 |
|
|
360 |
0 |
if ((av.getSelectionGroup() == null) |
361 |
|
|| (!jalview.util.Platform.isControlDown(e) && !e.isShiftDown() |
362 |
|
&& av.getSelectionGroup() != null)) |
363 |
|
{ |
364 |
0 |
av.setSelectionGroup(new SequenceGroup()); |
365 |
0 |
av.getSelectionGroup().setStartRes(0); |
366 |
0 |
av.getSelectionGroup().setEndRes(av.getAlignment().getWidth() - 1); |
367 |
|
} |
368 |
|
|
369 |
0 |
if (e.isShiftDown() && (lastid != -1)) |
370 |
|
{ |
371 |
0 |
selectSeqs(lastid, pos.seqIndex); |
372 |
|
} |
373 |
|
else |
374 |
|
{ |
375 |
0 |
selectSeq(pos.seqIndex); |
376 |
|
} |
377 |
|
|
378 |
0 |
av.isSelectionGroupChanged(true); |
379 |
|
|
380 |
0 |
alignPanel.paintAlignment(false, false); |
381 |
|
} |
382 |
|
|
383 |
|
|
384 |
|
|
385 |
|
|
386 |
|
@param |
387 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
388 |
0 |
void showPopupMenu(MouseEvent e, MousePos pos)... |
389 |
|
{ |
390 |
0 |
if (pos.isOverAnnotation()) |
391 |
|
{ |
392 |
0 |
showAnnotationMenu(e, pos); |
393 |
0 |
return; |
394 |
|
} |
395 |
|
|
396 |
0 |
Sequence sq = (Sequence) av.getAlignment().getSequenceAt(pos.seqIndex); |
397 |
0 |
if (sq != null) |
398 |
|
{ |
399 |
0 |
PopupMenu pop = new PopupMenu(alignPanel, sq, |
400 |
|
Preferences.getGroupURLLinks()); |
401 |
0 |
pop.show(this, e.getX(), e.getY()); |
402 |
|
} |
403 |
|
} |
404 |
|
|
405 |
|
|
406 |
|
|
407 |
|
|
408 |
|
|
409 |
|
@param |
410 |
|
@param |
411 |
|
@see |
412 |
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 5 |
Complexity Density: 0.45 |
|
413 |
0 |
void showAnnotationMenu(MouseEvent e, MousePos pos)... |
414 |
|
{ |
415 |
0 |
if (pos.annotationIndex == -1) |
416 |
|
{ |
417 |
0 |
return; |
418 |
|
} |
419 |
0 |
AlignmentAnnotation[] anns = this.av.getAlignment() |
420 |
|
.getAlignmentAnnotation(); |
421 |
0 |
if (anns == null || pos.annotationIndex >= anns.length) |
422 |
|
{ |
423 |
0 |
return; |
424 |
|
} |
425 |
0 |
AlignmentAnnotation ann = anns[pos.annotationIndex]; |
426 |
0 |
if (!ann.label.contains("Consensus")) |
427 |
|
{ |
428 |
0 |
return; |
429 |
|
} |
430 |
|
|
431 |
0 |
JPopupMenu pop = new JPopupMenu( |
432 |
|
MessageManager.getString("label.annotations")); |
433 |
0 |
AnnotationLabels.addConsensusMenuOptions(this.alignPanel, ann, pop); |
434 |
0 |
pop.show(this, e.getX(), e.getY()); |
435 |
|
} |
436 |
|
|
437 |
|
|
438 |
|
|
439 |
|
|
440 |
|
@param |
441 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
442 |
0 |
void selectSeq(int seq)... |
443 |
|
{ |
444 |
0 |
lastid = seq; |
445 |
|
|
446 |
0 |
SequenceI pickedSeq = av.getAlignment().getSequenceAt(seq); |
447 |
0 |
av.getSelectionGroup().addOrRemove(pickedSeq, false); |
448 |
|
} |
449 |
|
|
450 |
|
|
451 |
|
|
452 |
|
|
453 |
|
|
454 |
|
@param |
455 |
|
@param |
456 |
|
|
|
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 5 |
Complexity Density: 0.42 |
|
457 |
0 |
void selectSeqs(int start, int end)... |
458 |
|
{ |
459 |
0 |
if (av.getSelectionGroup() == null) |
460 |
|
{ |
461 |
0 |
return; |
462 |
|
} |
463 |
|
|
464 |
0 |
if (end >= av.getAlignment().getHeight()) |
465 |
|
{ |
466 |
0 |
end = av.getAlignment().getHeight() - 1; |
467 |
|
} |
468 |
|
|
469 |
0 |
lastid = start; |
470 |
|
|
471 |
0 |
if (end < start) |
472 |
|
{ |
473 |
0 |
int tmp = start; |
474 |
0 |
start = end; |
475 |
0 |
end = tmp; |
476 |
0 |
lastid = end; |
477 |
|
} |
478 |
|
|
479 |
0 |
for (int i = start; i <= end; i++) |
480 |
|
{ |
481 |
0 |
av.getSelectionGroup().addSequence(av.getAlignment().getSequenceAt(i), |
482 |
|
false); |
483 |
|
} |
484 |
|
} |
485 |
|
|
486 |
|
|
487 |
|
|
488 |
|
|
489 |
|
|
490 |
|
@param |
491 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 3 |
Complexity Density: 0.38 |
|
492 |
0 |
@Override... |
493 |
|
public void mouseReleased(MouseEvent e) |
494 |
|
{ |
495 |
0 |
if (scrollThread != null) |
496 |
|
{ |
497 |
0 |
stopScrolling(); |
498 |
|
} |
499 |
0 |
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e); |
500 |
|
|
501 |
0 |
mouseDragging = false; |
502 |
0 |
PaintRefresher.Refresh(this, av.getSequenceSetId()); |
503 |
|
|
504 |
0 |
av.sendSelection(); |
505 |
|
|
506 |
0 |
if (e.isPopupTrigger()) |
507 |
|
{ |
508 |
0 |
showPopupMenu(e, pos); |
509 |
|
} |
510 |
|
} |
511 |
|
|
512 |
|
|
513 |
|
|
514 |
|
|
515 |
|
|
516 |
|
@param |
517 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 5 |
Complexity Density: 0.83 |
|
518 |
0 |
public void highlightSearchResults(List<SequenceI> list)... |
519 |
|
{ |
520 |
0 |
getIdCanvas().setHighlighted(list); |
521 |
|
|
522 |
0 |
if (list == null || list.isEmpty()) |
523 |
|
{ |
524 |
0 |
return; |
525 |
|
} |
526 |
|
|
527 |
0 |
int index = av.getAlignment().findIndex(list.get(0)); |
528 |
|
|
529 |
|
|
530 |
0 |
if ((av.getRanges().getStartSeq() > index) |
531 |
|
|| (av.getRanges().getEndSeq() < index)) |
532 |
|
{ |
533 |
0 |
av.getRanges().setStartSeq(index); |
534 |
|
} |
535 |
|
} |
536 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
537 |
3864 |
public IdCanvas getIdCanvas()... |
538 |
|
{ |
539 |
3864 |
return idCanvas; |
540 |
|
} |
541 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
542 |
242 |
public void setIdCanvas(IdCanvas idCanvas)... |
543 |
|
{ |
544 |
242 |
this.idCanvas = idCanvas; |
545 |
|
} |
546 |
|
|
547 |
|
|
548 |
|
|
549 |
|
|
550 |
|
|
|
|
| 0% |
Uncovered Elements: 30 (30) |
Complexity: 9 |
Complexity Density: 0.5 |
|
551 |
|
class ScrollThread extends Thread |
552 |
|
{ |
553 |
|
private boolean running = false; |
554 |
|
|
555 |
|
private boolean up; |
556 |
|
|
557 |
|
|
558 |
|
|
559 |
|
|
560 |
|
@param |
561 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
562 |
0 |
public ScrollThread(boolean up)... |
563 |
|
{ |
564 |
0 |
this.up = up; |
565 |
0 |
setName("IdPanel$ScrollThread$" + String.valueOf(up)); |
566 |
|
} |
567 |
|
|
568 |
|
|
569 |
|
|
570 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
571 |
0 |
public void stopScrolling()... |
572 |
|
{ |
573 |
0 |
running = false; |
574 |
|
} |
575 |
|
|
576 |
|
|
577 |
|
|
578 |
|
|
579 |
|
|
580 |
|
|
581 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 3 |
Complexity Density: 0.5 |
|
582 |
0 |
@Override... |
583 |
|
public void run() |
584 |
|
{ |
585 |
0 |
running = true; |
586 |
|
|
587 |
0 |
while (running) |
588 |
|
{ |
589 |
0 |
running = scrollOnce(); |
590 |
0 |
try |
591 |
|
{ |
592 |
0 |
Thread.sleep(100); |
593 |
|
} catch (Exception ex) |
594 |
|
{ |
595 |
|
} |
596 |
|
} |
597 |
0 |
IdPanel.this.scrollThread = null; |
598 |
|
} |
599 |
|
|
600 |
|
|
601 |
|
|
602 |
|
|
603 |
|
|
|
|
| 0% |
Uncovered Elements: 15 (15) |
Complexity: 4 |
Complexity Density: 0.44 |
|
604 |
0 |
boolean scrollOnce()... |
605 |
|
{ |
606 |
0 |
ViewportRanges ranges = IdPanel.this.av.getRanges(); |
607 |
0 |
if (ranges.scrollUp(up)) |
608 |
|
{ |
609 |
0 |
int toSeq = up ? ranges.getStartSeq() : ranges.getEndSeq(); |
610 |
0 |
int fromSeq = toSeq < lastid ? lastid - 1 : lastid + 1; |
611 |
0 |
IdPanel.this.selectSeqs(fromSeq, toSeq); |
612 |
0 |
lastid = toSeq; |
613 |
0 |
alignPanel.paintAlignment(false, false); |
614 |
0 |
return true; |
615 |
|
} |
616 |
|
|
617 |
0 |
return false; |
618 |
|
} |
619 |
|
} |
620 |
|
} |