javafx.scene.text.Text#setOnMouseEntered ( )源码实例Demo

下面列出了javafx.scene.text.Text#setOnMouseEntered ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jstackfx   文件: ThreadListCellFactory.java
protected Text buildThreadLink(final TableCell<ThreadElement, Set<ThreadElement>> cell, final ThreadElement thread) {
    final Text threadText = new Text(thread.getName());
    threadText.getStyleClass().add("text");

    threadText.setOnMouseClicked(ThreadListCellFactory.this.buildMouseClickedEventHandler(cell, thread));
    threadText.setOnMouseEntered(event -> threadText.setCursor(Cursor.HAND));

    return threadText;
}
 
源代码2 项目: pdfsam   文件: HelpUtils.java
private static Text helpIcon(HelpPopup popup) {
    Text icon = MaterialDesignIconFactory.get().createIcon(MaterialDesignIcon.HELP_CIRCLE, "1.1em");
    icon.setOnMouseEntered(e -> {
        Point2D p = icon.localToScreen(icon.getLayoutBounds().getMaxX(), icon.getLayoutBounds().getMaxY());
        popup.show(icon, p.getX(), p.getY());
    });
    icon.setOnMouseExited(e -> popup.hide());
    return icon;
}