From 8798fe8da4ec7a2d4c8b82fb774e35165f5aed23 Mon Sep 17 00:00:00 2001 From: author Date: Fri, 6 Sep 2019 11:05:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=8Csonar?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/FormCreatorDropTarget.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java index 05d33cccb3..3ed29d0475 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -148,6 +148,9 @@ public class FormCreatorDropTarget extends DropTarget { // 取消前一个焦点容器的提示渲染器 designer.setPainter(null); } + if (container == null) { + throw new IllegalArgumentException("container can not be null!"); + } //获取painter的时候要考虑布局之间嵌套的问题 XLayoutContainer xLayoutContainer = container.getTopLayout(); if (xLayoutContainer != null && xLayoutContainer.getParent() != null @@ -215,7 +218,8 @@ public class FormCreatorDropTarget extends DropTarget { * * @param dtde 事件 */ - public void dragEnter(DropTargetDragEvent dtde) { + @Override + public synchronized void dragEnter(DropTargetDragEvent dtde) { Point loc = dtde.getLocation(); this.entering(loc.x, loc.y); } @@ -225,7 +229,8 @@ public class FormCreatorDropTarget extends DropTarget { * * @param dtde 事件 */ - public void dragOver(DropTargetDragEvent dtde) { + @Override + public synchronized void dragOver(DropTargetDragEvent dtde) { Point loc = dtde.getLocation(); hovering(loc.x, loc.y); } @@ -235,7 +240,8 @@ public class FormCreatorDropTarget extends DropTarget { * * @param dtde 事件 */ - public void dropActionChanged(DropTargetDragEvent dtde) { + @Override + public synchronized void dropActionChanged(DropTargetDragEvent dtde) { } /** @@ -243,7 +249,8 @@ public class FormCreatorDropTarget extends DropTarget { * * @param dte 事件 */ - public void dragExit(DropTargetEvent dte) { + @Override + public synchronized void dragExit(DropTargetEvent dte) { this.exiting(); } @@ -252,6 +259,7 @@ public class FormCreatorDropTarget extends DropTarget { * * @param dtde 事件 */ + @Override public synchronized void drop(DropTargetDropEvent dtde) { Point loc = dtde.getLocation(); this.adding(loc.x, loc.y);