(MouseEvent e)
| 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(); |
no test coverage detected