org.simbrain.gauge.graphics
Class MouseEventHandler

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

public class MouseEventHandler
extends PDragSequenceEventHandler

MouseEventHandler handles mouse events, which in HiSee are relatively limited. In addition to panning and zooming the dataset (which is handled separately by Piccolo, and not this class), users may click on datapoints to print out their coordinates.


Constructor Summary
MouseEventHandler(GaugePanel gauge)
          Responds to mouse events.
 
Method Summary
 GaugePanel getGp()
           
 void mousePressed(PInputEvent e)
          Respond to mouse pressing events.
 void setGp(GaugePanel gp)
           
 
Methods inherited from class edu.umd.cs.piccolo.event.PDragSequenceEventHandler
drag, dragActivityFinalStep, dragActivityFirstStep, dragActivityStep, endDrag, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mouseReleased, paramString, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDrag, startDragActivity, stopDragActivity
 
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, processEvent, setEventFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MouseEventHandler

public MouseEventHandler(GaugePanel gauge)
Responds to mouse events.

Parameters:
gauge - Gauge to respond to.
Method Detail

mousePressed

public void mousePressed(PInputEvent e)
Respond to mouse pressing events.

Overrides:
mousePressed in class PDragSequenceEventHandler
Parameters:
e - Mouse input event

setGp

public void setGp(GaugePanel gp)
Parameters:
gp - Set new gauge panel.

getGp

public GaugePanel getGp()
Returns:
Current gauge panel.