public void mousePressed(MouseEvent e) { synchronized (futureData) { MouseEventData mouseData = futureData; // In case we already have a dragEnded and we get another // dragEnded, we need to start collection data for that. if (futureData.isMouseDragEnded(null)) { mouseData = potentialNewDragData; } // This might be the beginning of a drag so we store it dragStartData = new MouseEventData(); Actor actor = locator.getTopMostActorAt(e); int x = locator.getTranslatedX(e); int y = locator.getTranslatedY(e); int button = getButton(e); dragStartData.mousePressed(x, y, button, actor); // We only really want to register this event as a press if there is no higher priorities if (!PriorityManager.isHigherPriority(e, mouseData)) return; registerEventRecieved(); mouseData.mousePressed(x, y, button, actor); isDragging = false; } }