/** * Load a single element into the diagram * * @param element * The element ot be loaded * @param t * The transform to apply to the loaded element from the parent * @throws ParsingException * Indicates a failure to parse the element */ private void loadElement(Element element, Transform t) throws ParsingException { for (int i = 0; i < processors.size(); i++) { ElementProcessor processor = (ElementProcessor) processors.get(i); if (processor.handles(element)) { processor.process(this, element, diagram, t); } } }
/** * Add an <code>ElementProcessor</code> which will be passed * each element read as the Inkscape SVG document is processed. * * @param proc The processor to be added */ public static void addElementProcessor(ElementProcessor proc) { processors.add(proc); }