public void mouseDragged( MouseEvent e ){ if( station.isResizingEnabled() && !station.isDisabled() ) { if( pressed && current != null ) { divider = current.getDividerAt( e.getX() + deltaX, e.getY() + deltaY ); divider = current.validateDivider( divider ); repaint( bounds.x, bounds.y, bounds.width, bounds.height ); bounds = current.getDividerBounds( divider, bounds ); repaint( bounds.x, bounds.y, bounds.width, bounds.height ); if( station.isContinousDisplay() && current != null ) { setDivider( current, divider ); station.updateBounds(); } } } }
public void mouseDragged( MouseEvent e ){ if( station.isResizingEnabled() && !station.isDisabled() ) { if( pressed && current != null ) { divider = current.getDividerAt( e.getX() + deltaX, e.getY() + deltaY ); divider = current.validateDivider( divider ); repaint( bounds.x, bounds.y, bounds.width, bounds.height ); bounds = current.getDividerBounds( divider, bounds ); repaint( bounds.x, bounds.y, bounds.width, bounds.height ); if( station.isContinousDisplay() && current != null ) { setDivider( current, divider ); station.updateBounds(); } } } }
@Override public void mouseReleased( MouseEvent e ){ if( pressed ) { pressed = false; if( current != null ) { setDivider( current, divider ); repaint( bounds.x, bounds.y, bounds.width, bounds.height ); station.updateBounds(); } setCursor( null ); mouseMoved( e ); if( controller != null && !controller.isRestrictedEnvironment() && awtListenerEnabled ) { // new solution eventDispatched(e); } else { // old solution with a little tweaking checkMousePositionAsync(); } } }
@Override public void mouseReleased( MouseEvent e ){ if( pressed ) { pressed = false; if( current != null ) { setDivider( current, divider ); repaint( bounds.x, bounds.y, bounds.width, bounds.height ); station.updateBounds(); } setCursor( null ); mouseMoved( e ); if( controller != null && !controller.isRestrictedEnvironment() && awtListenerEnabled ) { // new solution eventDispatched(e); } else { // old solution with a little tweaking checkMousePositionAsync(); } } }