void (int x, int y) { Object previnside = mouseinside; Object prevpart = insidepart; findComponent(content, x, y); boolean same = (previnside == mouseinside) && (prevpart == insidepart); boolean isin = (mousepressed == mouseinside) && (pressedpart == insidepart); boolean wasin = (mousepressed == previnside) && (pressedpart == prevpart); if (wasin && !isin) { handleMouseEvent(x, y, 1, false, false, false, MouseEvent.MOUSE_EXITED, mousepressed, pressedpart); } else if (!same && (popupowner != null) && !wasin) { handleMouseEvent(x, y, 1, false, false, false, DRAG_EXITED, previnside, prevpart); } if (isin && !wasin) { handleMouseEvent(x, y, 1, false, false, false, MouseEvent.MOUSE_ENTERED, mousepressed, pressedpart); } else if (!same && (popupowner != null) && !isin) { handleMouseEvent(x, y, 1, false, false, false, DRAG_ENTERED, mouseinside, insidepart); } if (isin == wasin) { handleMouseEvent(x, y, 1, false, false, false, MouseEvent.MOUSE_DRAGGED, mousepressed, pressedpart); } }