use of org.w3c.dom.css.ElementCSSInlineStyle in project webtools.sourceediting by eclipse.
the class BUG124835SetStyleAttributeValueTest method setInlineStyle.
private void setInlineStyle(Element element, String name, String value) {
ICSSStyleDeclaration decl = null;
try {
decl = (ICSSStyleDeclaration) ((ElementCSSInlineStyle) element).getStyle();
} catch (ClassCastException ex) {
// do nothing
}
if (decl != null) {
String priority = decl.getPropertyPriority(name);
decl.setProperty(name, value, priority);
}
}
use of org.w3c.dom.css.ElementCSSInlineStyle in project webtools.sourceediting by eclipse.
the class BUG124835SetStyleAttributeValueTest method getInlineStyle.
private String getInlineStyle(Element element, String name) {
String value = null;
ICSSStyleDeclaration decl = null;
try {
decl = (ICSSStyleDeclaration) ((ElementCSSInlineStyle) element).getStyle();
} catch (ClassCastException ex) {
// do nothing
}
if (decl != null) {
value = decl.getPropertyValue(name);
}
return value;
}
Aggregations