|
|
@ -1214,20 +1214,6 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection |
|
|
|
this.repaint(); |
|
|
|
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 |
|
|
|
* @param currentDragEvent |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void startDraggingNewWidget(XCreator xCreator, MouseEvent startDragEvent, MouseEvent currentDragEvent) { |
|
|
|
public void startDraggingNewWidget(XCreator xCreator, MouseEvent startDragEvent, MouseEvent currentDragEvent) { |
|
|
|
|
|
|
|
if (startDragEvent != null && currentDragEvent != null) { |
|
|
|
draggingModel = new DraggingModel() |
|
|
|
draggingModel = new DraggingModel() |
|
|
|
.designer(this) |
|
|
|
.designer(this) |
|
|
|
.creator(xCreator) |
|
|
|
.creator(xCreator) |
|
|
|
.startDragEvent(startDragEvent) |
|
|
|
.startDragEvent(startDragEvent) |
|
|
|
.currentDragEvent(currentDragEvent); |
|
|
|
.currentDragEvent(currentDragEvent); |
|
|
|
|
|
|
|
} |
|
|
|
addingModel = new AddingModel(this, xCreator); |
|
|
|
addingModel = new AddingModel(this, xCreator); |
|
|
|
this.setDropTarget(new FormCreatorDropTarget(this)); |
|
|
|
this.setDropTarget(new FormCreatorDropTarget(this)); |
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
|