git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d6d6a6
)
JAL-3054 table tooltip follow mouse in a sensible manner
bug/JAL-3049colourCellTooltip
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 3 Jul 2018 12:42:15 +0000
(13:42 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Tue, 3 Jul 2018 12:42:15 +0000
(13:42 +0100)
src/jalview/gui/FeatureSettings.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/FeatureSettings.java
b/src/jalview/gui/FeatureSettings.java
index
a1d9a04
..
7fb3af9
100644
(file)
--- a/
src/jalview/gui/FeatureSettings.java
+++ b/
src/jalview/gui/FeatureSettings.java
@@
-233,6
+233,21
@@
public class FeatureSettings extends JPanel
}
return tip;
}
}
return tip;
}
+
+ /**
+ * Position the tooltip at the bottom edge of, and half way across, the
+ * current cell
+ */
+ @Override
+ public Point getToolTipLocation(MouseEvent e)
+ {
+ Point point = e.getPoint();
+ int column = table.columnAtPoint(point);
+ int row = table.rowAtPoint(point);
+ Rectangle r = getCellRect(row, column, false);
+ Point loc = new Point(r.x + r.width / 2, r.y + r.height);
+ return loc;
+ }
};
table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12));
table.setFont(new Font("Verdana", Font.PLAIN, 12));
};
table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12));
table.setFont(new Font("Verdana", Font.PLAIN, 12));