/**
  * Handles a scroll event by passing it on to the registered handlers.
  *
  * @param e the scroll event.
  */
 protected void handleScroll(ScrollEvent e) {
   if (this.liveHandler != null && this.liveHandler.isEnabled()) {
     this.liveHandler.handleScroll(this, e);
   }
   for (MouseHandlerFX handler : this.auxiliaryMouseHandlers) {
     if (handler.isEnabled()) {
       handler.handleScroll(this, e);
     }
   }
 }
  /**
   * Handles a mouse moved event by passing it on to the registered handlers.
   *
   * @param e the mouse event.
   */
  private void handleMouseMoved(MouseEvent e) {
    if (this.liveHandler != null && this.liveHandler.isEnabled()) {
      this.liveHandler.handleMouseMoved(this, e);
    }

    for (MouseHandlerFX handler : this.auxiliaryMouseHandlers) {
      if (handler.isEnabled()) {
        handler.handleMouseMoved(this, e);
      }
    }
  }
  /**
   * Handles a mouse pressed event by (1) selecting a live handler if one is not already selected,
   * (2) passing the event to the live handler if there is one, and (3) passing the event to all
   * enabled auxiliary handlers.
   *
   * @param e the mouse event.
   */
  private void handleMousePressed(MouseEvent e) {
    if (this.liveHandler == null) {
      for (MouseHandlerFX handler : this.availableMouseHandlers) {
        if (handler.isEnabled() && handler.hasMatchingModifiers(e)) {
          this.liveHandler = handler;
        }
      }
    }

    if (this.liveHandler != null) {
      this.liveHandler.handleMousePressed(this, e);
    }

    // pass on the event to the auxiliary handlers
    for (MouseHandlerFX handler : this.auxiliaryMouseHandlers) {
      if (handler.isEnabled()) {
        handler.handleMousePressed(this, e);
      }
    }
  }
  /**
   * Handles a mouse released event by passing it on to the registered handlers.
   *
   * @param e the mouse event.
   */
  private void handleMouseClicked(MouseEvent e) {
    if (this.liveHandler != null && this.liveHandler.isEnabled()) {
      this.liveHandler.handleMouseClicked(this, e);
    }

    // pass on the event to the auxiliary handlers
    for (MouseHandlerFX handler : this.auxiliaryMouseHandlers) {
      if (handler.isEnabled()) {
        handler.handleMouseClicked(this, e);
      }
    }
  }