Class 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodeInsertionHandler

        protected NodeInsertionHandler()
    • Method Detail

      • handleEvent

        public void handleEvent​(org.w3c.dom.events.Event evt)
        Specified by:
        handleEvent in interface org.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 node
        newParentNode - The new tree node
        Returns:
        first child that differs