Example usage for javafx.scene.control Label getFont

List of usage examples for javafx.scene.control Label getFont

Introduction

In this page you can find the example usage for javafx.scene.control Label getFont.

Prototype

public final Font getFont() 

Source Link

Usage

From source file:de.micromata.mgc.javafx.FXGuiUtils.java

/**
 * Computes the required height of the label to fully render its text.
 * /* www  .j ava2 s.  c o m*/
 * @param width used if the {@link Label#wrapTextProperty()} is true. Then this value is the max line width when the
 *          text needs to be wrapped.
 * @param msg the label.
 * @return required height.
 */
public static double computeLabelHeight(double width, Label msg) {
    final Font font = msg.getFont();
    final String str = msg.getText();
    return computeTextHeight(font, str, msg.isWrapText() ? width : 0);
}