protected void initCSSPropertyIndexes(Element e) { CSSEngine eng = CSSUtilities.getCSSEngine(e); marginTopIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_TOP_PROPERTY); marginRightIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_RIGHT_PROPERTY); marginBottomIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_BOTTOM_PROPERTY); marginLeftIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_LEFT_PROPERTY); indentIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_INDENT_PROPERTY); textAlignIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_TEXT_ALIGN_PROPERTY); lineHeightIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_LINE_HEIGHT_PROPERTY); }
protected void initCSSPropertyIndexes(Element e) { CSSEngine eng = CSSUtilities.getCSSEngine(e); marginTopIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_TOP_PROPERTY); marginRightIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_RIGHT_PROPERTY); marginBottomIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_BOTTOM_PROPERTY); marginLeftIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_LEFT_PROPERTY); indentIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_INDENT_PROPERTY); textAlignIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_TEXT_ALIGN_PROPERTY); lineHeightIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_LINE_HEIGHT_PROPERTY); }
protected void initCSSPropertyIndexes(Element e) { CSSEngine eng = CSSUtilities.getCSSEngine(e); marginTopIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_TOP_PROPERTY); marginRightIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_RIGHT_PROPERTY); marginBottomIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_BOTTOM_PROPERTY); marginLeftIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_MARGIN_LEFT_PROPERTY); indentIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_INDENT_PROPERTY); textAlignIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_TEXT_ALIGN_PROPERTY); lineHeightIndex = eng.getPropertyIndex(SVG12CSSConstants.CSS_LINE_HEIGHT_PROPERTY); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getPropertyCSSValue(String)}. */ public CSSValue getPropertyCSSValue(String propertyName) { CSSValue result = (CSSValue)values.get(propertyName); if (result == null) { int idx = cssEngine.getPropertyIndex(propertyName); if (idx != -1) { result = createCSSValue(idx); values.put(propertyName, result); } } return result; }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getPropertyCSSValue(String)}. */ public CSSValue getPropertyCSSValue(String propertyName) { CSSValue result = (CSSValue)values.get(propertyName); if (result == null) { int idx = cssEngine.getPropertyIndex(propertyName); if (idx != -1) { result = createCSSValue(idx); values.put(propertyName, result); } } return result; }
/** * Returns whether the given CSS property is available on this element. */ public boolean hasProperty(String pn) { AbstractStylableDocument doc = (AbstractStylableDocument) ownerDocument; CSSEngine eng = doc.getCSSEngine(); return eng.getPropertyIndex(pn) != -1 || eng.getShorthandIndex(pn) != -1; }
/** * Returns whether the given CSS property is available on this element. */ public boolean hasProperty(String pn) { AbstractStylableDocument doc = (AbstractStylableDocument) ownerDocument; CSSEngine eng = doc.getCSSEngine(); return eng.getPropertyIndex(pn) != -1 || eng.getShorthandIndex(pn) != -1; }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getPropertyValue(String)}. */ public String getPropertyValue(String propertyName) { int idx = cssEngine.getPropertyIndex(propertyName); if (idx == -1) { return ""; } Value v = cssEngine.getComputedStyle(element, pseudoElement, idx); return v.getCssText(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getPropertyValue(String)}. */ public String getPropertyValue(String propertyName) { int idx = cssEngine.getPropertyIndex(propertyName); if (idx == -1) { return ""; } Value v = cssEngine.getComputedStyle(element, pseudoElement, idx); return v.getCssText(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getPropertyValue(String)}. */ public String getPropertyValue(String propertyName) { int idx = cssEngine.getPropertyIndex(propertyName); if (idx == -1) { return ""; } Value v = cssEngine.getComputedStyle(element, pseudoElement, idx); return v.getCssText(); }
/** * Returns whether the given CSS property is available on this element. */ public boolean hasProperty(String pn) { AbstractStylableDocument doc = (AbstractStylableDocument) ownerDocument; CSSEngine eng = doc.getCSSEngine(); return eng.getPropertyIndex(pn) != -1 || eng.getShorthandIndex(pn) != -1; }
/** * Returns the current value associated with this object. */ public Value getValue(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getValue(i); } } return null; }
/** * Returns the current value associated with this object. */ public Value getValue(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getValue(i); } } return null; }
/** * Tells whether the given property is important. */ public boolean isImportant(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getPriority(i); } } return false; }
/** * Returns the current value associated with this object. */ public Value getValue(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getValue(i); } } return null; }
/** * Tells whether the given property is important. */ public boolean isImportant(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getPriority(i); } } return false; }
/** * Tells whether the given property is important. */ public boolean isImportant(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getPriority(i); } } return false; }
/** * Returns the type of the given property. */ public int getPropertyType(String pn) { AbstractStylableDocument doc = (AbstractStylableDocument) ownerDocument; CSSEngine eng = doc.getCSSEngine(); int idx = eng.getPropertyIndex(pn); if (idx != -1) { ValueManager[] vms = eng.getValueManagers(); return vms[idx].getPropertyType(); } return SVGTypes.TYPE_UNKNOWN; }
/** * Returns the type of the given property. */ public int getPropertyType(String pn) { AbstractStylableDocument doc = (AbstractStylableDocument) ownerDocument; CSSEngine eng = doc.getCSSEngine(); int idx = eng.getPropertyIndex(pn); if (idx != -1) { ValueManager[] vms = eng.getValueManagers(); return vms[idx].getPropertyType(); } return SVGTypes.TYPE_UNKNOWN; }
/** * Returns the type of the given property. */ public int getPropertyType(String pn) { AbstractStylableDocument doc = (AbstractStylableDocument) ownerDocument; CSSEngine eng = doc.getCSSEngine(); int idx = eng.getPropertyIndex(pn); if (idx != -1) { ValueManager[] vms = eng.getValueManagers(); return vms[idx].getPropertyType(); } return SVGTypes.TYPE_UNKNOWN; }