|
|
|
@ -1214,20 +1214,6 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
this.repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 拖拽准备 |
|
|
|
|
* |
|
|
|
|
* @param xCreator 组件 |
|
|
|
|
*/ |
|
|
|
|
public void startDraggingBean(XCreator xCreator) { |
|
|
|
|
// 根据所选择的组件的BeanInfo生成相应的AddingModel
|
|
|
|
|
// AddingModel和StateModel不一样,适合当前选择的组件相关的
|
|
|
|
|
addingModel = new AddingModel(this, xCreator); |
|
|
|
|
this.setDropTarget(new FormCreatorDropTarget(this)); |
|
|
|
|
// 触发状态添加模式事件
|
|
|
|
|
repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 拖入新的组件 |
|
|
|
|
* |
|
|
|
@ -1236,11 +1222,13 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
* @param currentDragEvent |
|
|
|
|
*/ |
|
|
|
|
public void startDraggingNewWidget(XCreator xCreator, MouseEvent startDragEvent, MouseEvent currentDragEvent) { |
|
|
|
|
draggingModel = new DraggingModel() |
|
|
|
|
.designer(this) |
|
|
|
|
.creator(xCreator) |
|
|
|
|
.startDragEvent(startDragEvent) |
|
|
|
|
.currentDragEvent(currentDragEvent); |
|
|
|
|
if (startDragEvent != null && currentDragEvent != null) { |
|
|
|
|
draggingModel = new DraggingModel() |
|
|
|
|
.designer(this) |
|
|
|
|
.creator(xCreator) |
|
|
|
|
.startDragEvent(startDragEvent) |
|
|
|
|
.currentDragEvent(currentDragEvent); |
|
|
|
|
} |
|
|
|
|
addingModel = new AddingModel(this, xCreator); |
|
|
|
|
this.setDropTarget(new FormCreatorDropTarget(this)); |
|
|
|
|
repaint(); |
|
|
|
|