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 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(Event evt)
This method is called whenever an event occurs of the event type for which theEventListener
interface was registered.
-
-
-
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 theEventListener
interface was registered.- Specified by:
handleEvent
in interfaceEventListener
- Parameters:
evt
- TheEvent
contains 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
-
-