Browse Source

REPORT-64149

feature/x
方磊 3 years ago
parent
commit
35b162b080
  1. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartGuideLinesPane.java
  2. 9
      designer-form/src/main/java/com/fr/design/designer/beans/events/AddingWidgetListener.java
  3. 54
      designer-form/src/main/java/com/fr/design/designer/beans/events/AddingWidgetListenerTable.java
  4. 131
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java
  5. 145
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  6. 6
      designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java
  7. 11
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideCreateUtils.java

4
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartGuideLinesPane.java

@ -0,0 +1,4 @@
package com.fr.van.chart.designer.component;
public class VanChartGuideLinesPane {
}

9
designer-form/src/main/java/com/fr/design/designer/beans/events/AddingWidgetListener.java

@ -0,0 +1,9 @@
package com.fr.design.designer.beans.events;
import java.util.EventListener;
public interface AddingWidgetListener extends EventListener {
void beforeAdded();
void afterAdded(boolean addResult);
}

54
designer-form/src/main/java/com/fr/design/designer/beans/events/AddingWidgetListenerTable.java

@ -0,0 +1,54 @@
package com.fr.design.designer.beans.events;
import com.fr.general.ComparatorUtils;
import javax.swing.SwingUtilities;
import java.util.ArrayList;
import java.util.List;
public class AddingWidgetListenerTable {
protected List<AddingWidgetListener> listeners = new ArrayList<>();
public AddingWidgetListenerTable() {
}
public void addListener(AddingWidgetListener listener) {
if (listener == null) {
return;
}
for (int i = 0; i < listeners.size(); i++) {
if (ComparatorUtils.equals(listener, listeners.get(i))) {
listeners.set(i, listener);
return;
}
}
listeners.add(listener);
}
public void beforeAdded() {
for (final AddingWidgetListener listener : listeners) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
listener.beforeAdded();
}
});
}
}
public void afterAdded(boolean addResult) {
for (final AddingWidgetListener listener : listeners) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
listener.afterAdded(addResult);
}
});
}
}
public void clearListeners() {
listeners.clear();
}
}

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

