Top Constructors Methods
org.controlsfx.tools

public Class Utils

extends Object
Class Inheritance
Imports
java.util.List, javafx.scene.Node, javafx.stage.PopupWindow, .Window

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public 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.

public static final String

Returns:

a letter (like) associated with the number.
getExcelLetterFromNumber
(int
the number whose Excel Letter is to be found.
number
)

Return a letter (just like Excel) associated with the number.

public static Window

Returns:

the window of the given object.
getWindow
(Object
the object whose window is to be found.
owner
)

Will return a Window from an object if any can be found.

public static double
nearest(double less, double value, double more)

Utility function which returns either less or more depending on which value is closer to.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Utilsback to summary
public Utils()

Method Detail

clampback to summary
public 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.

getExcelLetterFromNumberback to summary
public static final String getExcelLetterFromNumber(int number)

Return a letter (just like Excel) associated with the number. When the number is under 26, a simple letter is returned. When the number is superior, concatenated letters are returned. For example: 0 -> A 1 -> B 26 -> AA 32 -> AG 45 -> AT

Parameters
number:int

the number whose Excel Letter is to be found.

Returns:String

a letter (like) associated with the number.

getWindowback to summary
public static Window getWindow(Object owner) throws IllegalArgumentException

Will return a 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.

Parameters
owner:Object

the object whose window is to be found.

Returns:Window

the window of the given object.

nearestback to summary
public static double nearest(double less, double value, double more)

Utility function which returns either less or more depending on which value is closer to. If value is perfectly between them, then either may be returned.