/** * Disposes all resources related to the specified node and its subtree. */ protected static void disposeTree(Node node) { disposeTree(node, true); }
/** * Disposes all resources related to the specified node and its subtree. */ protected static void disposeTree(Node node) { disposeTree(node, true); }
/** * Disposes all resources related to the specified node and its subtree. */ protected static void disposeTree(Node node) { disposeTree(node, true); }
/** * Disposes all resources related to the specified node and its subtree, * and optionally removes the nodes' {@link SVGContext}. */ protected static void disposeTree(Node node, boolean removeContext) { if (node instanceof SVGOMElement) { SVGOMElement elt = (SVGOMElement)node; SVGContext ctx = elt.getSVGContext(); if (ctx instanceof BridgeUpdateHandler) { BridgeUpdateHandler h = (BridgeUpdateHandler) ctx; if (removeContext) { elt.setSVGContext(null); } h.dispose(); } } for (Node n = node.getFirstChild(); n != null; n = n.getNextSibling()) { disposeTree(n, removeContext); } }
/** * Disposes all resources related to the specified node and its subtree, * and optionally removes the nodes' {@link SVGContext}. */ protected static void disposeTree(Node node, boolean removeContext) { if (node instanceof SVGOMElement) { SVGOMElement elt = (SVGOMElement)node; SVGContext ctx = elt.getSVGContext(); if (ctx instanceof BridgeUpdateHandler) { BridgeUpdateHandler h = (BridgeUpdateHandler) ctx; if (removeContext) { elt.setSVGContext(null); } h.dispose(); } } for (Node n = node.getFirstChild(); n != null; n = n.getNextSibling()) { disposeTree(n, removeContext); } }
/** * Disposes all resources related to the specified node and its subtree, * and optionally removes the nodes' {@link SVGContext}. */ protected static void disposeTree(Node node, boolean removeContext) { if (node instanceof SVGOMElement) { SVGOMElement elt = (SVGOMElement)node; SVGContext ctx = elt.getSVGContext(); if (ctx instanceof BridgeUpdateHandler) { BridgeUpdateHandler h = (BridgeUpdateHandler) ctx; if (removeContext) { elt.setSVGContext(null); } h.dispose(); } } for (Node n = node.getFirstChild(); n != null; n = n.getNextSibling()) { disposeTree(n, removeContext); } }
/** * Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. */ public void handleDOMNodeRemovedEvent(MutationEvent evt) { Node parent = e.getParentNode(); if (parent instanceof SVGOMElement) { SVGContext bridge = ((SVGOMElement) parent).getSVGContext(); if (bridge instanceof SVGSwitchElementBridge) { ((SVGSwitchElementBridge) bridge).handleChildElementRemoved(e); return; } } CompositeGraphicsNode gn = node.getParent(); gn.remove(node); disposeTree(e); }
/** * Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. */ public void handleDOMNodeRemovedEvent(MutationEvent evt) { Node parent = e.getParentNode(); if (parent instanceof SVGOMElement) { SVGContext bridge = ((SVGOMElement) parent).getSVGContext(); if (bridge instanceof SVGSwitchElementBridge) { ((SVGSwitchElementBridge) bridge).handleChildElementRemoved(e); return; } } CompositeGraphicsNode gn = node.getParent(); gn.remove(node); disposeTree(e); }
/** * Invoked when an MutationEvent of type 'DOMNodeRemoved' is fired. */ public void handleDOMNodeRemovedEvent(MutationEvent evt) { Node parent = e.getParentNode(); if (parent instanceof SVGOMElement) { SVGContext bridge = ((SVGOMElement) parent).getSVGContext(); if (bridge instanceof SVGSwitchElementBridge) { ((SVGSwitchElementBridge) bridge).handleChildElementRemoved(e); return; } } CompositeGraphicsNode gn = node.getParent(); gn.remove(node); disposeTree(e); }
AbstractGraphicsNodeBridge.disposeTree(document);
AbstractGraphicsNodeBridge.disposeTree(document);
AbstractGraphicsNodeBridge.disposeTree(document);
disposeTree(e, false);