public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
clamp(double min,
double value,
double max)
Simple utility function which clamps the given value to be strictly
between the min and max values.
|
static java.lang.String |
getExcelLetterFromNumber(int number)
Return a letter (just like Excel) associated with the number.
|
static javafx.stage.Window |
getWindow(java.lang.Object owner)
Will return a
Window from an object if any can be found. |
static double |
nearest(double less,
double value,
double more)
Utility function which returns either
less or more
depending on which value is closer to. |
public static javafx.stage.Window getWindow(java.lang.Object owner)
throws java.lang.IllegalArgumentException
Window from an object if any can be found. null
value can be given, the program will then try to find the focused window
among those available.owner - the object whose window is to be found.java.lang.IllegalArgumentExceptionpublic static final java.lang.String getExcelLetterFromNumber(int number)
number - the number whose Excel Letter is to be found.public static double clamp(double min,
double value,
double max)
public static double nearest(double less,
double value,
double more)
less or more
depending on which value is closer to. If value
is perfectly between them, then either may be returned.