Example usage for javafx.scene.control Tooltip textOverrunProperty

List of usage examples for javafx.scene.control Tooltip textOverrunProperty

Introduction

In this page you can find the example usage for javafx.scene.control Tooltip textOverrunProperty.

Prototype

public final ObjectProperty<OverrunStyle> textOverrunProperty() 

Source Link

Document

Specifies the behavior to use if the text of the Tooltip exceeds the available space for rendering the text.

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);/*w  ww. ja v a 2s.  co m*/
    stage.setHeight(150);

    Button button = new Button("Hover Over Me");
    Tooltip toolTip = new Tooltip("Tooltip for Button");
    toolTip.setWrapText(true);
    System.out.println(toolTip.textOverrunProperty());

    button.setTooltip(toolTip);
    ((Group) scene.getRoot()).getChildren().add(button);

    stage.setScene(scene);
    stage.show();
}