Search in sources :

Example 1 with CompositeGraphicsNode

use of org.apache.batik.gvt.CompositeGraphicsNode in project yamcs-studio by yamcs.

the class SVGHandler method getCanvasGraphicsNode.

protected CanvasGraphicsNode getCanvasGraphicsNode(GraphicsNode gn) {
    if (!(gn instanceof CompositeGraphicsNode)) {
        return null;
    }
    CompositeGraphicsNode cgn = (CompositeGraphicsNode) gn;
    List<?> children = cgn.getChildren();
    if (children.size() == 0) {
        return null;
    }
    gn = (GraphicsNode) children.get(0);
    if (!(gn instanceof CanvasGraphicsNode)) {
        return null;
    }
    return (CanvasGraphicsNode) gn;
}
Also used : CanvasGraphicsNode(org.apache.batik.gvt.CanvasGraphicsNode) CompositeGraphicsNode(org.apache.batik.gvt.CompositeGraphicsNode)

Aggregations

CanvasGraphicsNode (org.apache.batik.gvt.CanvasGraphicsNode)1 CompositeGraphicsNode (org.apache.batik.gvt.CompositeGraphicsNode)1