ps.println("value: " + styleDeclaration.getPropertyCSSValue(property).getCssText()); ps.println("priority: " + styleDeclaration.getPropertyPriority(property));
/** * Return the margin top as specified in the stylesheet for this control, or * the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginTop(int defaultValue) { if (style == null) return defaultValue; return getPxValue(style.getPropertyCSSValue("margin-top"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin right as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginRight(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-right"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin top as specified in the stylesheet for this control, or * the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginTop(int defaultValue) { if (style == null) return defaultValue; return getPxValue(style.getPropertyCSSValue("margin-top"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin bottom as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginBottom(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-bottom"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin left as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginLeft(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-left"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin left as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginLeft(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-left"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin right as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginRight(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-right"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin bottom as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginBottom(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-bottom"), defaultValue); //$NON-NLS-1$ }
public String getFillColor(String cssClass) { //class selector String id = "." + cssClass; CSSStyleRuleImpl rule = styleRuleMap.get(id); if (rule != null) { CSSValueImpl cssValue = (CSSValueImpl) rule.getStyle().getPropertyCSSValue("fill"); return cssValue.getCssText(cssFormat).toUpperCase(); } return null; }
CSSStyleDeclaration o = parser.parseStyleDeclaration(new InputSource(new StringReader(cssSample))); assertEquals("margin-top: 0cm; margin-bottom: 0cm; background: rgb(230, 230, 230)", o.toString()); assertEquals("0cm", o.getPropertyCSSValue("margin-bottom").toString()); assertEquals("0cm", o.getPropertyCSSValue("margin-bottom").getCssText()); assertEquals(null, o.getPropertyCSSValue("foo")); assertEquals("margin-top: 0 cm; margin-bottom: 0cm; background: rgb(230, 230, 230)", o.toString()); assertEquals("0cm", o.getPropertyCSSValue("margin-bottom").toString()); assertEquals("0cm", o.getPropertyCSSValue("margin-bottom").getCssText()); assertEquals(CSSValue.CSS_VALUE_LIST, o.getPropertyCSSValue("margin-top").getCssValueType()); assertEquals("0 cm", o.getPropertyCSSValue("margin-top").toString()); assertEquals("0 cm", o.getPropertyCSSValue("margin-top").getCssText()); assertEquals(CSSValue.CSS_VALUE_LIST, o.getPropertyCSSValue("margin-top").getCssValueType());
if (selectedStyle != null) { CSSValue value = selectedStyle .getPropertyCSSValue("show-close"); if (value != null) { setShowClose(selection, Boolean.parseBoolean(value.getCssText())); .getPropertyCSSValue("show-close"); boolean unselectedShowClose = value == null ? false : Boolean .parseBoolean(value.getCssText());
if (selectedStyle != null) { CSSValue value = selectedStyle .getPropertyCSSValue("show-close"); if (value != null) { setShowClose(selection, Boolean.parseBoolean(value.getCssText())); .getPropertyCSSValue("show-close"); boolean unselectedShowClose = value == null ? false : Boolean .parseBoolean(value.getCssText());
org.w3c.dom.css.CSSValue cssValue = styleDeclaration_.getPropertyCSSValue(name); if (cssValue == null) { final CSSValueImpl newValue = new CSSValueImpl(null, false);
org.w3c.dom.css.CSSValue cssValue = styleDeclaration_.getPropertyCSSValue(name); if (cssValue == null) { final CSSValueImpl newValue = new CSSValueImpl();
org.w3c.dom.css.CSSValue cssValue = styleDeclaration_.getPropertyCSSValue(name); if (cssValue == null) { final CSSValueImpl newValue = new CSSValueImpl();
org.w3c.dom.css.CSSValue cssValue = styleDeclaration_.getPropertyCSSValue(name); if (cssValue == null) { final CSSValueImpl newValue = new CSSValueImpl();
.getPropertyCSSValue(fontAttributes[j]); if (value != null) { try {
.getPropertyCSSValue(propertyName); if (value == null) { if (meta != null) { value = decl == null ? null : decl.getPropertyCSSValue(propertyName);
.getPropertyCSSValue(fontAttribute); if (value != null) { try {