ca.utoronto.cs.prefuseextensions.control
Class MouseWheelControl

java.lang.Object
  extended by prefuse.controls.ControlAdapter
      extended by ca.utoronto.cs.prefuseextensions.control.MouseWheelControl
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, prefuse.controls.Control

public class MouseWheelControl
extends prefuse.controls.ControlAdapter

Increases or decreases a specified field when the mouse wheel moves.

Version:
1.0
Author:
Christopher Collins

Field Summary
 
Fields inherited from interface prefuse.controls.Control
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON
 
Constructor Summary
MouseWheelControl(java.lang.String action, java.lang.String field)
          Create a new mouse wheel control to optionally manipulate a node parameter and optionally run an action after each manipulation.
MouseWheelControl(java.lang.String action, java.lang.String field, double min, double max, double increment)
           
 
Method Summary
 void itemWheelMoved(prefuse.visual.VisualItem item, java.awt.event.MouseWheelEvent e)
           
 
Methods inherited from class prefuse.controls.ControlAdapter
isEnabled, itemClicked, itemDragged, itemEntered, itemExited, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemPressed, itemReleased, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseWheelControl

public MouseWheelControl(java.lang.String action,
                         java.lang.String field)
Create a new mouse wheel control to optionally manipulate a node parameter and optionally run an action after each manipulation. Uses default max, min, and increment.

Parameters:
action - the action to run when the mouse wheel moves
field - the field to manipulate when the mouse wheel moves

MouseWheelControl

public MouseWheelControl(java.lang.String action,
                         java.lang.String field,
                         double min,
                         double max,
                         double increment)
Parameters:
action - the action to run when the mouse wheel moves
field - the field to manipulate when the mouse wheel moves
Method Detail

itemWheelMoved

public void itemWheelMoved(prefuse.visual.VisualItem item,
                           java.awt.event.MouseWheelEvent e)
Specified by:
itemWheelMoved in interface prefuse.controls.Control
Overrides:
itemWheelMoved in class prefuse.controls.ControlAdapter