mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-90515 Editor tab dragged by dragging Configuration Menu pop-out items
This commit is contained in:
@@ -186,15 +186,10 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe
|
||||
}
|
||||
}
|
||||
|
||||
boolean needConsume = true;
|
||||
if (myDetachingMode) {
|
||||
processDragOut(e, draggedTo, (Point)myPressPointScreen.clone(), dragOutStarted);
|
||||
} else {
|
||||
needConsume = processDrag(e, draggedTo, (Point)myPressPointScreen.clone());
|
||||
}
|
||||
|
||||
if (needConsume) {
|
||||
e.consume();
|
||||
processDrag(e, draggedTo, (Point)myPressPointScreen.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,14 +227,14 @@ public abstract class MouseDragHelper implements MouseListener, MouseMotionListe
|
||||
return myDragJustStarted;
|
||||
}
|
||||
|
||||
protected abstract boolean processDrag(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint);
|
||||
protected abstract void processDrag(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint);
|
||||
|
||||
protected boolean isDragOut(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void processDragOut(MouseEvent event, Point dragToScreenPoint, Point startScreenPoint, boolean justStarted) {
|
||||
|
||||
event.consume();
|
||||
}
|
||||
|
||||
private boolean isWithinDeadZone(final MouseEvent e) {
|
||||
|
||||
@@ -71,6 +71,7 @@ class DragHelper extends MouseDragHelper {
|
||||
} else {
|
||||
delegate.processDragOut(event, myDragOutSource);
|
||||
}
|
||||
event.consume();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,13 +93,13 @@ class DragHelper extends MouseDragHelper {
|
||||
myPressedTabLabel = findLabel(new RelativePoint(event).getPoint(myTabs));
|
||||
}
|
||||
|
||||
protected boolean processDrag(MouseEvent event, Point targetScreenPoint, Point startPointScreen) {
|
||||
if (!myTabs.isTabDraggingEnabled() || !isDragSource(event)) return false;
|
||||
protected void processDrag(MouseEvent event, Point targetScreenPoint, Point startPointScreen) {
|
||||
if (!myTabs.isTabDraggingEnabled() || !isDragSource(event)) return;
|
||||
|
||||
SwingUtilities.convertPointFromScreen(startPointScreen, myTabs);
|
||||
|
||||
if (isDragJustStarted()) {
|
||||
if (myPressedTabLabel == null) return false;
|
||||
if (myPressedTabLabel == null) return;
|
||||
|
||||
final Rectangle labelBounds = myPressedTabLabel.getBounds();
|
||||
|
||||
@@ -111,7 +112,7 @@ class DragHelper extends MouseDragHelper {
|
||||
myDragOriginalRec.y -= myHoldDelta.height;
|
||||
}
|
||||
else {
|
||||
if (myDragRec == null) return false;
|
||||
if (myDragRec == null) return;
|
||||
|
||||
final Point toPoint = SwingUtilities.convertPoint(event.getComponent(), event.getPoint(), myTabs);
|
||||
|
||||
@@ -163,7 +164,7 @@ class DragHelper extends MouseDragHelper {
|
||||
headerRec.height += border * 2;
|
||||
myTabs.repaint(headerRec);
|
||||
}
|
||||
return true;
|
||||
event.consume();
|
||||
}
|
||||
|
||||
private boolean isDragSource(MouseEvent event) {
|
||||
|
||||
Reference in New Issue
Block a user