Java Code Examples for javafx.scene.control.Tooltip#setHideDelay()

The following examples show how to use javafx.scene.control.Tooltip#setHideDelay() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FxmlControl.java    From MyBox with Apache License 2.0 5 votes vote down vote up
public static void setTooltip(final Node node, Node tip) {
    if (node instanceof Control) {
        removeTooltip((Control) node);
    }
    Tooltip tooltip = new Tooltip();
    tooltip.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
    tooltip.setGraphic(tip);
    tooltip.setShowDelay(Duration.millis(10));
    tooltip.setShowDuration(Duration.millis(360000));
    tooltip.setHideDelay(Duration.millis(10));
    Tooltip.install(node, tooltip);
}
 
Example 2
Source File: FxmlControl.java    From MyBox with Apache License 2.0 5 votes vote down vote up
public static void setTooltip(final Node node, final Tooltip tooltip) {
    if (node instanceof Control) {
        removeTooltip((Control) node);
    }
    tooltip.setFont(new Font(AppVariables.sceneFontSize));
    tooltip.setShowDelay(Duration.millis(10));
    tooltip.setShowDuration(Duration.millis(360000));
    tooltip.setHideDelay(Duration.millis(10));
    Tooltip.install(node, tooltip);
}