Search in sources :

Example 1 with StyleSheetCSSHandler

use of org.csstudio.utility.batik.util.StyleSheetCSSHandler in project yamcs-studio by yamcs.

the class SVGHandler method buildElementsToUpdateList.

private void buildElementsToUpdateList(BridgeContext ctx, Document doc) {
    if (doc == null) {
        return;
    }
    elementsToUpdate.clear();
    SVGCSSEngine cssEngine = (SVGCSSEngine) ctx.getCSSEngineForElement(doc.getDocumentElement());
    if (cssEngine == null) {
        return;
    }
    List<?> styleSheetsList = cssEngine.getStyleSheetNodes();
    for (Object node : styleSheetsList) {
        if (node instanceof CSSStyleSheetNode) {
            CSSStyleSheetNode cssNode = (CSSStyleSheetNode) node;
            StyleSheet styleSheet = cssNode.getCSSStyleSheet();
            elementsToUpdate.add(new StyleSheetCSSHandler(cssEngine, styleSheet));
        }
    }
    rBuidElementsList(cssEngine, doc.getDocumentElement());
}
Also used : StyleSheet(org.apache.batik.css.engine.StyleSheet) CSSStyleSheetNode(org.apache.batik.css.engine.CSSStyleSheetNode) SVGCSSEngine(org.apache.batik.css.engine.SVGCSSEngine) StyleSheetCSSHandler(org.csstudio.utility.batik.util.StyleSheetCSSHandler)

Aggregations

CSSStyleSheetNode (org.apache.batik.css.engine.CSSStyleSheetNode)1 SVGCSSEngine (org.apache.batik.css.engine.SVGCSSEngine)1 StyleSheet (org.apache.batik.css.engine.StyleSheet)1 StyleSheetCSSHandler (org.csstudio.utility.batik.util.StyleSheetCSSHandler)1