(cssPropertiesChangedListener); cssEngine.dispose(); doc.setCSSEngine(null);
/** * Removes event listeners from the DOM and CSS engine. */ protected void removeDOMListeners() { SVGOMDocument doc = (SVGOMDocument)document; doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified", domAttrModifiedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeInserted", domNodeInsertedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved", domNodeRemovedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMCharacterDataModified", domCharacterDataModifiedEventListener, true); doc.removeAnimatedAttributeListener(animatedAttributeListener); CSSEngine cssEngine = doc.getCSSEngine(); if (cssEngine != null) { cssEngine.removeCSSEngineListener (cssPropertiesChangedListener); cssEngine.dispose(); doc.setCSSEngine(null); } }
/** * Removes event listeners from the DOM and CSS engine. */ protected void removeDOMListeners() { SVGOMDocument doc = (SVGOMDocument)document; doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified", domAttrModifiedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeInserted", domNodeInsertedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved", domNodeRemovedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMCharacterDataModified", domCharacterDataModifiedEventListener, true); doc.removeAnimatedAttributeListener(animatedAttributeListener); CSSEngine cssEngine = doc.getCSSEngine(); if (cssEngine != null) { cssEngine.removeCSSEngineListener (cssPropertiesChangedListener); cssEngine.dispose(); doc.setCSSEngine(null); } }
/** * Removes event listeners from the DOM and CSS engine. */ protected void removeDOMListeners() { SVGOMDocument doc = (SVGOMDocument)document; doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMAttrModified", domAttrModifiedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeInserted", domNodeInsertedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMNodeRemoved", domNodeRemovedEventListener, true); doc.removeEventListenerNS (XMLConstants.XML_EVENTS_NAMESPACE_URI, "DOMCharacterDataModified", domCharacterDataModifiedEventListener, true); doc.removeAnimatedAttributeListener(animatedAttributeListener); CSSEngine cssEngine = doc.getCSSEngine(); if (cssEngine != null) { cssEngine.removeCSSEngineListener (cssPropertiesChangedListener); cssEngine.dispose(); doc.setCSSEngine(null); } }
(cssPropertiesChangedListener); cssEngine.dispose(); doc.setCSSEngine(null);
(cssPropertiesChangedListener); cssEngine.dispose(); doc.setCSSEngine(null);
/** * Initializes the given document. */ protected void initializeDocument(Document document) { SVGOMDocument doc = (SVGOMDocument)document; CSSEngine eng = doc.getCSSEngine(); if (eng == null) { SVGDOMImplementation impl; impl = (SVGDOMImplementation)doc.getImplementation(); eng = impl.createCSSEngine(doc, this); eng.setCSSEngineUserAgent(new CSSEngineUserAgentWrapper(userAgent)); doc.setCSSEngine(eng); eng.setMedia(userAgent.getMedia()); String uri = userAgent.getUserStyleSheetURI(); if (uri != null) { try { ParsedURL url = new ParsedURL(uri); eng.setUserAgentStyleSheet (eng.parseStyleSheet(url, "all")); } catch (Exception e) { userAgent.displayError(e); } } eng.setAlternateStyleSheet(userAgent.getAlternateStyleSheet()); } }
/** * Initializes the given document. */ protected void initializeDocument(Document document) { SVGOMDocument doc = (SVGOMDocument)document; CSSEngine eng = doc.getCSSEngine(); if (eng == null) { SVGDOMImplementation impl; impl = (SVGDOMImplementation)doc.getImplementation(); eng = impl.createCSSEngine(doc, this); eng.setCSSEngineUserAgent(new CSSEngineUserAgentWrapper(userAgent)); doc.setCSSEngine(eng); eng.setMedia(userAgent.getMedia()); String uri = userAgent.getUserStyleSheetURI(); if (uri != null) { try { ParsedURL url = new ParsedURL(uri); eng.setUserAgentStyleSheet (eng.parseStyleSheet(url, "all")); } catch (Exception e) { userAgent.displayError(e); } } eng.setAlternateStyleSheet(userAgent.getAlternateStyleSheet()); } }
/** * Initializes the given document. */ protected void initializeDocument(Document document) { SVGOMDocument doc = (SVGOMDocument)document; CSSEngine eng = doc.getCSSEngine(); if (eng == null) { SVGDOMImplementation impl; impl = (SVGDOMImplementation)doc.getImplementation(); eng = impl.createCSSEngine(doc, this); eng.setCSSEngineUserAgent(new CSSEngineUserAgentWrapper(userAgent)); doc.setCSSEngine(eng); eng.setMedia(userAgent.getMedia()); String uri = userAgent.getUserStyleSheetURI(); if (uri != null) { try { ParsedURL url = new ParsedURL(uri); eng.setUserAgentStyleSheet (eng.parseStyleSheet(url, "all")); } catch (Exception e) { userAgent.displayError(e); } } eng.setAlternateStyleSheet(userAgent.getAlternateStyleSheet()); } }