MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / mouseMoved

Method mouseMoved

ij/src/main/java/ij/gui/ImageCanvas.java:1766–1798  ·  view source on GitHub ↗
(MouseEvent e)

Source from the content-addressed store, hash-verified

1764 }
1765
1766 public void mouseMoved(MouseEvent e) {
1767 //if (ij==null) return;
1768 int sx = e.getX();
1769 int sy = e.getY();
1770 int ox = offScreenX(sx);
1771 int oy = offScreenY(sy);
1772 flags = e.getModifiers();
1773 setCursor(sx, sy, ox, oy);
1774 mousePressedX = mousePressedY = -1;
1775 IJ.setInputEvent(e);
1776 PlugInTool tool = Toolbar.getPlugInTool();
1777 if (tool!=null) {
1778 tool.mouseMoved(imp, e);
1779 if (e.isConsumed()) return;
1780 }
1781 Roi roi = imp.getRoi();
1782 int type = roi!=null?roi.getType():-1;
1783 if (type>0 && (type==Roi.POLYGON||type==Roi.POLYLINE||type==Roi.ANGLE||type==Roi.LINE)
1784 && roi.getState()==roi.CONSTRUCTING)
1785 roi.mouseMoved(e);
1786 else {
1787 if (ox<imageWidth && oy<imageHeight) {
1788 ImageWindow win = imp.getWindow();
1789 // Cursor must move at least 12 pixels before text
1790 // displayed using IJ.showStatus() is overwritten.
1791 if ((sx-sx2)*(sx-sx2)+(sy-sy2)*(sy-sy2)>144)
1792 showCursorStatus = true;
1793 if (win!=null&&showCursorStatus)
1794 win.mouseMoved(ox, oy);
1795 } else
1796 IJ.showStatus("");
1797 }
1798 }
1799
1800 public void mouseEntered(MouseEvent e) {
1801 PlugInTool tool = Toolbar.getPlugInTool();

Callers 1

mouseMovedMethod · 0.95

Calls 15

offScreenXMethod · 0.95
offScreenYMethod · 0.95
setCursorMethod · 0.95
setInputEventMethod · 0.95
getPlugInToolMethod · 0.95
mouseMovedMethod · 0.95
getTypeMethod · 0.95
getStateMethod · 0.95
mouseMovedMethod · 0.95
mouseMovedMethod · 0.95
showStatusMethod · 0.95
getModifiersMethod · 0.80

Tested by

no test coverage detected