boolean (@Nullable MouseEvent e, AdditionalIcon icon) { if (!isHovered() || !icon.getAvailable()) return false; Point point = null; if (e != null) { point = e.getLocationOnScreen(); } else { PointerInfo info = MouseInfo.getPointerInfo(); if (info != null) { point = info.getLocation(); } else { AWTEvent event = IdeEventQueue.getInstance().getTrueCurrentEvent(); if (event instanceof MouseEvent) { point = ((MouseEvent)event).getLocationOnScreen(); } } } if (point == null) return false; SwingUtilities.convertPointFromScreen(point, this); return icon.contains(point); }