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
protected class DOMViewer.Panel.NodeInsertionHandler extends java.lang.Object implements EventListener
Handles "DOMNodeInserted" event.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNodeInsertionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intfindIndexToInsert(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.voidhandleEvent(Event evt)This method is called whenever an event occurs of the event type for which theEventListenerinterface was registered.
-
-
-
Method Detail
-
handleEvent
public void handleEvent(Event evt)
Description copied from interface:EventListenerThis method is called whenever an event occurs of the event type for which theEventListenerinterface was registered.- Specified by:
handleEventin interfaceEventListener- Parameters:
evt- TheEventcontains contextual information about the event.
-
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
-
-