prefuse.controls
Class ControlAdapter

java.lang.Object
  extended by prefuse.controls.ControlAdapter
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, Control
Direct Known Subclasses:
AbstractZoomControl, AnchorUpdateControl, DragControl, FocusControl, HoverActionControl, NeighborHighlightControl, PanControl, RotationControl, SubtreeDragControl, ToolTipControl, ZoomingPanControl, ZoomToFitControl

public class ControlAdapter
extends java.lang.Object
implements Control

Adapter class for processing prefuse interface events. Subclasses can override the desired methods to perform user interface event handling.

Author:
jeffrey heer

Field Summary
 
Fields inherited from interface prefuse.controls.Control
LEFT_MOUSE_BUTTON, MIDDLE_MOUSE_BUTTON, RIGHT_MOUSE_BUTTON
 
Constructor Summary
ControlAdapter()
           
 
Method Summary
 boolean isEnabled()
          Indicates if this Control is currently enabled.
 void itemClicked(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when the mouse button has been clicked (pressed and released) on a VisualItem.
 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 itemKeyPressed(VisualItem item, java.awt.event.KeyEvent e)
          Invoked when a key has been pressed, while the mouse is over a VisualItem.
 void itemKeyReleased(VisualItem item, java.awt.event.KeyEvent e)
          Invoked when a key has been released, while the mouse is over a VisualItem.
 void itemKeyTyped(VisualItem item, java.awt.event.KeyEvent e)
          Invoked when a key has been typed, while the mouse is over a VisualItem.
 void itemMoved(VisualItem item, java.awt.event.MouseEvent e)
          Invoked when the mouse cursor has been moved onto a VisualItem but no buttons have been pushed.
 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.
 void itemWheelMoved(VisualItem item, java.awt.event.MouseWheelEvent e)
          Invoked when the mouse wheel is rotated while the mouse is over a VisualItem.
 void keyPressed(java.awt.event.KeyEvent e)
          Invoked when a key has been pressed, while the mouse is NOT over a VisualItem.
 void keyReleased(java.awt.event.KeyEvent e)
          Invoked when a key has been released, while the mouse is NOT over a VisualItem.
 void keyTyped(java.awt.event.KeyEvent e)
          Invoked when a key has been typed, while the mouse is NOT over a VisualItem.
 void mouseClicked(java.awt.event.MouseEvent e)
          Invoked when the mouse button has been clicked (pressed and released) on the Display, but NOT on a VisualItem.
 void mouseDragged(java.awt.event.MouseEvent e)
          Invoked when a mouse button is pressed on the Display (but NOT a VisualItem) and then dragged.
 void mouseEntered(java.awt.event.MouseEvent e)
          Invoked when the mouse enters the Display.
 void mouseExited(java.awt.event.MouseEvent e)
          Invoked when the mouse exits the Display.
 void mouseMoved(java.awt.event.MouseEvent e)
          Invoked when the mouse cursor has been moved on the Display (but NOT a VisualItem) and no buttons have been pushed.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on the Display but NOT on a VisualItem.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on the Display but NOT on a VisualItem.
 void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
          Invoked when the mouse wheel is rotated while the mouse is over the Display (but NOT a VisualItem).
 void setEnabled(boolean enabled)
          Sets the enabled status of this control.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlAdapter

public ControlAdapter()
Method Detail

isEnabled

public boolean isEnabled()
Description copied from interface: Control
Indicates if this Control is currently enabled.

Specified by:
isEnabled in interface Control
Returns:
true if the control is enabled, false if disabled
See Also:
Control.isEnabled()

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: Control
Sets the enabled status of this control.

Specified by:
setEnabled in interface Control
Parameters:
enabled - true to enable the control, false to disable it
See Also:
Control.setEnabled(boolean)

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
See Also:
Control.itemDragged(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemMoved

public void itemMoved(VisualItem item,
                      java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse cursor has been moved onto a VisualItem but no buttons have been pushed.

Specified by:
itemMoved in interface Control
See Also:
Control.itemMoved(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemWheelMoved

public void itemWheelMoved(VisualItem item,
                           java.awt.event.MouseWheelEvent e)
Description copied from interface: Control
Invoked when the mouse wheel is rotated while the mouse is over a VisualItem.

Specified by:
itemWheelMoved in interface Control
See Also:
Control.itemWheelMoved(prefuse.visual.VisualItem, java.awt.event.MouseWheelEvent)

itemClicked

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

Specified by:
itemClicked in interface Control
See Also:
Control.itemClicked(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
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
See Also:
Control.itemReleased(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

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
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
See Also:
Control.itemExited(prefuse.visual.VisualItem, java.awt.event.MouseEvent)

itemKeyPressed

public void itemKeyPressed(VisualItem item,
                           java.awt.event.KeyEvent e)
Description copied from interface: Control
Invoked when a key has been pressed, while the mouse is over a VisualItem.

Specified by:
itemKeyPressed in interface Control
See Also:
Control.itemKeyPressed(prefuse.visual.VisualItem, java.awt.event.KeyEvent)

itemKeyReleased

public void itemKeyReleased(VisualItem item,
                            java.awt.event.KeyEvent e)
Description copied from interface: Control
Invoked when a key has been released, while the mouse is over a VisualItem.

Specified by:
itemKeyReleased in interface Control
See Also:
Control.itemKeyReleased(prefuse.visual.VisualItem, java.awt.event.KeyEvent)

itemKeyTyped

public void itemKeyTyped(VisualItem item,
                         java.awt.event.KeyEvent e)
Description copied from interface: Control
Invoked when a key has been typed, while the mouse is over a VisualItem.

Specified by:
itemKeyTyped in interface Control
See Also:
Control.itemKeyTyped(prefuse.visual.VisualItem, java.awt.event.KeyEvent)

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse enters the Display.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Specified by:
mouseEntered in interface Control
See Also:
Control.mouseEntered(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse exits the Display.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Specified by:
mouseExited in interface Control
See Also:
Control.mouseExited(java.awt.event.MouseEvent)

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when a mouse button has been pressed on the Display but NOT on a VisualItem.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Specified by:
mousePressed in interface Control
See Also:
Control.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when a mouse button has been released on the Display but NOT on a VisualItem.

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Specified by:
mouseReleased in interface Control
See Also:
Control.mouseReleased(java.awt.event.MouseEvent)

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse button has been clicked (pressed and released) on the Display, but NOT on a VisualItem.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Specified by:
mouseClicked in interface Control
See Also:
Control.mouseClicked(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when a mouse button is pressed on the Display (but NOT a VisualItem) and then dragged.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Specified by:
mouseDragged in interface Control
See Also:
Control.mouseDragged(java.awt.event.MouseEvent)

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Description copied from interface: Control
Invoked when the mouse cursor has been moved on the Display (but NOT a VisualItem) and no buttons have been pushed.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Specified by:
mouseMoved in interface Control
See Also:
Control.mouseMoved(java.awt.event.MouseEvent)

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Description copied from interface: Control
Invoked when the mouse wheel is rotated while the mouse is over the Display (but NOT a VisualItem).

Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener
Specified by:
mouseWheelMoved in interface Control
See Also:
Control.mouseWheelMoved(java.awt.event.MouseWheelEvent)

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Description copied from interface: Control
Invoked when a key has been pressed, while the mouse is NOT over a VisualItem.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Specified by:
keyPressed in interface Control
See Also:
Control.keyPressed(java.awt.event.KeyEvent)

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Description copied from interface: Control
Invoked when a key has been released, while the mouse is NOT over a VisualItem.

Specified by:
keyReleased in interface java.awt.event.KeyListener
Specified by:
keyReleased in interface Control
See Also:
Control.keyReleased(java.awt.event.KeyEvent)

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Description copied from interface: Control
Invoked when a key has been typed, while the mouse is NOT over a VisualItem.

Specified by:
keyTyped in interface java.awt.event.KeyListener
Specified by:
keyTyped in interface Control
See Also:
Control.keyTyped(java.awt.event.KeyEvent)


Copyright © 2007 Regents of the University of California