Class DOMViewer.Panel.NodeInsertionHandler

java.lang.Object
org.apache.batik.apps.svgbrowser.DOMViewer.Panel.NodeInsertionHandler
All Implemented Interfaces:
EventListener
Enclosing class:
DOMViewer.Panel

protected class DOMViewer.Panel.NodeInsertionHandler extends Object implements EventListener
Handles "DOMNodeInserted" event.
  • Constructor Details

    • NodeInsertionHandler

      protected NodeInsertionHandler()
  • Method Details

    • handleEvent

      public void handleEvent(Event evt)
      Specified by:
      handleEvent in interface EventListener
    • 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 node
      newParentNode - The new tree node
      Returns:
      first child that differs