public void mouseDragged(MouseEvent e) {
        if (dragCallback != null) {
            int mask = e.getModifiers();
            int index = 0;
            if ((mask & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) {
                index = MouseEvent.BUTTON1;
            } else if ((mask & InputEvent.BUTTON2_MASK) == InputEvent.BUTTON2_MASK) {
                index = MouseEvent.BUTTON2;
            } else if ((mask & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) {
                index = MouseEvent.BUTTON3;
            }
            lastDragEvents[index] = e;
            // ignore small frag amounts
            if (firstPressEvents[index] == null) {
                return;
            }
            int dx = Math.abs(e.getX() - firstPressEvents[index].getX());
            int dy = Math.abs(e.getY() - firstPressEvents[index].getY());
            if (dx > MIN_DRAG_THRESHOLD || dy > MIN_DRAG_THRESHOLD) {
                //Classify it as a drag
                dragCallback.doDragCallback(firstPressEvents[index], e, resultsModel);
            }
        }
    }