modules/graphics/src/test/java/test/javafx/scene/CSSNode.java

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


   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;
  27 
  28 import javafx.css.converter.PaintConverter;
  29 import javafx.css.converter.SizeConverter;
  30 import com.sun.javafx.geom.BaseBounds;
  31 import com.sun.javafx.geom.transform.BaseTransform;
  32 import com.sun.javafx.jmx.MXNodeAlgorithm;
  33 import com.sun.javafx.jmx.MXNodeAlgorithmContext;
  34 import com.sun.javafx.sg.prism.NGGroup;
  35 import com.sun.javafx.sg.prism.NGNode;
  36 import javafx.beans.property.*;
  37 import javafx.css.*;
  38 import javafx.scene.paint.Color;
  39 import javafx.scene.paint.Paint;
  40 
  41 import java.util.ArrayList;
  42 import java.util.List;

  43 
  44 public  class CSSNode extends Node {
  45     
  46     public CSSNode() {
  47         setContentSize(100);
  48     }
  49     
  50     /**
  51      * This variable can be set from CSS and represents the fill
  52      */
  53     private ObjectProperty<Paint> fill;
  54     public ObjectProperty<Paint> fillProperty() {
  55         if (fill == null) {
  56             fill = new StyleableObjectProperty<Paint>(Color.BLACK) {
  57 
  58                 @Override
  59                 public Object getBean() {
  60                     return CSSNode.this;
  61                 }
  62 




   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 test.javafx.scene;
  27 
  28 import javafx.css.converter.PaintConverter;
  29 import javafx.css.converter.SizeConverter;
  30 import com.sun.javafx.geom.BaseBounds;
  31 import com.sun.javafx.geom.transform.BaseTransform;
  32 import com.sun.javafx.jmx.MXNodeAlgorithm;
  33 import com.sun.javafx.jmx.MXNodeAlgorithmContext;
  34 import com.sun.javafx.sg.prism.NGGroup;
  35 import com.sun.javafx.sg.prism.NGNode;
  36 import javafx.beans.property.*;
  37 import javafx.css.*;
  38 import javafx.scene.paint.Color;
  39 import javafx.scene.paint.Paint;
  40 
  41 import java.util.ArrayList;
  42 import java.util.List;
  43 import javafx.scene.Node;
  44 
  45 public  class CSSNode extends Node {
  46     
  47     public CSSNode() {
  48         setContentSize(100);
  49     }
  50     
  51     /**
  52      * This variable can be set from CSS and represents the fill
  53      */
  54     private ObjectProperty<Paint> fill;
  55     public ObjectProperty<Paint> fillProperty() {
  56         if (fill == null) {
  57             fill = new StyleableObjectProperty<Paint>(Color.BLACK) {
  58 
  59                 @Override
  60                 public Object getBean() {
  61                     return CSSNode.this;
  62                 }
  63