org.simbrain.network.nodes
Class ToolTipTextUpdater

java.lang.Object
  extended by edu.umd.cs.piccolo.event.PBasicInputEventHandler
      extended by org.simbrain.network.nodes.ToolTipTextUpdater
All Implemented Interfaces:
PInputEventListener, EventListener

abstract class ToolTipTextUpdater
extends PBasicInputEventHandler

Input event handler for a network node that updates tool tip text for its NetworkPanel as the mouse enters and exits that node.

Usage: final PNode node = ...; node.addInputEventListener(new ToolTipTextUpdater() { protected String getToolTipText() { return node.toString(); } });


Constructor Summary
ToolTipTextUpdater()
           
 
Method Summary
protected abstract  String getToolTipText()
          Return a string to use as tool tip text.
 void mouseEntered(PInputEvent event)
           
 void mouseExited(PInputEvent event)
           
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToolTipTextUpdater

ToolTipTextUpdater()
Method Detail

getToolTipText

protected abstract String getToolTipText()
Return a string to use as tool tip text.

Returns:
a string to use as tool tip text

mouseEntered

public final void mouseEntered(PInputEvent event)
Overrides:
mouseEntered in class PBasicInputEventHandler
See Also:
PBasicInputEventHandler

mouseExited

public final void mouseExited(PInputEvent event)
Overrides:
mouseExited in class PBasicInputEventHandler
See Also:
PBasicInputEventHandler