Corresponding to the layer event class are two new listener classes, LayerListener and LayerMotionListener. The former handles mouse press, drag, and release events, and the latter mouse enter, motion, and leave events. This separation avoid needless inefficiency in interactive canvases. Events can be received from Figure objects, and from the special-purpose EventLayer, which dispatches any events it received to its listeners.
An additional class, EventDispatcher is used to dispatch events to attached listeners. This class is used by the top-level package to group figures into common event-handling classes.