- java.lang.Object
-
- com.iamsoft.util.ui.javafx.LabelUtil
-
public final class LabelUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublecomputeMinHeight(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)static doublecomputeMinWidth(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)static doublecomputePrefHeight(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)static doublecomputePrefWidth(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)static doublecomputePrefWidth(javafx.scene.control.Label pLabel)static doublecomputeTextWidth(String pText)static Function<String,Double>textWidthCalculator()static javafx.util.Pair<javafx.beans.value.ObservableValue<String>,Runnable>truncatedText(javafx.scene.control.Labeled pLabel, javafx.beans.value.ObservableValue<String> pText, BiFunction<String,Double,String> pTruncateFunction)Returns a pair of observable value, which provides the truncated text and a runnable, which can be used to dispose the created bindings.static javafx.util.Pair<javafx.beans.value.ObservableValue<String>,Runnable>truncatedText(javafx.scene.control.Labeled pLabel, javafx.beans.value.ObservableValue<String> pText, javafx.beans.value.ObservableValue<BiFunction<String,Double,String>> pTruncateFunctionProperty)Returns a pair of observable value, which provides the truncated text and a runnable, which can be used to dispose the created bindings.
-
-
-
Method Detail
-
computeMinWidth
public static double computeMinWidth(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)
-
computePrefWidth
public static double computePrefWidth(javafx.scene.control.Label pLabel)
-
computePrefWidth
public static double computePrefWidth(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)
-
computeMinHeight
public static double computeMinHeight(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)
-
computePrefHeight
public static double computePrefHeight(javafx.scene.control.Control pControl, Supplier<javafx.scene.control.Skin<?>> pSkinFactory)
-
computeTextWidth
public static double computeTextWidth(String pText)
-
truncatedText
public static javafx.util.Pair<javafx.beans.value.ObservableValue<String>,Runnable> truncatedText(javafx.scene.control.Labeled pLabel, javafx.beans.value.ObservableValue<String> pText, BiFunction<String,Double,String> pTruncateFunction)
Returns a pair of observable value, which provides the truncated text and a runnable, which can be used to dispose the created bindings.
-
truncatedText
public static javafx.util.Pair<javafx.beans.value.ObservableValue<String>,Runnable> truncatedText(javafx.scene.control.Labeled pLabel, javafx.beans.value.ObservableValue<String> pText, javafx.beans.value.ObservableValue<BiFunction<String,Double,String>> pTruncateFunctionProperty)
Returns a pair of observable value, which provides the truncated text and a runnable, which can be used to dispose the created bindings.
-
-