org.simbrain.gauge.graphics
Class ToolTipTextUpdater

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

abstract class ToolTipTextUpdater
extends PBasicInputEventHandler

Input event handler for a gauge datapoint that updates tool tip text for its GaugePanel 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 getDownstairsText()
          Get the low dimensional coordinates of a point.
protected abstract  String getUpstairsText()
          Get the high dimensional coordinates of a point.
 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

getUpstairsText

protected abstract String getUpstairsText()
Get the high dimensional coordinates of a point.

Returns:
the high dimensional coordinates of a point.

getDownstairsText

protected abstract String getDownstairsText()
Get the low dimensional coordinates of a point.

Returns:
the low dimensional coordinates.

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