@ -1,40 +1,23 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.HoverPainter;
import com.fr.design.designer.beans.Painter;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.beans.events.AddingWidgetListener;
import com.fr.design.designer.beans.models.AddingModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.mod.bean.ChangeItem;
import com.fr.design.mod.bean.ContentChangeItem;
import com.fr.design.mod.event.TableDataModifyEvent;
import com.fr.design.utils.ComponentUtils;
import com.fr.event.EventDispatcher;
import com.fr.form.share.SharableWidgetProvider;
import com.fr.form.share.ShareLoader;
import com.fr.form.share.editor.SharableEditorProvider;
import com.fr.form.ui.Widget;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
@ -45,15 +28,10 @@ import java.awt.Color;
import java.awt.Component;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetDropEvent;
import java.awt.dnd.DropTargetEvent;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 添加模式下鼠标事件处理器
@ -81,89 +59,21 @@ public class FormCreatorDropTarget extends DropTarget {
this.addingModel = designer.getAddingModel();
this.promptWindow.add(promptButton);
this.tabDragInner = new TabDragInner(designer);
initAddingListener();
}
public void adding(int x, int y) {
// 当前鼠标所在的组件
XCreator hoveredComponent = designer.getComponentAt(x, y);
// 获取该组件所在的焦点容器
XLayoutContainer container = XCreatorUtils.getHotspotContainer(hoveredComponent);
boolean success = false;
if (container != null) {
//XWCardTagLayout 切换添加状态到普通状态
container.stopAddingState(designer);
// 如果是容器,则调用其acceptComponent接受组件
AddingModel model = designer.getAddingModel();
boolean chartEnter2Para = !addingModel.getXCreator().canEnterIntoParaPane() && container.acceptType(XWParameterLayout.class);
boolean formSubmit2Adapt = !addingModel.getXCreator().canEnterIntoAdaptPane() && container.acceptType(XWFitLayout.class);
if (model != null && !chartEnter2Para && !formSubmit2Adapt) {
tabDragInner.tryDragIn();
success = model.add2Container(designer, container, x, y);
}
cancelPromptWidgetForbidEnter();
}
if (success) {
tabDragInner.reset();
// 如果添加成功,则触发相应事件
XCreator xCreator = container.acceptType(XWParameterLayout.class) ? designer.getParaComponent() : designer.getRootComponent();
//SetSelection时要确保选中的是最顶层的布局
//tab布局添加的时候是初始化了XWCardLayout,实际上最顶层的布局是XWCardMainBorderLayout
XCreator addingXCreator = addingModel.getXCreator();
Widget widget = (addingXCreator.getBackupParent() != null && addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData();
//图表埋点
dealChartBuryingPoint(widget);
if (addingXCreator.isShared()) {
if (container.acceptType(XWAbsoluteLayout.class)) {
// 绝对布局中新添加的共享组件默认锁定尺寸比例
Rectangle bounds = new Rectangle(addingXCreator.getBounds());
Widget addingWidget = addingXCreator.toData();
if (addingWidget != null && bounds.width > 0 && bounds.height > 0) {
addingXCreator.toData().setAspectRatioLocked(true);
addingXCreator.toData().setAspectRatioBackup(1.0 * bounds.width / bounds.height);
}
}
String shareId = addingXCreator.getShareId();
SharableEditorProvider sharableEditor = ShareLoader.getLoader().getSharedElCaseEditorById(shareId);
SharableWidgetProvider bindInfo = ShareLoader.getLoader().getElCaseBindInfoById(shareId);
Map<String, String> tdNameMap = Collections.emptyMap();
if (sharableEditor != null && bindInfo != null) {
tdNameMap = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).addTableData(bindInfo.getName(), sharableEditor.getTableDataSource(), true);
//合并数据集之后,可能会有数据集名称变化,做一下联动
//共享的组件拿的时候都是克隆的,这边改拖拽中克隆的对象而非新克隆对象,上面这个新克隆的对象只是为了拿数据集
Map<String, String> map = new HashMap<>();
for (Map.Entry<String, String> entry : tdNameMap.entrySet()) {
designer.getTarget().renameTableData(widget, entry.getKey(), entry.getValue());
map.put(entry.getKey(), entry.getValue());
}
if (!map.isEmpty()) {
DesignTableDataManager.fireDSChanged(map);
}
}
EventDispatcher.fire(TableDataModifyEvent.INSTANCE, new ContentChangeItem(tdNameMap, widget, ChangeItem.TABLE_DATA_NAME));
private void initAddingListener() {
designer.getAddingWidgetListeners().addListener(new AddingWidgetListener() {
@Override
public void beforeAdded() {
tabDragInner.setTabEditable();
}
designer.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget}));
if (!addingModel.isAddedIllegal()) {
designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED);
}
tabDragInner.tryDragIn();
} else {
Toolkit.getDefaultToolkit().beep();
// 拖入失败 取消选中
XCreator creator = addingModel.getXCreator();
if (creator != null) {
creator.setSelected(false);
@Override
public void afterAdded(boolean addResult) {
tabDragInner.reset();
}
}
// 取消提示
designer.setPainter(null);
// 切换添加状态到普通状态
designer.stopAddingState();
});
}
private void entering(int x, int y) {
@ -289,7 +199,7 @@ public class FormCreatorDropTarget extends DropTarget {
int x = designer.getRelativeX(loc.x);
int y = designer.getRelativeY(loc.y);
hovering(x, y);
tabDragInner.canDragIn(designer.getComponentAt(x, y), x, y);
tabDragInner.setTabDragInAble(designer.getComponentAt(x, y), x, y);
XCreator xCreator = designer.getAddingModel().getXCreator();
XLayoutContainer parent = XCreatorUtils.getParentXLayoutContainer(xCreator);
@ -346,8 +256,9 @@ public class FormCreatorDropTarget extends DropTarget {
}
private void dropXCreator(DropTargetDropEvent dtde) {
cancelPromptWidgetForbidEnter();
Point loc = dtde.getLocation();
this.adding(designer.getRelativeX(loc.x), designer.getRelativeY(loc.y));
designer.addWidgetToForm(designer.getRelativeX(loc.x), designer.getRelativeY(loc.y));
// 放到事件末尾执行
SwingUtilities.invokeLater(new Runnable() {
@Override
@ -362,20 +273,6 @@ public class FormCreatorDropTarget extends DropTarget {
designer.requestFocus();
}
private void dealChartBuryingPoint(Widget widget) {
List<BaseChartCollection> chartCollections = widget.getChartCollections();
for (BaseChartCollection baseChartCollection : chartCollections) {
ChartCollection chartCollection = (ChartCollection) baseChartCollection;
for (int i = 0, size = chartCollection.getChartCount(); i < size; i++) {
ChartProvider chart = chartCollection.getChart(i, ChartProvider.class);
//是否是共享的复用组件
boolean isReuse = StringUtils.isNotEmpty(this.addingModel.getXCreator().getShareId());
ChartInfoCollector.getInstance().collection(chart, null, isReuse);
ChartInfoCollector.getInstance().checkTestChart(chart);
}
}
}
public TabDragInner getTabDragInner() {
return this.tabDragInner;
}

145
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -1,12 +1,17 @@
package com.fr.design.mainframe;
import com.fr.base.Parameter;
import com.fr.base.chart.BaseChartCollection;
import com.fr.base.vcs.DesignerMode;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.LayoutAdapter;
@ -22,6 +27,7 @@ import com.fr.design.designer.beans.actions.PasteAction;
import com.fr.design.designer.beans.adapters.layout.DefaultDesignerBaseOperate;
import com.fr.design.designer.beans.adapters.layout.DesignerBaseOperate;
import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter;
import com.fr.design.designer.beans.events.AddingWidgetListenerTable;
import com.fr.design.designer.beans.events.CreatorEventListenerTable;
import com.fr.design.designer.beans.events.DesignerEditListener;
import com.fr.design.designer.beans.events.DesignerEvent;
@ -39,6 +45,7 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWAbsoluteBodyLayout;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane;
@ -47,19 +54,27 @@ import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.RightSelectionHandlerProvider;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.mod.bean.ChangeItem;
import com.fr.design.mod.bean.ContentChangeItem;
import com.fr.design.mod.event.TableDataModifyEvent;
import com.fr.design.parameter.ParaDefinitePane;
import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.utils.ComponentUtils;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.event.EventDispatcher;
import com.fr.form.FormElementCaseContainerProvider;
import com.fr.form.FormElementCaseProvider;
import com.fr.form.main.Form;
import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.share.SharableWidgetProvider;
import com.fr.form.share.ShareLoader;
import com.fr.form.share.editor.SharableEditorProvider;
import com.fr.form.ui.EditorHolder;
import com.fr.form.ui.PaddingMargin;
import com.fr.form.ui.Widget;
@ -93,6 +108,7 @@ import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.MouseEvent;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
@ -101,7 +117,10 @@ import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
@ -173,6 +192,8 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
private static final int H_GAP = 105;
private static final int SUBMIT_BUTTON_H_LOCATION = 270;
private AddingWidgetListenerTable addingWidgetListeners;
public FormDesigner(Form form) {
this(form, null);
}
@ -187,6 +208,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
this.setBackground(Color.WHITE);
// 初始化
edit = new CreatorEventListenerTable();
addingWidgetListeners = new AddingWidgetListenerTable();
selectionModel = new SelectionModel(this);
stateModel = new StateModel(this);
desigerMode = createFormDesignerTargetMode();
@ -606,6 +628,10 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
return edit;
}
public AddingWidgetListenerTable getAddingWidgetListeners() {
return addingWidgetListeners;
}
/**
* 增加监听事件
*
@ -1222,13 +1248,15 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
* @param currentDragEvent
*/
public void startDraggingNewWidget(XCreator xCreator, MouseEvent startDragEvent, MouseEvent currentDragEvent) {
if (startDragEvent != null && currentDragEvent != null) {
draggingModel = new DraggingModel()
.designer(this)
.creator(xCreator)
.startDragEvent(startDragEvent)
.currentDragEvent(currentDragEvent);
if (startDragEvent == null || currentDragEvent == null) {
return;
}
draggingModel = new DraggingModel()
.designer(this)
.creator(xCreator)
.startDragEvent(startDragEvent)
.currentDragEvent(currentDragEvent);
addingModel = new AddingModel(this, xCreator);
this.setDropTarget(new FormCreatorDropTarget(this));
repaint();
@ -1952,4 +1980,109 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
public FormSpacingLineDrawer getSpacingLineDrawer() {
return spacingLineDrawer;
}
public void addWidgetToForm(int x, int y) {
if(addingModel == null) {
return;
}
// 当前鼠标所在的组件
XCreator hoveredComponent = this.getComponentAt(x, y);
// 获取该组件所在的焦点容器
XLayoutContainer container = XCreatorUtils.getHotspotContainer(hoveredComponent);
boolean success = false;
if (container != null) {
//XWCardTagLayout 切换添加状态到普通状态
container.stopAddingState(this);
// 如果是容器,则调用其acceptComponent接受组件
AddingModel model = this.getAddingModel();
boolean chartEnter2Para = !addingModel.getXCreator().canEnterIntoParaPane() && container.acceptType(XWParameterLayout.class);
boolean formSubmit2Adapt = !addingModel.getXCreator().canEnterIntoAdaptPane() && container.acceptType(XWFitLayout.class);
if (model != null && !chartEnter2Para && !formSubmit2Adapt) {
getAddingWidgetListeners().beforeAdded();
success = model.add2Container(this, container, x, y);
}
getAddingWidgetListeners().afterAdded(success);
defaultAfterWidgetAdded(success, container);
}
// 取消提示
this.setPainter(null);
// 切换添加状态到普通状态
this.stopAddingState();
getAddingWidgetListeners().clearListeners();
}
private void dealChartBuryingPoint(Widget widget) {
List<BaseChartCollection> chartCollections = widget.getChartCollections();
for (BaseChartCollection baseChartCollection : chartCollections) {
ChartCollection chartCollection = (ChartCollection) baseChartCollection;
for (int i = 0, size = chartCollection.getChartCount(); i < size; i++) {
ChartProvider chart = chartCollection.getChart(i, ChartProvider.class);
//是否是共享的复用组件
boolean isReuse = StringUtils.isNotEmpty(this.addingModel.getXCreator().getShareId());
ChartInfoCollector.getInstance().collection(chart, null, isReuse);
ChartInfoCollector.getInstance().checkTestChart(chart);
}
}
}
private void defaultAfterWidgetAdded(boolean addResult, XLayoutContainer container) {
if (addResult) {
// 如果添加成功,则触发相应事件
XCreator xCreator = container.acceptType(XWParameterLayout.class) ? this.getParaComponent() : this.getRootComponent();
//SetSelection时要确保选中的是最顶层的布局
//tab布局添加的时候是初始化了XWCardLayout,实际上最顶层的布局是XWCardMainBorderLayout
XCreator addingXCreator = addingModel.getXCreator();
Widget widget = (addingXCreator.getBackupParent() != null && addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData();
//图表埋点
dealChartBuryingPoint(widget);
if (addingXCreator.isShared()) {
if (container.acceptType(XWAbsoluteLayout.class)) {
// 绝对布局中新添加的共享组件默认锁定尺寸比例
Rectangle bounds = new Rectangle(addingXCreator.getBounds());
Widget addingWidget = addingXCreator.toData();
if (addingWidget != null && bounds.width > 0 && bounds.height > 0) {
addingXCreator.toData().setAspectRatioLocked(true);
addingXCreator.toData().setAspectRatioBackup(1.0 * bounds.width / bounds.height);
}
}
String shareId = addingXCreator.getShareId();
SharableEditorProvider sharableEditor = ShareLoader.getLoader().getSharedElCaseEditorById(shareId);
SharableWidgetProvider bindInfo = ShareLoader.getLoader().getElCaseBindInfoById(shareId);
Map<String, String> tdNameMap = Collections.emptyMap();
if (sharableEditor != null && bindInfo != null) {
tdNameMap = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).addTableData(bindInfo.getName(), sharableEditor.getTableDataSource(), true);
//合并数据集之后,可能会有数据集名称变化,做一下联动
//共享的组件拿的时候都是克隆的,这边改拖拽中克隆的对象而非新克隆对象,上面这个新克隆的对象只是为了拿数据集
Map<String, String> map = new HashMap<>();
for (Map.Entry<String, String> entry : tdNameMap.entrySet()) {
this.getTarget().renameTableData(widget, entry.getKey(), entry.getValue());
map.put(entry.getKey(), entry.getValue());
}
if (!map.isEmpty()) {
DesignTableDataManager.fireDSChanged(map);
}
}
EventDispatcher.fire(TableDataModifyEvent.INSTANCE, new ContentChangeItem(tdNameMap, widget, ChangeItem.TABLE_DATA_NAME));
}
this.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget}));
if (!addingModel.isAddedIllegal()) {
this.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED);
}
} else {
Toolkit.getDefaultToolkit().beep();
// 拖入失败 取消选中
XCreator creator = addingModel.getXCreator();
if (creator != null) {
creator.setSelected(false);
}
}
}
}

6
designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java

@ -30,13 +30,13 @@ public class TabDragInner {
}
/**
* 判断拖入
* 鼠标拖拽组件在tab上悬停10s自动设置tab为可拖入状态释放鼠标将会直接拖入tab
*
* @param creator 当前拖拽的组件下方所在布局最上层的组件
* @param x
* @param y
*/
public void canDragIn(XCreator creator, int x, int y) {
public void setTabDragInAble(XCreator creator, int x, int y) {
XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(creator).getTopLayout();
boolean dragInAble = false;
if (topLayout != null && topLayout.acceptType(XWCardMainBorderLayout.class) && belowXLayoutContainer == null) {
@ -60,7 +60,7 @@ public class TabDragInner {
/**
* 尝试进入tab编辑
*/
public void tryDragIn() {
public void setTabEditable() {
if (belowXLayoutContainer != null && belowXLayoutContainer.isDragInAble()) {
belowXLayoutContainer.setEditable(true);
}

11
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideCreateUtils.java

@ -10,7 +10,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.login.DesignerLoginHelper;
import com.fr.design.login.DesignerLoginSource;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormCreatorDropTarget;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.guide.base.GuideManager;
@ -136,15 +135,13 @@ public class GuideCreateUtils {
if (isDragComponent) {
designer.setAddingModel(new AddingModel(xCreator, 0,0));
designer.setDropTarget(new FormCreatorDropTarget(designer));
designer.repaint();
} else {
designer.startDraggingNewWidget(xCreator, null, null);
designer.setAddingModel(new AddingModel(designer, xCreator));
}
FormCreatorDropTarget dropTarget = (FormCreatorDropTarget) designer.getDropTarget();
dropTarget.adding(xLayoutContainer.getX(), xLayoutContainer.getY());
designer.repaint();
designer.addWidgetToForm(xLayoutContainer.getX(), xLayoutContainer.getY());
designer.getSelectionModel().selectACreator(xCreator);
}

Loading…
Cancel
Save