Last active
September 3, 2015 01:13
-
-
Save ykubota/518fe67b8f86b1c448dd to your computer and use it in GitHub Desktop.
dump JavaFX Node struct to show all Java classes and css style classes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.scene.Node; | |
import javafx.scene.Parent; | |
// : | |
private void dump(Node n, int depth) { | |
for (int i = 0; i < depth; i++) System.out.print(" "); | |
System.out.println(n); | |
if (n instanceof Parent) for (Node c: ((Parent) n).getChildrenUnmodifiable()) dump(c, depth + 1); | |
} | |
// : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.scene.Node; | |
import javafx.scene.Parent; | |
// : | |
private void dump(Node n, int depth) { | |
for (int i = 0; i < depth; i++) System.out.print(" "); | |
System.out.println(n); | |
if (n instanceof Parent) ((Parent) n).getChildrenUnmodifiable().stream().forEach((c) -> { | |
dump(c, depth + 1); | |
}); | |
} | |
// : |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://community.oracle.com/message/9989628#9989628