public class Util
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIND_NODE_EXCLUDE
Tag used to exclude a node from finding
|
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static <T,E> Subscription |
bindContent(java.util.List<? extends T> target,
javafx.collections.ObservableList<E> sourceList,
java.util.function.Function<E,T> converterFunction)
Bind the content to the source list to the target and apply the converter
in between
|
static java.lang.String |
dumpSceneGraph(javafx.scene.Node n)
Dump the scene graph to a formatted string
|
static javafx.scene.Node |
findNode(javafx.scene.Node n,
double screenX,
double screenY)
Find all node at the given x/y location starting the search from the
given node
|
static javafx.scene.Node |
findNode(javafx.stage.Window w,
double screenX,
double screenY)
Find a node in all windows
|
static Subscription |
installHoverCallback(javafx.scene.Node node,
javafx.util.Duration delay,
java.util.function.Consumer<javafx.scene.input.MouseEvent> hoverConsumer)
Install a hover callback
|
static javafx.scene.Node |
toNode(StyledString s)
Create a scenegraph node from the styled string
|
static <T,E> java.util.List<T> |
transformList(java.util.List<? extends E> list,
java.util.function.Function<E,T> converterFunction)
Transform the list to another list
|
static javafx.beans.value.ObservableValue<javafx.stage.Window> |
windowProperty(javafx.scene.Node n)
Get the window property of a node
|
public static final java.lang.String FIND_NODE_EXCLUDE
public static java.lang.String dumpSceneGraph(javafx.scene.Node n)
n - the node to start withpublic static javafx.scene.Node toNode(StyledString s)
s - the stringpublic static javafx.scene.Node findNode(javafx.stage.Window w,
double screenX,
double screenY)
w - the preferred windowscreenX - the screen xscreenY - the screen ynullpublic static javafx.scene.Node findNode(javafx.scene.Node n,
double screenX,
double screenY)
n - the node to use as the startscreenX - the screen xscreenY - the screen ynullpublic static javafx.beans.value.ObservableValue<javafx.stage.Window> windowProperty(javafx.scene.Node n)
n - the node the window property to observepublic static <T,E> Subscription bindContent(java.util.List<? extends T> target,
javafx.collections.ObservableList<E> sourceList,
java.util.function.Function<E,T> converterFunction)
T - the target typeE - the source typetarget - the target listsourceList - the source listconverterFunction - the function used to convertpublic static <T,E> java.util.List<T> transformList(java.util.List<? extends E> list,
java.util.function.Function<E,T> converterFunction)
list - the listconverterFunction - the converter functionpublic static Subscription installHoverCallback(javafx.scene.Node node,
javafx.util.Duration delay,
java.util.function.Consumer<javafx.scene.input.MouseEvent> hoverConsumer)
node - the node the hover is installed ondelay - the delayhoverConsumer - the consumer