org.das2.event
Class CrossHairMouseModule

java.lang.Object
  extended by org.das2.event.MouseModule
      extended by org.das2.event.CrossHairMouseModule
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, Displayable, Editable

public class CrossHairMouseModule
extends MouseModule


Field Summary
protected  DataPointSelectionEvent de
           
 
Fields inherited from class org.das2.event.MouseModule
dragRenderer, parent
 
Constructor Summary
CrossHairMouseModule(DasPlot parent, DasAxis xaxis, DasAxis yaxis)
           
CrossHairMouseModule(DasPlot parent, DataSetConsumer dataSetConsumer, DasAxis xAxis, DasAxis yAxis)
           
 
Method Summary
 void addDataPointSelectionListener(DataPointSelectionListener listener)
          Registers DataPointSelectionListener to receive events.
static CrossHairMouseModule create(DasPlot parent)
           
protected  void fireDataPointSelectionListenerDataPointSelected(DataPointSelectionEvent event)
          Notifies all registered listeners about the event.
protected  DataPointSelectionEvent getDataPointSelectionEvent(MousePointSelectionEvent e)
           
 void mousePointSelected(MousePointSelectionEvent e)
          Action to take when a point (click or drag) is selected.
 void removeDataPointSelectionListener(DataPointSelectionListener listener)
          Removes DataPointSelectionListener from the list of listeners.
 
Methods inherited from class org.das2.event.MouseModule
getCursor, getDragRenderer, getHotSpots, getLabel, getListIcon, getListLabel, hotSpotPressed, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseRangeSelected, mouseReleased, mouseWheelMoved, setDragRenderer, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

de

protected DataPointSelectionEvent de
Constructor Detail

CrossHairMouseModule

public CrossHairMouseModule(DasPlot parent,
                            DasAxis xaxis,
                            DasAxis yaxis)

CrossHairMouseModule

public CrossHairMouseModule(DasPlot parent,
                            DataSetConsumer dataSetConsumer,
                            DasAxis xAxis,
                            DasAxis yAxis)
Method Detail

create

public static CrossHairMouseModule create(DasPlot parent)

getDataPointSelectionEvent

protected DataPointSelectionEvent getDataPointSelectionEvent(MousePointSelectionEvent e)

mousePointSelected

public void mousePointSelected(MousePointSelectionEvent e)
Description copied from class: MouseModule
Action to take when a point (click or drag) is selected.

Overrides:
mousePointSelected in class MouseModule

addDataPointSelectionListener

public void addDataPointSelectionListener(DataPointSelectionListener listener)
Registers DataPointSelectionListener to receive events.

Parameters:
listener - The listener to register.

removeDataPointSelectionListener

public void removeDataPointSelectionListener(DataPointSelectionListener listener)
Removes DataPointSelectionListener from the list of listeners.

Parameters:
listener - The listener to remove.

fireDataPointSelectionListenerDataPointSelected

protected void fireDataPointSelectionListenerDataPointSelected(DataPointSelectionEvent event)
Notifies all registered listeners about the event.

Parameters:
event - The event to be fired