Package org.apache.batik.apps.svgbrowser
Class DOMViewer.Panel.NodeInsertionHandler
- java.lang.Object
-
- org.apache.batik.apps.svgbrowser.DOMViewer.Panel.NodeInsertionHandler
-
- All Implemented Interfaces:
org.w3c.dom.events.EventListener
- Enclosing class:
- DOMViewer.Panel
protected class DOMViewer.Panel.NodeInsertionHandler extends java.lang.Object implements org.w3c.dom.events.EventListener
Handles "DOMNodeInserted" event.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NodeInsertionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
findIndexToInsert(javax.swing.tree.DefaultMutableTreeNode parentNode, javax.swing.tree.DefaultMutableTreeNode newParentNode)
Compares the children of the two tree nodes and returns the index of the first difference.void
handleEvent(org.w3c.dom.events.Event evt)
-
-
-
Method Detail
-
handleEvent
public void handleEvent(org.w3c.dom.events.Event evt)
- Specified by:
handleEvent
in interfaceorg.w3c.dom.events.EventListener
-
findIndexToInsert
protected int findIndexToInsert(javax.swing.tree.DefaultMutableTreeNode parentNode, javax.swing.tree.DefaultMutableTreeNode newParentNode)
Compares the children of the two tree nodes and returns the index of the first difference.- Parameters:
parentNode
- The old tree nodenewParentNode
- The new tree node- Returns:
- first child that differs
-
-