1 /* 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 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.shape; 27 28 import java.util.Arrays; 29 import java.util.Collection; 30 31 import javafx.scene.paint.Color; 32 33 import org.junit.runner.RunWith; 34 import org.junit.runners.Parameterized; 35 import org.junit.runners.Parameterized.Parameters; 36 37 import com.sun.javafx.test.CssMethodsTestBase; 38 39 @RunWith(Parameterized.class) 40 public class Shape_cssMethods_Test extends CssMethodsTestBase { 41 private static final Rectangle TEST_SHAPE = new Rectangle(100, 100); 42 43 @Parameters 44 public static Collection data() { 45 return Arrays.asList(new Object[] { 46 config(TEST_SHAPE, "fill", null, "-fx-fill", Color.RED), 47 config(TEST_SHAPE, "fill", null, "-fx-fill", null), 48 config(TEST_SHAPE, "smooth", false, "-fx-smooth", true), 49 config(TEST_SHAPE, "stroke", null, "-fx-stroke", Color.BLUE), 50 config(TEST_SHAPE, "strokeDashOffset", 0.0, 51 "-fx-stroke-dash-offset", 2.0), 52 config(TEST_SHAPE, "strokeLineCap", StrokeLineCap.SQUARE, 53 "-fx-stroke-line-cap", StrokeLineCap.ROUND), 54 config(TEST_SHAPE, "strokeLineJoin", StrokeLineJoin.BEVEL, 55 "-fx-stroke-line-join", StrokeLineJoin.MITER), 56 config(TEST_SHAPE, "strokeType", StrokeType.CENTERED, 57 "-fx-stroke-type", StrokeType.INSIDE), 58 config(TEST_SHAPE, "strokeMiterLimit", 0.0, 59 "-fx-stroke-miter-limit", 20.0), 60 config(TEST_SHAPE, "strokeWidth", 1.0, 61 "-fx-stroke-width", 2.0), 62 // TODO: strokeDashArray is not writable! 63 // config(TEST_SHAPE, Shape.STROKE_DASH_ARRAY, 64 // new GenericObservableList<Double>(), 65 // "-fx-stroke-dash-array", 66 // new GenericObservableList<Double>(10.0, 5.0, 2.0)), 67 config(TEST_SHAPE, "translateY", 0.0, 68 "-fx-translate-y", 10.0) 69 }); 70 } 71 72 public Shape_cssMethods_Test(final Configuration configuration) { 73 super(configuration); 74 } 75 76 static { 77 } 78 }