org.apache.batik.swing
Class JSVGCanvas.ToolTipModifier

java.lang.Object
  |
  +--org.apache.batik.swing.JSVGCanvas.ToolTipModifier
All Implemented Interfaces:
EventListener
Enclosing class:
JSVGCanvas

protected class JSVGCanvas.ToolTipModifier
extends java.lang.Object
implements EventListener

Sets a specific tooltip on the JSVGCanvas when a given event occurs. This listener is used in the handleElement method to set, remove or modify the JSVGCanvas tooltip on mouseover and on mouseout.
Because we are on a single JComponent we trigger an artificial MouseEvent when the toolTip is set to a non-null value, so as to make sure it will show after the ToolTipManager's default delay.


Field Summary
protected  java.lang.String toolTip
          Value of the toolTip
 
Constructor Summary
JSVGCanvas.ToolTipModifier(java.lang.String toolTip)
           
 
Method Summary
 void handleEvent(Event evt)
          This method is called whenever an event occurs of the 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
 

Field Detail

toolTip

protected java.lang.String toolTip
Value of the toolTip
Constructor Detail

JSVGCanvas.ToolTipModifier

public JSVGCanvas.ToolTipModifier(java.lang.String toolTip)
Parameters:
toolTip - value to which the JSVGCanvas should be set when the event occurs.
Method Detail

handleEvent

public void handleEvent(Event evt)
Description copied from interface: EventListener
This method is called whenever an event occurs of the type for which the EventListener interface was registered.
Specified by:
handleEvent in interface EventListener
Following copied from interface: org.w3c.dom.events.EventListener
Parameters:
evt - The Event contains contextual information about the event. It also contains the stopPropagation and preventDefault methods which are used in determining the event's flow and default action.


Copyright © 2002 Apache Software Foundation. All Rights Reserved.