public void considerDoubleClick ( int button , int x , int y ) { if ( doubleClickTimeout == 0 ) { clickX = x ; clickY = y ; clickButton = button ; doubleClickTimeout = System . currentTimeMillis ( ) + doubleClickDelay ; fireMouseClicked ( button , x , y , 1 ) ; } else { if ( clickButton == button ) { if ( ( System . currentTimeMillis ( ) < doubleClickTimeout ) ) { fireMouseClicked ( button , x , y , 2 ) ; doubleClickTimeout = 0 ; } } } }
Notification that the mouse has been pressed and hence we should consider what we re doing with double clicking