git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into bug/JAL-4059_update_swingJS_for_JalviewJS_2_11_2_and_2_11_3
[jalview.git]
/
src
/
jalview
/
gui
/
SeqPanel.java
diff --git
a/src/jalview/gui/SeqPanel.java
b/src/jalview/gui/SeqPanel.java
index
d39f937
..
2caea17
100644
(file)
--- a/
src/jalview/gui/SeqPanel.java
+++ b/
src/jalview/gui/SeqPanel.java
@@
-348,8
+348,9
@@
public class SeqPanel extends JPanel
*/
int findAlignmentColumn(MouseEvent evt)
{
*/
int findAlignmentColumn(MouseEvent evt)
{
- return findNearestColumn(evt,true);
+ return findNearestColumn(evt, true);
}
}
+
/**
* Returns the aligned sequence position (base 0) at the mouse position, or
* the closest visible one
/**
* Returns the aligned sequence position (base 0) at the mouse position, or
* the closest visible one
@@
-364,9
+365,11
@@
public class SeqPanel extends JPanel
{
return findNearestColumn(evt, false);
}
{
return findNearestColumn(evt, false);
}
-
+
/**
/**
- * @param nearestColumn when false returns negative values for out of bound positions - -1 for scale left/right, <-1 if far to right
+ * @param nearestColumn
+ * when false returns negative values for out of bound positions - -1
+ * for scale left/right, <-1 if far to right
* @return nearest absolute column to mouse pointer
*/
private int findNearestColumn(MouseEvent evt, boolean nearestColumn)
* @return nearest absolute column to mouse pointer
*/
private int findNearestColumn(MouseEvent evt, boolean nearestColumn)
@@
-394,9
+397,12
@@
public class SeqPanel extends JPanel
if (x < 0)
{
// mouse is over left scale
if (x < 0)
{
// mouse is over left scale
- if (!nearestColumn) {
+ if (!nearestColumn)
+ {
return -1;
return -1;
- } else {
+ }
+ else
+ {
x = 0;
}
}
x = 0;
}
}
@@
-408,11
+414,14
@@
public class SeqPanel extends JPanel
}
if (x >= cwidth * charWidth)
{
}
if (x >= cwidth * charWidth)
{
- if (!nearestColumn) {
+ if (!nearestColumn)
+ {
// mouse is over right scale
return -1;
// mouse is over right scale
return -1;
- } else {
- x = cwidth*charWidth -1;
+ }
+ else
+ {
+ x = cwidth * charWidth - 1;
}
}
}
}
@@
-439,7
+448,6
@@
public class SeqPanel extends JPanel
res = Math.min(res, av.getRanges().getEndRes());
}
res = Math.min(res, av.getRanges().getEndRes());
}
-
if (av.hasHiddenColumns())
{
if (av.hasHiddenColumns())
{