Implement cycle detection, for cases where adding a Node to a Parent creates an infite loop with the Node containing the Parent somewhere in its hierarchy.
For example:
Pane pane1 = new Pane();
Pane pane2 = new Pane();
Pane pane3 = new Pane();
pane1.getChildren().add(pane2);
pane2.getChildren().add(pane3)
So far, this should work fine.
pane3.getChildren().add(pane1);
This should be detected and handled as now the Panes contain each other which is not possible:
Description
Implement cycle detection, for cases where adding a
Node
to aParent
creates an infite loop with theNode
containing theParent
somewhere in its hierarchy.For example:
So far, this should work fine.
This should be detected and handled as now the
Panes
contain each other which is not possible: