public class Utils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.text.BreakIterator |
charIterator |
(package private) static TextBoundsType |
DEFAULT_BOUNDS_TYPE |
(package private) static double |
DEFAULT_LINE_SPACING |
(package private) static java.lang.String |
DEFAULT_TEXT |
(package private) static double |
DEFAULT_WRAPPING_WIDTH |
(package private) static Text |
helper |
(package private) static TextLayout |
layout |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
addMnemonics(ContextMenu popup,
Scene scene) |
(package private) static void |
addMnemonics(ContextMenu popup,
Scene scene,
boolean initialState) |
static double |
boundedSize(double value,
double min,
double max) |
(package private) static java.lang.String |
computeClippedText(Font font,
java.lang.String text,
double width,
OverrunStyle type,
java.lang.String ellipsisString) |
(package private) static java.lang.String |
computeClippedWrappedText(Font font,
java.lang.String text,
double width,
double height,
OverrunStyle truncationStyle,
java.lang.String ellipsisString,
TextBoundsType boundsType) |
(package private) static int |
computeEndOfWord(Font font,
java.lang.String text,
int index) |
(package private) static int |
computeStartOfWord(Font font,
java.lang.String text,
int index) |
(package private) static double |
computeTextHeight(Font font,
java.lang.String text,
double wrappingWidth,
double lineSpacing,
TextBoundsType boundsType) |
(package private) static double |
computeTextHeight(Font font,
java.lang.String text,
double wrappingWidth,
TextBoundsType boundsType) |
(package private) static double |
computeTextWidth(Font font,
java.lang.String text,
double wrappingWidth) |
(package private) static int |
computeTruncationIndex(Font font,
java.lang.String text,
double width) |
(package private) static double |
computeXOffset(double width,
double contentWidth,
HPos hpos) |
(package private) static double |
computeYOffset(double height,
double contentHeight,
VPos vpos) |
static <T> void |
executeOnceWhenPropertyIsNonNull(ObservableValue<T> p,
java.util.function.Consumer<T> consumer) |
private static int |
firstBreakCharIndex(java.lang.String str,
int start) |
(package private) static double |
getAscent(Font font,
TextBoundsType boundsType) |
static int |
getHitInsertionIndex(HitInfo hit,
java.lang.String text) |
(package private) static double |
getLineHeight(Font font,
TextBoundsType boundsType) |
static java.net.URL |
getResource(java.lang.String str) |
private static boolean |
isPreferredBreakCharacter(char ch) |
static boolean |
isTwoLevelFocus() |
private static int |
lastBreakCharIndex(java.lang.String str,
int start) |
(package private) static void |
removeMnemonics(ContextMenu popup,
Scene scene) |
private static boolean |
requiresComplexLayout(Font font,
java.lang.String string) |
static final Text helper
static final double DEFAULT_WRAPPING_WIDTH
static final double DEFAULT_LINE_SPACING
static final java.lang.String DEFAULT_TEXT
static final TextBoundsType DEFAULT_BOUNDS_TYPE
static final TextLayout layout
private static java.text.BreakIterator charIterator
static double getAscent(Font font, TextBoundsType boundsType)
static double getLineHeight(Font font, TextBoundsType boundsType)
static double computeTextWidth(Font font, java.lang.String text, double wrappingWidth)
static double computeTextHeight(Font font, java.lang.String text, double wrappingWidth, TextBoundsType boundsType)
static double computeTextHeight(Font font, java.lang.String text, double wrappingWidth, double lineSpacing, TextBoundsType boundsType)
static int computeTruncationIndex(Font font, java.lang.String text, double width)
static java.lang.String computeClippedText(Font font, java.lang.String text, double width, OverrunStyle type, java.lang.String ellipsisString)
static java.lang.String computeClippedWrappedText(Font font, java.lang.String text, double width, double height, OverrunStyle truncationStyle, java.lang.String ellipsisString, TextBoundsType boundsType)
private static int firstBreakCharIndex(java.lang.String str, int start)
private static int lastBreakCharIndex(java.lang.String str, int start)
private static boolean isPreferredBreakCharacter(char ch)
private static boolean requiresComplexLayout(Font font, java.lang.String string)
static int computeStartOfWord(Font font, java.lang.String text, int index)
static int computeEndOfWord(Font font, java.lang.String text, int index)
public static double boundedSize(double value, double min, double max)
static void addMnemonics(ContextMenu popup, Scene scene)
static void addMnemonics(ContextMenu popup, Scene scene, boolean initialState)
static void removeMnemonics(ContextMenu popup, Scene scene)
static double computeXOffset(double width, double contentWidth, HPos hpos)
static double computeYOffset(double height, double contentHeight, VPos vpos)
public static boolean isTwoLevelFocus()
public static int getHitInsertionIndex(HitInfo hit, java.lang.String text)
public static <T> void executeOnceWhenPropertyIsNonNull(ObservableValue<T> p, java.util.function.Consumer<T> consumer)
public static java.net.URL getResource(java.lang.String str)