/** * <b>DOM</b>: Implements {@link * Document#createProcessingInstruction(String,String)}. * @return a SVGStyleSheetProcessingInstruction if target is * "xml-stylesheet" or a GenericProcessingInstruction otherwise. */ public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { if ("xml-stylesheet".equals(target)) { return new SVGStyleSheetProcessingInstruction (data, this, (StyleSheetFactory)getImplementation()); } return new GenericProcessingInstruction(target, data, this); }
/** * <b>DOM</b>: Implements {@link * Document#createProcessingInstruction(String,String)}. * @return a SVGStyleSheetProcessingInstruction if target is * "xml-stylesheet" or a GenericProcessingInstruction otherwise. */ public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { if ("xml-stylesheet".equals(target)) { return new SVGStyleSheetProcessingInstruction (data, this, (StyleSheetFactory)getImplementation()); } return new GenericProcessingInstruction(target, data, this); }
/** * <b>DOM</b>: Implements {@link * Document#createProcessingInstruction(String,String)}. * @return a SVGStyleSheetProcessingInstruction if target is * "xml-stylesheet" or a GenericProcessingInstruction otherwise. */ public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { if ("xml-stylesheet".equals(target)) { return new SVGStyleSheetProcessingInstruction (data, this, (StyleSheetFactory)getImplementation()); } return new GenericProcessingInstruction(target, data, this); }
/** * 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()); } }