8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javafx.scene.layout;
27
28 import javafx.css.ParsedValue;
29 import javafx.css.CssMetaData;
30 import com.sun.javafx.css.parser.CSSParser;
31 import javafx.css.StyleableProperty;
32 import static org.junit.Assert.assertEquals;
33 import static org.junit.Assert.assertNull;
34 import javafx.geometry.Insets;
35 import javafx.geometry.Orientation;
36 import javafx.geometry.Pos;
37 import javafx.scene.Node;
38 import javafx.scene.Scene;
39 import javafx.scene.shape.Rectangle;
40 import javafx.stage.Stage;
41 import org.junit.Assert;
42
43 import org.junit.Before;
44 import org.junit.Test;
45
46
47 public class TilePaneTest {
48
49 TilePane tilepane;
50 TilePane htilepane;
51 TilePane vtilepane;
52
53 @Before public void setUp() {
54 tilepane = new TilePane(); // 12 children
55 for(int i = 0; i < 6; i++) {
56 MockResizable child1 = new MockResizable(50,60, 100,200, 500,600);
57 Rectangle child2 = new Rectangle(100, 100);
58 tilepane.getChildren().addAll(child1, child2);
59 }
60
61 htilepane = new TilePane(Orientation.HORIZONTAL); // 8 children
62 for(int i = 0; i < 4; i++) {
63 MockResizable child1 = new MockResizable(200,300);
64 Rectangle child2 = new Rectangle(100, 100);
65 htilepane.getChildren().addAll(child1, child2);
66 }
67
68 vtilepane = new TilePane(Orientation.VERTICAL); // 8 children
|
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package javafx.scene.layout;
27
28 import com.sun.javafx.FXUnit;
29 import javafx.css.ParsedValue;
30 import javafx.css.CssMetaData;
31 import com.sun.javafx.css.parser.CSSParser;
32 import javafx.css.StyleableProperty;
33 import static org.junit.Assert.assertEquals;
34 import static org.junit.Assert.assertNull;
35 import javafx.geometry.Insets;
36 import javafx.geometry.Orientation;
37 import javafx.geometry.Pos;
38 import javafx.scene.Node;
39 import javafx.scene.Scene;
40 import javafx.scene.shape.Rectangle;
41 import javafx.stage.Stage;
42 import org.junit.Assert;
43
44 import org.junit.Before;
45 import org.junit.Rule;
46 import org.junit.Test;
47
48
49 public class TilePaneTest {
50
51 @Rule
52 public FXUnit fx = new FXUnit();
53
54 TilePane tilepane;
55 TilePane htilepane;
56 TilePane vtilepane;
57
58 @Before public void setUp() {
59 tilepane = new TilePane(); // 12 children
60 for(int i = 0; i < 6; i++) {
61 MockResizable child1 = new MockResizable(50,60, 100,200, 500,600);
62 Rectangle child2 = new Rectangle(100, 100);
63 tilepane.getChildren().addAll(child1, child2);
64 }
65
66 htilepane = new TilePane(Orientation.HORIZONTAL); // 8 children
67 for(int i = 0; i < 4; i++) {
68 MockResizable child1 = new MockResizable(200,300);
69 Rectangle child2 = new Rectangle(100, 100);
70 htilepane.getChildren().addAll(child1, child2);
71 }
72
73 vtilepane = new TilePane(Orientation.VERTICAL); // 8 children
|