Package org.apache.batik.apps.svgbrowser
Class DOMViewer.Panel.NodeInsertionHandler
java.lang.Object
org.apache.batik.apps.svgbrowser.DOMViewer.Panel.NodeInsertionHandler
- All Implemented Interfaces:
EventListener
- Enclosing class:
- DOMViewer.Panel
Handles "DOMNodeInserted" event.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
findIndexToInsert
(DefaultMutableTreeNode parentNode, DefaultMutableTreeNode newParentNode) Compares the children of the two tree nodes and returns the index of the first difference.void
handleEvent
(Event evt)
-
Constructor Details
-
NodeInsertionHandler
protected NodeInsertionHandler()
-
-
Method Details
-
handleEvent
- Specified by:
handleEvent
in interfaceEventListener
-
findIndexToInsert
protected int findIndexToInsert(DefaultMutableTreeNode parentNode, 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
-