/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getLength()}. */ public int getLength() { return cssEngine.getNumberOfProperties(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getLength()}. */ public int getLength() { return cssEngine.getNumberOfProperties(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getLength()}. */ public int getLength() { return cssEngine.getNumberOfProperties(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#item(int)}. */ public String item(int index) { if (index < 0 || index >= cssEngine.getNumberOfProperties()) { return ""; } return cssEngine.getPropertyName(index); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#item(int)}. */ public String item(int index) { if (index < 0 || index >= cssEngine.getNumberOfProperties()) { return ""; } return cssEngine.getPropertyName(index); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#item(int)}. */ public String item(int index) { if (index < 0 || index >= cssEngine.getNumberOfProperties()) { return ""; } return cssEngine.getPropertyName(index); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getCssText()}. */ public String getCssText() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < cssEngine.getNumberOfProperties(); i++) { sb.append(cssEngine.getPropertyName(i)); sb.append(": "); sb.append(cssEngine.getComputedStyle(element, pseudoElement, i).getCssText()); sb.append(";\n"); } return sb.toString(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getCssText()}. */ public String getCssText() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < cssEngine.getNumberOfProperties(); i++) { sb.append(cssEngine.getPropertyName(i)); sb.append(": "); sb.append(cssEngine.getComputedStyle(element, pseudoElement, i).getCssText()); sb.append(";\n"); } return sb.toString(); }
/** * <b>DOM</b>: Implements {@link * org.w3c.dom.css.CSSStyleDeclaration#getCssText()}. */ public String getCssText() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < cssEngine.getNumberOfProperties(); i++) { sb.append(cssEngine.getPropertyName(i)); sb.append(": "); sb.append(cssEngine.getComputedStyle(element, pseudoElement, i).getCssText()); sb.append(";\n"); } return sb.toString(); }
/** * Creates a new SVGAnimationEngine. */ public SVGAnimationEngine(Document doc, BridgeContext ctx) { super(doc); this.ctx = ctx; SVGOMDocument d = (SVGOMDocument) doc; cssEngine = d.getCSSEngine(); dummyStyleMap = new StyleMap(cssEngine.getNumberOfProperties()); isSVG12 = d.isSVG12(); }
/** * Creates a new SVGAnimationEngine. */ public SVGAnimationEngine(Document doc, BridgeContext ctx) { super(doc); this.ctx = ctx; SVGOMDocument d = (SVGOMDocument) doc; cssEngine = d.getCSSEngine(); dummyStyleMap = new StyleMap(cssEngine.getNumberOfProperties()); isSVG12 = d.isSVG12(); }
/** * Creates a new SVGAnimationEngine. */ public SVGAnimationEngine(Document doc, BridgeContext ctx) { super(doc); this.ctx = ctx; SVGOMDocument d = (SVGOMDocument) doc; cssEngine = d.getCSSEngine(); dummyStyleMap = new StyleMap(cssEngine.getNumberOfProperties()); isSVG12 = d.isSVG12(); }
return; // Nothing to invalidate. boolean [] diffs = new boolean[getNumberOfProperties()]; if (updated != null) { System.arraycopy( updated, 0, diffs, 0, updated.length );
return; // Nothing to invalidate. boolean [] diffs = new boolean[getNumberOfProperties()]; if (updated != null) { System.arraycopy( updated, 0, diffs, 0, updated.length );
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
/** * The text of the override style declaration for this element has been * modified. */ public void overrideStyleTextChanged(CSSStylableElement elt, String text) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int ds = declaration.size(); boolean[] updated = new boolean[getNumberOfProperties()]; for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } declaration = parseStyleDeclaration(elt, text); p.setStyleDeclaration(declaration); ds = declaration.size(); for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } invalidateProperties(elt, null, updated, true); }
/** * The text of the override style declaration for this element has been * modified. */ public void overrideStyleTextChanged(CSSStylableElement elt, String text) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int ds = declaration.size(); boolean[] updated = new boolean[getNumberOfProperties()]; for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } declaration = parseStyleDeclaration(elt, text); p.setStyleDeclaration(declaration); ds = declaration.size(); for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } invalidateProperties(elt, null, updated, true); }
/** * The text of the override style declaration for this element has been * modified. */ public void overrideStyleTextChanged(CSSStylableElement elt, String text) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int ds = declaration.size(); boolean[] updated = new boolean[getNumberOfProperties()]; for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } declaration = parseStyleDeclaration(elt, text); p.setStyleDeclaration(declaration); ds = declaration.size(); for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } invalidateProperties(elt, null, updated, true); }