void (HyperlinkEvent e) { if (e.getInputEvent() instanceof MouseEvent mouseEvent) { switch (mouseEvent.getID()) { case MouseEvent.MOUSE_ENTERED -> tooltip.mouseEntered(mouseEvent); case MouseEvent.MOUSE_EXITED -> tooltip.mouseExited(mouseEvent); case MouseEvent.MOUSE_MOVED -> tooltip.mouseMoved(mouseEvent); } } delegate.hyperlinkUpdate(e); }