org.apache.batik.apps.svgbrowser
Class DOMViewer.Panel.NodeInsertionHandler

java.lang.Object
  extended by 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 Summary
protected DOMViewer.Panel.NodeInsertionHandler()
           
 
Method Summary
protected  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)
          This method is called whenever an event occurs of the event type for which the EventListener interface was registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMViewer.Panel.NodeInsertionHandler

protected DOMViewer.Panel.NodeInsertionHandler()
Method Detail

handleEvent

public void handleEvent(Event evt)
Description copied from interface: EventListener
This method is called whenever an event occurs of the event type for which the EventListener interface was registered.

Specified by:
handleEvent in interface EventListener
Parameters:
evt - The Event contains contextual information about the event.

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


Copyright © 2008 Apache Software Foundation. All Rights Reserved.