List of usage examples for javafx.scene.control Label getFont
public final Font getFont()
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); }