/** * Returns the value of the given cell. */ public Object getValueAt(int row, int col) { String prop = (String)propertyNames.get(row); if (col == 0) { return prop; } else { return style.getPropertyValue(prop); } } }
/** * Returns the value of the given cell. */ public Object getValueAt(int row, int col) { String prop = (String)propertyNames.get(row); if (col == 0) { return prop; } else { return style.getPropertyValue(prop); } } }
/** * Returns whether or not this style declaration has an inline display style. This is implemented to only return <code>true</code> if the display is * specifically set to <code>CSS_DISPLAY_INLINE</code> or if there is no display property. * @param cssStyle The CSS DOM syle declaration, which is expected to implement <code>CSS2Properties</code>, although this parameter may be <code>null</code>. * @return <code>true</code> if this style declaration has an inline display style, has no display style, or the style declaration is <code>null</code>. * @see CSS2Properties#getDisplay() * @deprecated */ public static boolean isDisplayInline(final CSSStyleDeclaration cssStyle) { if(cssStyle != null) { //if a valid style is passed /*TODO fix when our XMLCSSStyleDeclaration implements CSS2Properties Debug.assert(cssStyle instanceof CSS2Properties, "DOM implementation does not support CSS2Properties interface for CSSStyleDeclaration"); //TODO do we want to take action if the style does not implement CSS2Properties? final CSS2Properties cssProperties=(CSS2Properties)cssStyle; //get the CSS2Properties interface, which is expected to be implemented by the DOM CSSStyleDeclaration */ final String displayString = cssStyle.getPropertyValue(CSS_PROP_DISPLAY); //get the display property return displayString.length() == 0 || displayString.equals(CSS_DISPLAY_INLINE); //return true if there is no display string or it is equal to "inline" } return true; //if there is no style, we assume inline }
return styledecl.getPropertyValue(cssProperty);
String propertyName = styleDeclaration.item(j); String value = styleDeclaration.getPropertyValue(propertyName).trim(); String priority = styleDeclaration.getPropertyPriority(propertyName); if (ELUtils.isValueReference(value)) {
private String getStyleAttributeImpl(final String string) { if (styleDeclaration_ != null) { return styleDeclaration_.getPropertyValue(string); } final StyleElement element = getStyleElement(string); if (element != null && element.getValue() != null) { final String value = element.getValue(); if (!value.contains("url") && getBrowserVersion().hasFeature(JS_STYLE_VALUES_LOWERCASE)) { return value.toLowerCase(Locale.ROOT); } return value; } return ""; }
/** * Returns the value of the named style attribute, or an empty string if it is not found. * * @param name the name of the style attribute whose value is to be retrieved * @param camelCase whether or not the name is expected to be in camel case * @return the named style attribute value, or an empty string if it is not found */ protected String getStyleAttribute(String name, final boolean camelCase) { if (styleDeclaration_ != null) { if (camelCase) { name = uncamelize(name); } return styleDeclaration_.getPropertyValue(name); } final StyleElement element = getStyleMap(camelCase).get(name); if (element != null && element.getValue() != null) { return element.getValue(); } return ""; }
/** * Returns the value of the named style attribute, or an empty string if it is not found. * * @param name the name of the style attribute whose value is to be retrieved * @param camelCase whether or not the name is expected to be in camel case * @return the named style attribute value, or an empty string if it is not found */ protected String getStyleAttribute(String name, final boolean camelCase) { if (styleDeclaration_ != null) { if (camelCase) { name = uncamelize(name); } return styleDeclaration_.getPropertyValue(name); } final StyleElement element = getStyleMap(camelCase).get(name); if (element != null && element.getValue() != null) { return element.getValue(); } return ""; }
/** * Returns the value of the named style attribute, or an empty string if it is not found. * * @param name the name of the style attribute whose value is to be retrieved * @param camelCase whether or not the name is expected to be in camel case * @return the named style attribute value, or an empty string if it is not found */ protected String getStyleAttribute(String name, final boolean camelCase) { if (styleDeclaration_ != null) { if (camelCase) { name = uncamelize(name); } return styleDeclaration_.getPropertyValue(name); } final StyleElement element = getStyleMap(camelCase).get(name); if (element != null && element.getValue() != null) { return element.getValue(); } return ""; }
String propertyName = styleDeclaration.item(i); String propertyValue = styleDeclaration .getPropertyValue(propertyName); property(writer, propertyName, propertyValue);
/** * Makes a local, "computed", modification to this CSS style. * * @param declaration the style declaration * @param selector the selector determining that the style applies to this element */ public void applyStyleFromSelector(final org.w3c.dom.css.CSSStyleDeclaration declaration, final Selector selector) { final BrowserVersion browserVersion = getBrowserVersion(); final SelectorSpecificity specificity = selector.getSelectorSpecificity(); for (int i = 0; i < declaration.getLength(); i++) { final String name = declaration.item(i); if (!browserVersion.hasFeature(CSS_COMPUTED_NO_Z_INDEX) || !"z-index".equals(name)) { final String value = declaration.getPropertyValue(name); final String priority = declaration.getPropertyPriority(name); applyLocalStyleAttribute(name, value, priority, specificity); } } }
String oldValue = over.getPropertyValue(pn); if (oldValue != null) { over.removeProperty(pn);
String oldValue = over.getPropertyValue(pn); if (oldValue != null) { over.removeProperty(pn);
String oldValue = over.getPropertyValue(pn); if (oldValue != null) { over.removeProperty(pn);
private boolean equalsProperties(final CSSStyleDeclaration csd) { if ((csd == null) || (getLength() != csd.getLength())) { return false; } for (int i = 0; i < getLength(); i++) { final String propertyName = item(i); // CSSValue propertyCSSValue1 = getPropertyCSSValue(propertyName); // CSSValue propertyCSSValue2 = csd.getPropertyCSSValue(propertyName); final String propertyValue1 = getPropertyValue(propertyName); final String propertyValue2 = csd.getPropertyValue(propertyName); if (!LangUtils.equals(propertyValue1, propertyValue2)) { return false; } final String propertyPriority1 = getPropertyPriority(propertyName); final String propertyPriority2 = csd.getPropertyPriority(propertyName); if (!LangUtils.equals(propertyPriority1, propertyPriority2)) { return false; } } return true; }
private boolean equalsProperties(final CSSStyleDeclaration csd) { if ((csd == null) || (getLength() != csd.getLength())) { return false; } for (int i = 0; i < getLength(); i++) { final String propertyName = item(i); // CSSValue propertyCSSValue1 = getPropertyCSSValue(propertyName); // CSSValue propertyCSSValue2 = csd.getPropertyCSSValue(propertyName); final String propertyValue1 = getPropertyValue(propertyName); final String propertyValue2 = csd.getPropertyValue(propertyName); if (!LangUtils.equals(propertyValue1, propertyValue2)) { return false; } final String propertyPriority1 = getPropertyPriority(propertyName); final String propertyPriority2 = csd.getPropertyPriority(propertyName); if (!LangUtils.equals(propertyPriority1, propertyPriority2)) { return false; } } return true; }
for (int j = 0; j < declaration.getLength(); j++) { final String property = declaration.item(j).trim(); final String value = declaration.getPropertyValue(property).trim(); switch (property) { case OPACITY:
for (int k = 0; k < dec.getLength(); k++) { final String name = dec.item(k); final String value = dec.getPropertyValue(name); style.setLocalStyleAttribute(name, value);
for (int k = 0; k < dec.getLength(); k++) { final String name = dec.item(k); final String value = dec.getPropertyValue(name); style.setLocalStyleAttribute(name, value);
for (int k = 0; k < dec.getLength(); k++) { final String name = dec.item(k); final String value = dec.getPropertyValue(name); style.setLocalStyleAttribute(name, value);