edu.umd.cs.jazz.event
Interface ZEventHandler

All Known Implementing Classes:
ZCompositeSelectionHandler, ZNavEventHandlerKeyBoard, ZoomEventHandler, ZoomToEventHandler, ZPanEventHandler, ZSelectionModifyHandler, ZSelectionResizeHandler, ZSwingEventHandler, ZSelectionEventHandler, ZLinkEventHandler, ZSelectionScaleHandler, ZSelectionMoveHandler, ZSelectionDeleteHandler

public interface ZEventHandler

ZEventHandler is an interface for defining behaviors in Jazz. It is really just a utility to make it easier to group sets of event handlers that work together to define a behavior. This defines event listeners for mouse events so that a sub-class can over-ride the ones it wants to define. Then, the entire set of handlers can be temporarily turned on or off with calls to setActive.

The event handler is associated with a specific node in the Jazz scenegraph. If it is attached to the root node, then it will respond to events on all nodes (if the events weren't handled by an event handler on a lower node). If it is attached to any other node, then it will respond only to events on nodes that are in the sub-tree rooted at the event handler node.

This functionality is specifically designed for mode-driven applications so that one mode might draw while another follows hyperlinks. One event handler can be defined for each mode, and then they just need to be activated and deactivated as needed.

Author:
Benjamin B. Bederson

Method Summary
 boolean isActive()
          Determines if this event handler is active.
 void setActive(boolean active)
          Specifies whether this event handler is active or not.
 

Method Detail

setActive

public void setActive(boolean active)
Specifies whether this event handler is active or not.
Parameters:
active - True to make this event handler active

isActive

public boolean isActive()
Determines if this event handler is active.
Returns:
True if active


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