modules/graphics/src/test/java/javafx/css/Node_cssStyleMap_Test.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


   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 com.sun.javafx.css;





  27 
  28 import com.sun.javafx.css.converters.FontConverter;
  29 import com.sun.javafx.css.converters.SizeConverter;
  30 import com.sun.javafx.tk.Toolkit;
  31 import java.util.ArrayList;
  32 import java.util.Collections;
  33 import java.util.HashMap;
  34 import java.util.List;
  35 import java.util.Map;
  36 
  37 import javafx.beans.property.Property;
  38 import javafx.collections.FXCollections;
  39 import javafx.collections.MapChangeListener;
  40 import javafx.css.CssMetaData;
  41 import javafx.css.ParsedValue;
  42 import javafx.css.StyleOrigin;
  43 import javafx.css.Styleable;
  44 import javafx.css.StyleableProperty;
  45 import javafx.scene.Group;
  46 import javafx.scene.Node;
  47 import javafx.scene.Scene;
  48 import javafx.scene.paint.Color;
  49 import javafx.scene.shape.Rectangle;
  50 import javafx.scene.text.Font;
  51 import javafx.scene.text.Text;
  52 import javafx.stage.Stage;
  53 import static org.junit.Assert.*;
  54 
  55 import javafx.util.Pair;
  56 import org.junit.Ignore;
  57 import org.junit.Test;
  58 
  59 @Ignore
  60 public class Node_cssStyleMap_Test {
  61     
  62     public Node_cssStyleMap_Test() {
  63     }
  64 
  65     boolean disabled = false;
  66 
  67     private void checkFoundStyle(Property<?> property, Map<StyleableProperty<?>, List<Style>> map, List<Declaration> decls) {
  68 
  69         List<Style> styles = map.get(property);
  70         assert (styles != null && !styles.isEmpty());
  71 
  72         String pname = ((StyleableProperty<?>)property).getCssMetaData().getProperty();
  73         Declaration declaration = null;
  74         for(Declaration decl : decls) {
  75             if (pname.equals(decl.getProperty())) {




   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.css;
  27 
  28 import com.sun.javafx.css.ParsedValueImpl;
  29 import com.sun.javafx.css.StyleManager;
  30 import javafx.css.converter.FontConverter;
  31 import javafx.css.converter.SizeConverter;
  32 



  33 import java.util.ArrayList;
  34 import java.util.Collections;

  35 import java.util.List;
  36 import java.util.Map;
  37 
  38 import javafx.beans.property.Property;







  39 import javafx.scene.Group;
  40 import javafx.scene.Node;
  41 import javafx.scene.Scene;
  42 import javafx.scene.paint.Color;
  43 import javafx.scene.shape.Rectangle;
  44 import javafx.scene.text.Font;
  45 import javafx.scene.text.Text;
  46 
  47 import static org.junit.Assert.*;
  48 

  49 import org.junit.Ignore;
  50 import org.junit.Test;
  51 
  52 @Ignore
  53 public class Node_cssStyleMap_Test {
  54     
  55     public Node_cssStyleMap_Test() {
  56     }
  57 
  58     boolean disabled = false;
  59 
  60     private void checkFoundStyle(Property<?> property, Map<StyleableProperty<?>, List<Style>> map, List<Declaration> decls) {
  61 
  62         List<Style> styles = map.get(property);
  63         assert (styles != null && !styles.isEmpty());
  64 
  65         String pname = ((StyleableProperty<?>)property).getCssMetaData().getProperty();
  66         Declaration declaration = null;
  67         for(Declaration decl : decls) {
  68             if (pname.equals(decl.getProperty())) {