void (MouseEvent e) { Component component = (Component)e.getSource(); Object tag = getTagAt(e); boolean shouldRepaint = false; if (myUnderlined != null) { myUnderlined.setUnderlined(false); myUnderlined = null; shouldRepaint = true; } if (tag instanceof VcsLinkedTextComponent linkedText) { component.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); linkedText.setUnderlined(true); myUnderlined = linkedText; shouldRepaint = true; } else { super.mouseMoved(e); } if (shouldRepaint) { myRenderer.getTextRenderer().getTree().repaint(); } }