java.lang.Object
io.github.palexdev.virtualizedfx.utils.NodeUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidwaitForScene(Node node, Runnable action, boolean addListenerIfNotNull, boolean isOneShot) Convenience method to execute a given action after that the given node has been laid out and its scene is not null anymore.static voidwaitForSkin(Control control, Runnable action, boolean addListenerIfNotNull, boolean isOneShot) Convenience method to execute a given action after that the given control has been laid out and its skin is not null anymore.
-
构造器详细资料
-
NodeUtils
public NodeUtils()
-
-
方法详细资料
-
waitForSkin
public static void waitForSkin(Control control, Runnable action, boolean addListenerIfNotNull, boolean isOneShot) Convenience method to execute a given action after that the given control has been laid out and its skin is not null anymore. If the skin is not null when called, the action is executed immediately.The listener is added only if the skin is null or the addListenerIfNotNull parameter is true.
- 参数:
control- the control to check for skin initializationaction- the action to perform when the skin is not nulladdListenerIfNotNull- to specify if the listener should be added anyway even if the scene is not nullisOneShot- to specify if the listener added to the skin property should be removed after it is not null anymore
-
waitForScene
public static void waitForScene(Node node, Runnable action, boolean addListenerIfNotNull, boolean isOneShot) Convenience method to execute a given action after that the given node has been laid out and its scene is not null anymore. If the scene is not null when called, the action is executed immediately.The listener is added only if the scene is null or the addListenerIfNotNull parameter is true.
- 参数:
node- the node to check for scene initializationaction- the action to perform when the scene is not nulladdListenerIfNotNull- to specify if the listener should be added anyway even if the scene is not nullisOneShot- to specify if the listener added to the scene property should be removed after it is not null anymore
-