Browse Source

REPORT-133059 fix: 东区拖拽面板事件响应问题

fbp/release
Levy.Xie-解安森 3 months ago
parent
commit
913cdb789c
  1. 11
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

11
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -54,6 +54,7 @@ public class UIEastResizableContainer extends JPanel {
private static final int DRAG_GAP_SIZE = 10; private static final int DRAG_GAP_SIZE = 10;
private Point dragPoint; private Point dragPoint;
private boolean dragging;
public UIEastResizableContainer() { public UIEastResizableContainer() {
this(new JPanel(), new JPanel()); this(new JPanel(), new JPanel());
@ -71,12 +72,20 @@ public class UIEastResizableContainer extends JPanel {
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (isEnableDrag(e)) { if (isEnableDrag(e)) {
dragPoint = e.getPoint(); dragPoint = e.getPoint();
dragging = true;
} }
} }
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
resizePanel(e); if (dragging) {
resizePanel(e);
}
}
@Override
public void mouseReleased(MouseEvent e) {
dragging = false;
} }
}; };

Loading…
Cancel
Save