Java Code Examples for javafx.scene.control.Tooltip#setContentDisplay()
The following examples show how to use
javafx.scene.control.Tooltip#setContentDisplay() .
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: TooltipCreator.java From kafka-message-tool with MIT License | 5 votes |
public static Tooltip createFrom(String toolTipText) { if (StringUtils.isBlank(toolTipText)) { return null; } Tooltip tip = new Tooltip(); tip.setText(toolTipText); tip.setContentDisplay(ContentDisplay.TEXT_ONLY); return tip; }
Example 2
Source File: FxmlControl.java From MyBox with Apache License 2.0 | 5 votes |
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); }