|
|
|
@ -1252,12 +1252,12 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
instantiateCreator(xCreator); |
|
|
|
|
draggingModel = new DraggingModel() |
|
|
|
|
.designer(this) |
|
|
|
|
.creator(xCreator) |
|
|
|
|
.startDragEvent(startDragEvent) |
|
|
|
|
.currentDragEvent(currentDragEvent) |
|
|
|
|
.dragNewWidget(true); |
|
|
|
|
.currentDragEvent(currentDragEvent); |
|
|
|
|
this.setDropTarget(new FormCreatorDropTarget(this, xCreator)); |
|
|
|
|
repaint(); |
|
|
|
|
} |
|
|
|
@ -1273,12 +1273,12 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
if (currentDragEvent == null || this.getDropTarget() != null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
backUpCreator(xCreator); |
|
|
|
|
draggingModel = new DraggingModel() |
|
|
|
|
.designer(this) |
|
|
|
|
.creator(xCreator) |
|
|
|
|
.startDragEvent(startDragEvent) |
|
|
|
|
.currentDragEvent(currentDragEvent) |
|
|
|
|
.dragNewWidget(false); |
|
|
|
|
.currentDragEvent(currentDragEvent); |
|
|
|
|
XLayoutContainer container = this.getDraggingHotspotLayout(); |
|
|
|
|
LayoutAdapter adapter = container.getLayoutAdapter(); |
|
|
|
|
adapter.dragging(this.getDraggingModel()); |
|
|
|
@ -1990,7 +1990,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
return spacingLineDrawer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void instantiateCreator(XCreator creator) { |
|
|
|
|
public void instantiateCreator(XCreator creator) { |
|
|
|
|
ModelUtil.renameWidgetName(this.getTarget(), creator); |
|
|
|
|
creator.addNotify(); |
|
|
|
|
|
|
|
|
@ -1999,18 +1999,12 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
|
|
|
|
|
creator.putClientProperty(AdapterBus.CLIENT_PROPERTIES, adapter); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void addNewWidget(XCreator creator, int x, int y) { |
|
|
|
|
instantiateCreator(creator); |
|
|
|
|
addWidgetToForm(creator, x, y); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void changeWidgetPlace(XCreator creator, int x, int y) { |
|
|
|
|
public void backUpCreator(XCreator creator) { |
|
|
|
|
creator.backupCurrentSize(); |
|
|
|
|
creator.backupParent(); |
|
|
|
|
addWidgetToForm(creator, x, y); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void addWidgetToForm(XCreator creator, int x, int y) { |
|
|
|
|
public void addWidgetToForm(XCreator creator, int x, int y) { |
|
|
|
|
if(creator == null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|