modules/graphics/src/test/java/test/javafx/scene/layout/MockParent.java

Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:

*** 21,45 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package javafx.scene.layout; import javafx.collections.ObservableList; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.shape.Rectangle; ! class MockParent extends Parent { public MockParent() { Rectangle r = new Rectangle(-10,-20,100,200); ! getChildren().add(r); MockResizable tr = new MockResizable(100,200); ! getChildren().add(tr); // layoutBounds = -10, -20, 100, 200 width=110 height=220 } - @Override public ObservableList<Node> getChildren() { - return super.getChildren(); - } } --- 21,43 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package test.javafx.scene.layout; import javafx.collections.ObservableList; import javafx.scene.Node; import javafx.scene.Parent; + import javafx.scene.ParentShim; import javafx.scene.shape.Rectangle; ! public class MockParent extends ParentShim { public MockParent() { Rectangle r = new Rectangle(-10,-20,100,200); ! ParentShim.getChildren(this).add(r); MockResizable tr = new MockResizable(100,200); ! ParentShim.getChildren(this).add(tr); // layoutBounds = -10, -20, 100, 200 width=110 height=220 } }