public class TextSizingUtility extends Object
| Constructor and Description |
|---|
TextSizingUtility() |
| Modifier and Type | Method and Description |
|---|---|
javafx.geometry.Dimension2D |
calculate(int size,
javafx.scene.text.Font font)
Calculate the dimensions of a string using the font with the number of characters.
|
javafx.geometry.Dimension2D |
calculate(String text,
javafx.scene.text.Font font)
Calculate the dimensions of a string using the font with the characters in the string.
|
(package private) double |
computeTextHeight(javafx.scene.text.Font font,
String text,
double wrappingWidth) |
(package private) double |
computeTextHeight(javafx.scene.text.Font font,
String text,
double wrappingWidth,
double lineSpacing) |
(package private) double |
computeTextWidth(javafx.scene.text.Font font,
String text,
double wrappingWidth) |
int |
guessNumberOfCharacters(double destWidth,
javafx.scene.text.Font font)
Guess the number of characters that can be displayed in
destWidth. |
double computeTextWidth(javafx.scene.text.Font font,
String text,
double wrappingWidth)
double computeTextHeight(javafx.scene.text.Font font,
String text,
double wrappingWidth)
double computeTextHeight(javafx.scene.text.Font font,
String text,
double wrappingWidth,
double lineSpacing)
public javafx.geometry.Dimension2D calculate(int size,
javafx.scene.text.Font font)
size - font - public int guessNumberOfCharacters(double destWidth,
javafx.scene.text.Font font)
destWidth.
The number is guessed as an arbitrary width per character for the font is assumed.destWidth - font - public javafx.geometry.Dimension2D calculate(String text, javafx.scene.text.Font font)
text - font - Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.