Browse Source

Merge pull request #1080 in DESIGN/design from ~LUCIAN.CHEN/design:feature/10.0 to feature/10.0

* commit '8798fe8da4ec7a2d4c8b82fb774e35165f5aed23':
  无JIRA任务,sonar问题修复
research/11.0
Lucian.Chen 5 years ago
parent
commit
c2327e38a6
  1. 16
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

16
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -148,6 +148,9 @@ public class FormCreatorDropTarget extends DropTarget {
// 取消前一个焦点容器的提示渲染器 // 取消前一个焦点容器的提示渲染器
designer.setPainter(null); designer.setPainter(null);
} }
if (container == null) {
throw new IllegalArgumentException("container can not be null!");
}
//获取painter的时候要考虑布局之间嵌套的问题 //获取painter的时候要考虑布局之间嵌套的问题
XLayoutContainer xLayoutContainer = container.getTopLayout(); XLayoutContainer xLayoutContainer = container.getTopLayout();
if (xLayoutContainer != null && xLayoutContainer.getParent() != null if (xLayoutContainer != null && xLayoutContainer.getParent() != null
@ -215,7 +218,8 @@ public class FormCreatorDropTarget extends DropTarget {
* *
* @param dtde 事件 * @param dtde 事件
*/ */
public void dragEnter(DropTargetDragEvent dtde) { @Override
public synchronized void dragEnter(DropTargetDragEvent dtde) {
Point loc = dtde.getLocation(); Point loc = dtde.getLocation();
this.entering(loc.x, loc.y); this.entering(loc.x, loc.y);
} }
@ -225,7 +229,8 @@ public class FormCreatorDropTarget extends DropTarget {
* *
* @param dtde 事件 * @param dtde 事件
*/ */
public void dragOver(DropTargetDragEvent dtde) { @Override
public synchronized void dragOver(DropTargetDragEvent dtde) {
Point loc = dtde.getLocation(); Point loc = dtde.getLocation();
hovering(loc.x, loc.y); hovering(loc.x, loc.y);
} }
@ -235,7 +240,8 @@ public class FormCreatorDropTarget extends DropTarget {
* *
* @param dtde 事件 * @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 事件 * @param dte 事件
*/ */
public void dragExit(DropTargetEvent dte) { @Override
public synchronized void dragExit(DropTargetEvent dte) {
this.exiting(); this.exiting();
} }
@ -252,6 +259,7 @@ public class FormCreatorDropTarget extends DropTarget {
* *
* @param dtde 事件 * @param dtde 事件
*/ */
@Override
public synchronized void drop(DropTargetDropEvent dtde) { public synchronized void drop(DropTargetDropEvent dtde) {
Point loc = dtde.getLocation(); Point loc = dtde.getLocation();
this.adding(loc.x, loc.y); this.adding(loc.x, loc.y);

Loading…
Cancel
Save