void (@NotNull JComponent component, @NotNull MouseEvent event) { setTitle(component.getToolTipText(event)); Supplier<String> shortcutSupplier = ClientProperty.get(component, SHORTCUT_PROPERTY); setShortcut(shortcutSupplier == null ? null : shortcutSupplier.get()); if (event.getID() == MouseEvent.MOUSE_ENTERED) { myMouseListener.mouseEntered(event); } else { myMouseListener.mouseMoved(event); } }