示例#1
0
  @Override
  public void mouseReleased(final MouseEvent e) {
    if (linkListener == null) return;

    if (SwingUtilities.isLeftMouseButton(e)) {
      editor.endSelection();
      // evaluate link
      if (!editor.selected()) {
        final TextIterator iter = rend.jump(e.getPoint());
        final String link = iter.link();
        if (link != null) linkListener.linkClicked(link);
      }
    }
  }
示例#2
0
 @Override
 public final void mouseMoved(final MouseEvent e) {
   if (linkListener == null) return;
   final TextIterator iter = rend.jump(e.getPoint());
   gui.cursor(iter.link() != null ? CURSORHAND : CURSORARROW);
 }