void (final JTree tree, final MouseEvent e, final HaveTooltip launcher) { final String text = tree.getToolTipText(e); final String newText = launcher == null ? null : launcher.getTooltip(); if (!Objects.equals(text, newText)) { tree.setToolTipText(newText); } }