protected MouseMotionListener getMouseMotionListener(T adapter) {
    MouseListener listener = getMouseListener(adapter);
    return listener instanceof MouseMotionListener ? (MouseMotionListener)listener : null;
  }
protected MouseMotionListener getMouseMotionListener(T adapter)