/** * Called when an Attr node has been removed. */ public void attrRemoved(Attr node, String oldv) { if (!mutate) { declaration = new org.apache.batik.css.engine.StyleDeclaration(); } }
/** * Creates a new OverrideStyleDeclaration. */ protected OverrideStyleDeclaration(CSSEngine eng) { super(eng); declaration = new org.apache.batik.css.engine.StyleDeclaration(); }
/** * Creates a new OverrideStyleDeclaration. */ protected OverrideStyleDeclaration(CSSEngine eng) { super(eng); declaration = new org.apache.batik.css.engine.StyleDeclaration(); }
/** * Called when an Attr node has been removed. */ public void attrRemoved(Attr node, String oldv) { if (!mutate) { declaration = new org.apache.batik.css.engine.StyleDeclaration(); } }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#startFontFace()}. */ public void startFontFace() throws CSSException { styleDeclaration = new StyleDeclaration(); }
/** * Called when an Attr node has been removed. */ public void attrRemoved(Attr node, String oldv) { if (!mutate) { declaration = new org.apache.batik.css.engine.StyleDeclaration(); } }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#startFontFace()}. */ public void startFontFace() throws CSSException { styleDeclaration = new StyleDeclaration(); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#startFontFace()}. */ public void startFontFace() throws CSSException { styleDeclaration = new StyleDeclaration(); }
/** * Creates a new OverrideStyleDeclaration. */ protected OverrideStyleDeclaration(CSSEngine eng) { super(eng); declaration = new org.apache.batik.css.engine.StyleDeclaration(); }
private StyleDeclaration parseStyleDeclarationForElement(Element element, String value) { if (!(element instanceof CSSStylableElement)) { return new StyleDeclaration(); } Document document = element.getOwnerDocument(); XhtmlCssEngine engine = getCssEngine(document); if (engine == null) { return new StyleDeclaration(); } CSSStylableElement elt = (CSSStylableElement)element; return engine.parseStyleDeclaration(elt, value); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#startSelector(SelectorList)}. */ public void startSelector(SelectorList selectors) throws CSSException { styleRule = new StyleRule(); styleRule.setSelectorList(selectors); styleDeclaration = new StyleDeclaration(); styleRule.setStyleDeclaration(styleDeclaration); styleSheet.append(styleRule); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#startSelector(SelectorList)}. */ public void startSelector(SelectorList selectors) throws CSSException { styleRule = new StyleRule(); styleRule.setSelectorList(selectors); styleDeclaration = new StyleDeclaration(); styleRule.setStyleDeclaration(styleDeclaration); styleSheet.append(styleRule); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#startSelector(SelectorList)}. */ public void startSelector(SelectorList selectors) throws CSSException { styleRule = new StyleRule(); styleRule.setSelectorList(selectors); styleDeclaration = new StyleDeclaration(); styleRule.setStyleDeclaration(styleDeclaration); styleSheet.append(styleRule); }
/** * Parses and creates a style declaration. * @param value The style declaration text. */ public StyleDeclaration parseStyleDeclaration(CSSStylableElement elt, String value) { styleDeclarationBuilder.styleDeclaration = new StyleDeclaration(); try { element = elt; parser.setSelectorFactory(CSSSelectorFactory.INSTANCE); parser.setConditionFactory(cssConditionFactory); parser.setDocumentHandler(styleDeclarationBuilder); parser.parseStyleDeclaration(value); } catch (Exception e) { String m = e.getMessage(); if (m == null) m = ""; String u = ((documentURI == null)?"<unknown>": documentURI.toString()); String s = Messages.formatMessage ("syntax.error.at", new Object[] { u, m }); DOMException de = new DOMException(DOMException.SYNTAX_ERR, s); if (userAgent == null) throw de; userAgent.displayError(de); } finally { element = null; cssBaseURI = null; } return styleDeclarationBuilder.styleDeclaration; }
/** * Parses and creates a style declaration. * @param value The style declaration text. */ public StyleDeclaration parseStyleDeclaration(CSSStylableElement elt, String value) { styleDeclarationBuilder.styleDeclaration = new StyleDeclaration(); try { element = elt; parser.setSelectorFactory(CSSSelectorFactory.INSTANCE); parser.setConditionFactory(cssConditionFactory); parser.setDocumentHandler(styleDeclarationBuilder); parser.parseStyleDeclaration(value); } catch (Exception e) { String m = e.getMessage(); if (m == null) m = ""; String u = ((documentURI == null)?"<unknown>": documentURI.toString()); String s = Messages.formatMessage ("syntax.error.at", new Object[] { u, m }); DOMException de = new DOMException(DOMException.SYNTAX_ERR, s); if (userAgent == null) throw de; userAgent.displayError(de); } finally { element = null; cssBaseURI = null; } return styleDeclarationBuilder.styleDeclaration; }
/** * Parses and creates a style declaration. * @param value The style declaration text. */ public StyleDeclaration parseStyleDeclaration(CSSStylableElement elt, String value) { styleDeclarationBuilder.styleDeclaration = new StyleDeclaration(); try { element = elt; parser.setSelectorFactory(CSSSelectorFactory.INSTANCE); parser.setConditionFactory(cssConditionFactory); parser.setDocumentHandler(styleDeclarationBuilder); parser.parseStyleDeclaration(value); } catch (Exception e) { String m = e.getMessage(); if (m == null) m = ""; String u = ((documentURI == null)?"<unknown>": documentURI.toString()); String s = Messages.formatMessage ("syntax.error.at", new Object[] { u, m }); DOMException de = new DOMException(DOMException.SYNTAX_ERR, s); if (userAgent == null) throw de; userAgent.displayError(de); } finally { element = null; cssBaseURI = null; } return styleDeclarationBuilder.styleDeclaration; }