Class FocusUtil
java.lang.Object
com.dlsc.gemsfx.util.FocusUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddelegateFocus(javafx.scene.Node receiver, javafx.scene.Node delegate) static javafx.scene.NodefindFirstFocusableNode(javafx.scene.Node node) Finds the first FocusTraversable node in the tree hierarchy of a given node.static voidfocusOnFirstFocusableNode(javafx.scene.Node node) static voidrequestFocus(javafx.scene.Node node) Requests focus on the specified node if the node is visible in the tree hierarchy.
-
Method Details
-
requestFocus
public static void requestFocus(javafx.scene.Node node) Requests focus on the specified node if the node is visible in the tree hierarchy. The node will receive the keyboard focus if it is currently showing.- Parameters:
node- The node to request focus on.
-
delegateFocus
public static void delegateFocus(javafx.scene.Node receiver, javafx.scene.Node delegate) -
findFirstFocusableNode
public static javafx.scene.Node findFirstFocusableNode(javafx.scene.Node node) Finds the first FocusTraversable node in the tree hierarchy of a given node.- Parameters:
node- The node to start the search from.- Returns:
- The first focusable node found, or null if no focusable node is found.
-
focusOnFirstFocusableNode
public static void focusOnFirstFocusableNode(javafx.scene.Node node)
-