edu.umd.cs.jazz.event
Class ZHandleEventHandler

java.lang.Object
  |
  +--edu.umd.cs.jazz.event.ZFilteredEventHandler
        |
        +--edu.umd.cs.jazz.event.ZDragSequenceEventHandler
              |
              +--edu.umd.cs.jazz.event.ZHandleEventHandler
All Implemented Interfaces:
ZEventHandler

public class ZHandleEventHandler
extends ZDragSequenceEventHandler

ZHandleEventHandler is normaly used by ZHandleGroups to turn mouse events into calls to ZHandles handleStartDrag, handleDragged, and handleEndDrag methods. It also makes sure handles are highlited and unhighlited when appropriate. Normaly you should not need to use this class directly unless you want to change the way handles are interacted with.

Author:
Jesse Grosjean

Inner classes inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
ZFilteredEventHandler.ZFilteredEventDispatcher
 
Fields inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
fFilteredEventDispatcher, fMouseFilter
 
Constructor Summary
ZHandleEventHandler(ZSceneGraphObject aEventSource)
          Constructs a new ZHandleEventHandler.
 
Method Summary
protected  void dragInScreenCoords(ZMouseEvent e, java.awt.geom.Dimension2D aScreenDelta)
          Drag the current handle..
protected  void endDrag(ZMouseEvent e)
          Stop dragging the current handle..
 void filteredMouseEntered(ZMouseEvent e)
          Highlite the handle if a handle was just entered.
 void filteredMouseExited(ZMouseEvent e)
          Unhighlite the handle if a handle was just exited.
 ZMouseFilter getMouseFilter()
          ZHandles are dragged with BUTTON1 by default.
protected  boolean shouldStartDragInteraction(ZMouseEvent e)
          Only start dragging the current handle if we are actualy over a ZHandle object.
protected  void startDrag(ZMouseEvent e)
          Start dragging the current handle..
 
Methods inherited from class edu.umd.cs.jazz.event.ZDragSequenceEventHandler
drag, filteredMouseDragged, filteredMousePressed, filteredMouseReleased, getCurrentScreenDelta, getCurrentScreenPoint, getDragStartScreenPoint, getMinDragStartDistance, getMousePressedScreenPoint, getPreviousScreenPoint, isDragging, setIsDragging, setMinDragStartDistance
 
Methods inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
filteredKeyPressed, filteredKeyReleased, filteredKeyTyped, filteredMouseClicked, filteredMouseMoved, getCurrentFilteredMouseEvent, getCurrentSelection, getFilteredEventDispatcher, getFilteredKeyEventSource, getFilteredMouseEventSource, getInteractionCamera, getTopCamera, isActive, setActive, setFilteredKeyEventSource, setFilteredMouseEventSource, setMouseFilter, wantsKeyEvents, wantsMouseEvents, wantsMouseMotionEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZHandleEventHandler

public ZHandleEventHandler(ZSceneGraphObject aEventSource)
Constructs a new ZHandleEventHandler.
Parameters:
aMouseEventSource - the source for ZMouseEvents and ZMouseMotionEvents. See the ZFilteredEventHandler class comment to customize this behavior.
Method Detail

getMouseFilter

public ZMouseFilter getMouseFilter()
ZHandles are dragged with BUTTON1 by default.
Overrides:
getMouseFilter in class ZFilteredEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZFilteredEventHandler
Returns:
the filter that is currently in effect.

filteredMouseEntered

public void filteredMouseEntered(ZMouseEvent e)
Highlite the handle if a handle was just entered.
Overrides:
filteredMouseEntered in class ZFilteredEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZFilteredEventHandler
Parameters:
e - the filtered mouse entered event.

filteredMouseExited

public void filteredMouseExited(ZMouseEvent e)
Unhighlite the handle if a handle was just exited.
Overrides:
filteredMouseExited in class ZFilteredEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZFilteredEventHandler
Parameters:
e - the filtered mouse exited event.

startDrag

protected void startDrag(ZMouseEvent e)
Start dragging the current handle..
Overrides:
startDrag in class ZDragSequenceEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZDragSequenceEventHandler
Parameters:
e - the event starting the drag sequence.

dragInScreenCoords

protected void dragInScreenCoords(ZMouseEvent e,
                                  java.awt.geom.Dimension2D aScreenDelta)
Drag the current handle..
Overrides:
dragInScreenCoords in class ZDragSequenceEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZDragSequenceEventHandler
Parameters:
e - the event causing the drag.
aScreenDelta - the change in mouse position between the current and last filtered mouse events.

endDrag

protected void endDrag(ZMouseEvent e)
Stop dragging the current handle..
Overrides:
endDrag in class ZDragSequenceEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZDragSequenceEventHandler
Parameters:
e - the event causing the end of the drag sequence.

shouldStartDragInteraction

protected boolean shouldStartDragInteraction(ZMouseEvent e)
Only start dragging the current handle if we are actualy over a ZHandle object.
Overrides:
shouldStartDragInteraction in class ZDragSequenceEventHandler
Following copied from class: edu.umd.cs.jazz.event.ZDragSequenceEventHandler
Parameters:
e - the event containing the current filtered mouse position.
Returns:
true if a drag sequence should be started.


Copyright © 2001 by University of Maryland, College Park, MD 20742, USA All rights reserved.