org.das2.event
Class MouseModule

java.lang.Object
  extended by org.das2.event.MouseModule
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, Displayable, Editable
Direct Known Subclasses:
AngleSlicerMouseModule, AnnotatorMouseModule, BoxRangeSelectorMouseModule, BoxSelectorMouseModule, ColorBarRepaletteMouseModule, CrossHairMouseModule, DasColorBar.ColorBarRepaletteMouseModule, DataPointSelectorMouseModule, DisplayDataMouseModule, DumpToFileMouseModule, HorizontalDragRangeSelectorMouseModule, HorizontalRangeSelectorMouseModule, HorizontalRangeTorsionMouseModule, HorizontalSlicerMouseModule, MoveComponentMouseModule, TimeRangeSelectorMouseModule, VerticalRangeSelectorMouseModule, VerticalSlicerMouseModule, ZoomPanMouseModule

public class MouseModule
extends java.lang.Object
implements Editable, Displayable, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener

A MouseModule is a pluggable unit that promotes simple mouse events into human events or actions that are useful for science analysis. Each component has a mouseInputAdapter that manages a set of mouseModules, one is active at any given time. The DasMouseInputAdapter will delegate mouse events, key events, and mouse wheel events to the active


Field Summary
protected  DragRenderer dragRenderer
           
protected  DasCanvasComponent parent
           
 
Constructor Summary
protected MouseModule()
           
  MouseModule(DasCanvasComponent parent)
           
  MouseModule(DasCanvasComponent parent, DragRenderer dragRenderer, java.lang.String label)
           
 
Method Summary
 java.awt.Cursor getCursor()
          return a cursor that indicates the selected module.
 DragRenderer getDragRenderer()
           
 java.util.Vector getHotSpots()
          Deprecated. No longer supported
 java.lang.String getLabel()
          returns a string that identifies the module
 javax.swing.Icon getListIcon()
          An icon can be provided that will be shown in a list along with the textual description of the element.
 java.lang.String getListLabel()
          return a String that will help the user identify this item when choosing from a list.
 void hotSpotPressed(java.awt.Shape s)
           
 void keyPressed(java.awt.event.KeyEvent keyEvent)
           
 void keyReleased(java.awt.event.KeyEvent keyEvent)
           
 void keyTyped(java.awt.event.KeyEvent keyEvent)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePointSelected(MousePointSelectionEvent e)
          Action to take when a point (click or drag) is selected.
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseRangeSelected(MouseDragEvent e)
          Action to take when a mouse range (click, drag, release) has been selected.
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
           
protected  void setDragRenderer(DragRenderer dragRenderer)
          this should only be called from the mouse module constructor.
 void setLabel(java.lang.String label)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dragRenderer

protected DragRenderer dragRenderer

parent

protected DasCanvasComponent parent
Constructor Detail

MouseModule

protected MouseModule()

MouseModule

public MouseModule(DasCanvasComponent parent)

MouseModule

public MouseModule(DasCanvasComponent parent,
                   DragRenderer dragRenderer,
                   java.lang.String label)
Method Detail

getLabel

public java.lang.String getLabel()
returns a string that identifies the module


getHotSpots

public java.util.Vector getHotSpots()
Deprecated. No longer supported

No longer used


getCursor

public java.awt.Cursor getCursor()
return a cursor that indicates the selected module.


hotSpotPressed

public void hotSpotPressed(java.awt.Shape s)

getDragRenderer

public DragRenderer getDragRenderer()

mouseRangeSelected

public void mouseRangeSelected(MouseDragEvent e)
Action to take when a mouse range (click, drag, release) has been selected.


mousePointSelected

public void mousePointSelected(MousePointSelectionEvent e)
Action to take when a point (click or drag) is selected.


setLabel

public void setLabel(java.lang.String label)

getListIcon

public javax.swing.Icon getListIcon()
Description copied from interface: Displayable
An icon can be provided that will be shown in a list along with the textual description of the element. This method should return null if there is no icon available.

Specified by:
getListIcon in interface Displayable

getListLabel

public java.lang.String getListLabel()
Description copied from interface: Displayable
return a String that will help the user identify this item when choosing from a list.

Specified by:
getListLabel in interface Displayable

keyPressed

public void keyPressed(java.awt.event.KeyEvent keyEvent)
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent keyEvent)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent keyEvent)
Specified by:
keyTyped in interface java.awt.event.KeyListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

setDragRenderer

protected void setDragRenderer(DragRenderer dragRenderer)
this should only be called from the mouse module constructor. (Until it is verified that it is okay to call it elsewhere.)