edu.swri.swiftvis
Interface PlotListener

All Superinterfaces:
GraphElement, java.io.Serializable
All Known Implementing Classes:
RegionSelectionFilter, SliceSelectionFilter

public interface PlotListener
extends GraphElement

This interface is to be implemented by all of the filters that are supposed to listen for user interaction with plots. This is used to produce fast analysis tools so that users can click on plots and change what data is being moved through the system. The original filters that will use this are a region selection (less powerful than a full selection filter, but works as a listener) and a slice through. Those came to my mind because they would allow me to build the same types of tools I have used in the past for rings. Others can be added if people find a need for them.

Author:
Mark Lewis

Method Summary
 java.awt.Shape getSelectionRegion()
          This method can be used by plot listeners to tell a certain plot style what region is being investigated.
 void keyPressed(java.awt.event.KeyEvent e)
          This is called when a key is pressed.
 void keyReleased(java.awt.event.KeyEvent e)
          This is called when a key is released.
 void keyTyped(java.awt.event.KeyEvent e)
          This is called when a key is typed.
 void mouseClicked(double v1, double v2, java.awt.event.MouseEvent e)
          This is called when a mouse button is clicked.
 void mouseDragged(double v1, double v2, java.awt.event.MouseEvent e)
          This is called when the mouse is dragged.
 void mouseMoved(double v1, double v2, java.awt.event.MouseEvent e)
          This is called when the mouse is moved.
 void mousePressed(double v1, double v2, java.awt.event.MouseEvent e)
          This is called when a mouse button is pressed.
 void mouseReleased(double v1, double v2, java.awt.event.MouseEvent e)
          This is called when a mouse button is released.
 
Methods inherited from interface edu.swri.swiftvis.GraphElement
clearData, copy, getBounds, getDescription, getPaint, getPropertiesPanel, relink, setBounds
 

Method Detail

mousePressed

void mousePressed(double v1,
                  double v2,
                  java.awt.event.MouseEvent e)
This is called when a mouse button is pressed.

Parameters:
v1 - The primary coordinate in the plot where it was pressed.
v2 - The secondary coordinate in the plot where it was pressed.
e - The event that triggered the call.

mouseReleased

void mouseReleased(double v1,
                   double v2,
                   java.awt.event.MouseEvent e)
This is called when a mouse button is released.

Parameters:
v1 - The primary coordinate in the plot where it was pressed.
v2 - The secondary coordinate in the plot where it was pressed.
e - The event that triggered the call.

mouseClicked

void mouseClicked(double v1,
                  double v2,
                  java.awt.event.MouseEvent e)
This is called when a mouse button is clicked.

Parameters:
v1 - The primary coordinate in the plot where it was pressed.
v2 - The secondary coordinate in the plot where it was pressed.
e - The event that triggered the call.

mouseMoved

void mouseMoved(double v1,
                double v2,
                java.awt.event.MouseEvent e)
This is called when the mouse is moved.

Parameters:
v1 - The primary coordinate in the plot where it was pressed.
v2 - The secondary coordinate in the plot where it was pressed.
e - The event that triggered the call.

mouseDragged

void mouseDragged(double v1,
                  double v2,
                  java.awt.event.MouseEvent e)
This is called when the mouse is dragged.

Parameters:
v1 - The primary coordinate in the plot where it was pressed.
v2 - The secondary coordinate in the plot where it was pressed.
e - The event that triggered the call.

keyPressed

void keyPressed(java.awt.event.KeyEvent e)
This is called when a key is pressed.

Parameters:
e - The event that triggered the call.

keyReleased

void keyReleased(java.awt.event.KeyEvent e)
This is called when a key is released.

Parameters:
e - The event that triggered the call.

keyTyped

void keyTyped(java.awt.event.KeyEvent e)
This is called when a key is typed.

Parameters:
e - The event that triggered the call.

getSelectionRegion

java.awt.Shape getSelectionRegion()
This method can be used by plot listeners to tell a certain plot style what region is being investigated. This can provide the user with input as to what is being seen in other plots.

Returns:
The shape for the selected region.