public void run() { IHyperlink link = viewer.getHyperlink(); if (link != null) { link.linkActivated(); } }
/** * Notification a link was exited. * * @param link * the link that was exited */ protected void linkExited(IHyperlink link) { link.linkExited(); hyperlink = null; Control control = getTextWidget(); control.setCursor(getTextCursor()); control.redraw(); control.removeMouseListener(this); }
/** * Notification a hyperlink has been entered. * * @param link * the link that was entered */ protected void linkEntered(IHyperlink link) { Control control = getTextWidget(); if (hyperlink != null) { linkExited(hyperlink); } hyperlink = link; hyperlink.linkEntered(); control.setCursor(getHandCursor()); control.redraw(); control.addMouseListener(this); }
/** * Notification a link was exited. * * @param link * the link that was exited */ protected void linkExited(IHyperlink link) { link.linkExited(); hyperlink = null; Control control = getTextWidget(); control.setCursor(getTextCursor()); control.redraw(); control.removeMouseListener(this); }
/** * Notification a hyperlink has been entered. * * @param link * the link that was entered */ protected void linkEntered(IHyperlink link) { Control control = getTextWidget(); if (hyperlink != null) { linkExited(hyperlink); } hyperlink = link; hyperlink.linkEntered(); control.setCursor(getHandCursor()); control.redraw(); control.addMouseListener(this); }
@Override public void run() { IHyperlink link = viewer.getHyperlink(); if (link != null) { link.linkActivated(); } }
public void handleEvent(Event event) { if (hyperlink != null) { String selection = getTextWidget().getSelectionText(); if (selection.length() <= 0) { if (event.button == 1) { if (hyperlink instanceof IHyperlink2) { ((IHyperlink2) hyperlink).linkActivated(event); } else { hyperlink.linkActivated(); } } } } } };
@Override public void handleEvent(Event event) { if (hyperlink != null) { String selection = getTextWidget().getSelectionText(); if (selection.length() <= 0) { if (event.button == 1) { if (hyperlink instanceof IHyperlink2) { ((IHyperlink2) hyperlink).linkActivated(event); } else { hyperlink.linkActivated(); } } } } } };