prefuse.controls
Interface Control

All Superinterfaces:
java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener
All Known Implementing Classes:
AbstractZoomControl, AnchorUpdateControl, ControlAdapter, DragControl, FocusControl, HoverActionControl, NeighborHighlightControl, PanControl, RotationControl, SubtreeDragControl, ToolTipControl, WheelZoomControl, ZoomControl, ZoomingPanControl, ZoomToFitControl

public interface Control
extends java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener

Listener interface for processing user interface events on a Display.

Author:
alan newberger, jeffrey heer

Field Summary
static int LEFT_MOUSE_BUTTON
          Represents the use of the left mouse button
static int MIDDLE_MOUSE_BUTTON
          Represents the use of the middle mouse button
static int RIGHT_MOUSE_BUTTON
          Represents the use of the right mouse button
 
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.
 

Field Detail

LEFT_MOUSE_BUTTON

static final int LEFT_MOUSE_BUTTON
Represents the use of the left mouse button

See Also:
Constant Field Values

MIDDLE_MOUSE_BUTTON

static final int MIDDLE_MOUSE_BUTTON
Represents the use of the middle mouse button

See Also:
Constant Field Values

RIGHT_MOUSE_BUTTON

static final int RIGHT_MOUSE_BUTTON
Represents the use of the right mouse button

See Also:
Constant Field Values
Method Detail

isEnabled

boolean isEnabled()
Indicates if this Control is currently enabled.

Returns:
true if the control is enabled, false if disabled

setEnabled

void setEnabled(boolean enabled)
Sets the enabled status of this control.

Parameters:
enabled - true to enable the control, false to disable it

itemDragged

void itemDragged(VisualItem item,
                 java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a VisualItem and then dragged.


itemMoved

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.


itemWheelMoved

void itemWheelMoved(VisualItem item,
                    java.awt.event.MouseWheelEvent e)
Invoked when the mouse wheel is rotated while the mouse is over a VisualItem.


itemClicked

void itemClicked(VisualItem item,
                 java.awt.event.MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a VisualItem.


itemPressed

void itemPressed(VisualItem item,
                 java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a VisualItem.


itemReleased

void itemReleased(VisualItem item,
                  java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a VisualItem.


itemEntered

void itemEntered(VisualItem item,
                 java.awt.event.MouseEvent e)
Invoked when the mouse enters a VisualItem.


itemExited

void itemExited(VisualItem item,
                java.awt.event.MouseEvent e)
Invoked when the mouse exits a VisualItem.


itemKeyPressed

void itemKeyPressed(VisualItem item,
                    java.awt.event.KeyEvent e)
Invoked when a key has been pressed, while the mouse is over a VisualItem.


itemKeyReleased

void itemKeyReleased(VisualItem item,
                     java.awt.event.KeyEvent e)
Invoked when a key has been released, while the mouse is over a VisualItem.


itemKeyTyped

void itemKeyTyped(VisualItem item,
                  java.awt.event.KeyEvent e)
Invoked when a key has been typed, while the mouse is over a VisualItem.


mouseEntered

void mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters the Display.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

void mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits the Display.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

void mousePressed(java.awt.event.MouseEvent e)
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

mouseReleased

void mouseReleased(java.awt.event.MouseEvent e)
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

mouseClicked

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.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseDragged

void mouseDragged(java.awt.event.MouseEvent e)
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

mouseMoved

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.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseWheelMoved

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).

Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

keyPressed

void keyPressed(java.awt.event.KeyEvent e)
Invoked when a key has been pressed, while the mouse is NOT over a VisualItem.

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

void keyReleased(java.awt.event.KeyEvent e)
Invoked when a key has been released, while the mouse is NOT over a VisualItem.

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

void keyTyped(java.awt.event.KeyEvent e)
Invoked when a key has been typed, while the mouse is NOT over a VisualItem.

Specified by:
keyTyped in interface java.awt.event.KeyListener


Copyright © 2007 Regents of the University of California