public class JavaFXUtils extends Object
Constructor and Description |
---|
JavaFXUtils() |
Modifier and Type | Method and Description |
---|---|
static javafx.scene.image.Image |
changeFxIconColor(javafx.scene.image.Image image,
int oldColor,
int newColor) |
static javafx.scene.image.Image |
createFxIcon(String path) |
static javafx.scene.image.Image |
createFxIcon(String path,
boolean backgroundLoading) |
static javafx.scene.image.Image |
createInvertedMonochromeFxIcon(javafx.scene.image.Image icon,
int baseColor)
Inverts "monochrome" (of one base color) JavaFX image's colors,
changing baseColor to white and other colors to their inversion
|
static void |
ensureRunInFXThread(Runnable runnable) |
static void |
setDefaultLoaderClass(Class<?> defaultLoaderClass) |
static String |
truncateToLayoutBoundsWidth(String s,
double maxWidth) |
static String |
truncateToLayoutBoundsWidth(String s,
double maxWidth,
javafx.scene.text.Font font) |
public static javafx.scene.image.Image createFxIcon(String path)
public static javafx.scene.image.Image createFxIcon(String path, boolean backgroundLoading)
public static javafx.scene.image.Image createInvertedMonochromeFxIcon(javafx.scene.image.Image icon, int baseColor)
icon
- original imagebaseColor
- color to be changed to whitepublic static javafx.scene.image.Image changeFxIconColor(javafx.scene.image.Image image, int oldColor, int newColor)
public static void setDefaultLoaderClass(Class<?> defaultLoaderClass)
public static String truncateToLayoutBoundsWidth(String s, double maxWidth)
public static String truncateToLayoutBoundsWidth(String s, double maxWidth, javafx.scene.text.Font font)
public static void ensureRunInFXThread(Runnable runnable)
Copyright © 2019. All rights reserved.