prefuse.controls
Class SubtreeDragControl

java.lang.Object
  extended by prefuse.controls.ControlAdapter
      extended by prefuse.controls.SubtreeDragControl
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, Control

public class SubtreeDragControl
extends ControlAdapter

Control that changes the location of a whole subtree when dragged on screen. This is similar to the DragControl class, except that it moves the entire visible subtree rooted at an item, rather than just the item itself.

Author:
jeffrey heer

Field Summary
 
Fields inherited from interface prefuse.controls.Control
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON
 
Constructor Summary
SubtreeDragControl()
          Creates a new subtree drag control that issues repaint requests as an item is dragged.
 
Method Summary
 void itemDragged(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when a mouse button is pressed on a VisualItem and then dragged.
 void itemEntered(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when the mouse enters a VisualItem.
 void itemExited(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when the mouse exits a VisualItem.
 void itemPressed(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on a VisualItem.
 void itemReleased(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on a VisualItem.
 
Methods inherited from class prefuse.controls.ControlAdapter
isEnabled, itemClicked, itemKeyPressed, itemKeyReleased, itemKeyTyped, itemMoved, itemWheelMoved, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubtreeDragControl

public SubtreeDragControl()
Creates a new subtree drag control that issues repaint requests as an item is dragged.

Method Detail

itemEntered

public void itemEntered(VisualItem item,
                        java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse enters a VisualItem.

Specified by:
itemEntered in interface Control
Overrides:
itemEntered in class ControlAdapter
See Also:
Control.itemEntered(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemExited

public void itemExited(VisualItem item,
                       java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse exits a VisualItem.

Specified by:
itemExited in interface Control
Overrides:
itemExited in class ControlAdapter
See Also:
Control.itemExited(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemPressed

public void itemPressed(VisualItem item,
                        java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when a mouse button has been pressed on a VisualItem.

Specified by:
itemPressed in interface Control
Overrides:
itemPressed in class ControlAdapter
See Also:
Control.itemPressed(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemReleased

public void itemReleased(VisualItem item,
                         java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when a mouse button has been released on a VisualItem.

Specified by:
itemReleased in interface Control
Overrides:
itemReleased in class ControlAdapter
See Also:
Control.itemReleased(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemDragged

public void itemDragged(VisualItem item,
                        java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when a mouse button is pressed on a VisualItem and then dragged.

Specified by:
itemDragged in interface Control
Overrides:
itemDragged in class ControlAdapter
See Also:
Control.itemDragged(prefuse.visual.VisualItem, java.awt.event.MouseEvent)


Copyright © 2007 Regents of the University of California