< prev index next >

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

Print this page

        

*** 26,35 **** --- 26,36 ---- package test.javafx.css; import com.sun.javafx.css.CascadingStyle; import com.sun.javafx.css.ParsedValueImpl; import com.sun.javafx.css.StyleManager; + import com.sun.javafx.scene.NodeHelper; import javafx.css.converter.FontConverter; import javafx.css.converter.SizeConverter; import java.util.ArrayList; import java.util.Collections;
*** 146,166 **** StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet); Scene scene = new Scene(root); rect.applyCss(); ! Map<StyleableProperty<?>, List<Style>> map = rect.impl_findStyles(null); assert (map != null && !map.isEmpty()); checkFoundStyle(rect.fillProperty(), map, declsNoState); checkFoundStyle(rect.strokeProperty(), map, declsNoState); checkFoundStyle(rect.strokeWidthProperty(), map, declsNoState); rect.setDisable(true); rect.applyCss(); ! map = rect.impl_findStyles(null); assert (map != null && !map.isEmpty()); checkFoundStyle(rect.fillProperty(), map, declsDisabledState); checkFoundStyle(rect.strokeProperty(), map, declsDisabledState); checkFoundStyle(rect.strokeWidthProperty(), map, declsNoState); --- 147,167 ---- StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet); Scene scene = new Scene(root); rect.applyCss(); ! Map<StyleableProperty<?>, List<Style>> map = NodeHelper.findStyles(rect, null); assert (map != null && !map.isEmpty()); checkFoundStyle(rect.fillProperty(), map, declsNoState); checkFoundStyle(rect.strokeProperty(), map, declsNoState); checkFoundStyle(rect.strokeWidthProperty(), map, declsNoState); rect.setDisable(true); rect.applyCss(); ! map = NodeHelper.findStyles(rect, null); assert (map != null && !map.isEmpty()); checkFoundStyle(rect.fillProperty(), map, declsDisabledState); checkFoundStyle(rect.strokeProperty(), map, declsDisabledState); checkFoundStyle(rect.strokeWidthProperty(), map, declsNoState);
*** 197,207 **** Scene scene = new Scene(root); root.applyCss(); // Even though root and group have no styles, the styles for rect should still be found ! Map<StyleableProperty<?>, List<Style>> map = root.impl_findStyles(null); assert (map != null && !map.isEmpty()); checkFoundStyle(rect.fillProperty(), map, declsNoState); } --- 198,208 ---- Scene scene = new Scene(root); root.applyCss(); // Even though root and group have no styles, the styles for rect should still be found ! Map<StyleableProperty<?>, List<Style>> map = NodeHelper.findStyles(root, null); assert (map != null && !map.isEmpty()); checkFoundStyle(rect.fillProperty(), map, declsNoState); }
*** 261,271 **** StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet); Scene scene = new Scene(group); text.applyCss(); ! Map<StyleableProperty<?>, List<Style>> map = text.impl_findStyles(null); assert (map != null && !map.isEmpty()); checkFoundStyle(text.fontProperty(), map, textDecls); } --- 262,272 ---- StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet); Scene scene = new Scene(group); text.applyCss(); ! Map<StyleableProperty<?>, List<Style>> map = NodeHelper.findStyles(text, null); assert (map != null && !map.isEmpty()); checkFoundStyle(text.fontProperty(), map, textDecls); }
*** 327,337 **** int nExpected = expectedStyles.size(); assert(nExpected > 0); for(CssMetaData cssMetaData : text.getCssMetaData()) { ! List<Style> styles = Node.impl_getMatchingStyles(cssMetaData, text); if (styles != null && !styles.isEmpty()) { assertTrue(expectedStyles.containsAll(styles)); assertTrue(styles.containsAll(expectedStyles)); nExpected -= 1; } --- 328,338 ---- int nExpected = expectedStyles.size(); assert(nExpected > 0); for(CssMetaData cssMetaData : text.getCssMetaData()) { ! List<Style> styles = NodeHelper.getMatchingStyles(cssMetaData, text); if (styles != null && !styles.isEmpty()) { assertTrue(expectedStyles.containsAll(styles)); assertTrue(styles.containsAll(expectedStyles)); nExpected -= 1; }
< prev index next >