diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java index 756a89f56..0a6e692f4 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -22,15 +22,14 @@ import com.fr.design.icon.IconPathConstants; import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.design.utils.ComponentUtils; import com.fr.form.share.SharableEditorProvider; +import com.fr.form.share.SharableWidgetProvider; import com.fr.form.share.ShareLoader; import com.fr.form.ui.ChartEditor; -import com.fr.form.ui.SharableWidgetBindInfo; import com.fr.form.ui.Widget; import com.fr.stable.Constants; import javax.swing.BorderFactory; import javax.swing.JWindow; -import java.util.Map; import java.awt.Color; import java.awt.Component; import java.awt.Point; @@ -40,6 +39,7 @@ import java.awt.dnd.DropTarget; import java.awt.dnd.DropTargetDragEvent; import java.awt.dnd.DropTargetDropEvent; import java.awt.dnd.DropTargetEvent; +import java.util.Map; /** * 添加模式下鼠标事件处理器。 @@ -99,7 +99,7 @@ public class FormCreatorDropTarget extends DropTarget { if (addingXCreator.isShared()) { String shareId = addingXCreator.getShareId(); SharableEditorProvider sharableEditor = ShareLoader.getLoader().getSharedElCaseEditorById(shareId); - SharableWidgetBindInfo bindInfo = ShareLoader.getLoader().getElCaseBindInfoById(shareId); + SharableWidgetProvider bindInfo = ShareLoader.getLoader().getElCaseBindInfoById(shareId); if (sharableEditor != null && bindInfo != null) { Map tdNameMap = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).addTableData(bindInfo.getName(), sharableEditor.getTableDataSource()); //合并数据集之后,可能会有数据集名称变化,做一下联动 diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java index f49f2859b..ecb3faa70 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -8,8 +8,8 @@ import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.widget.FRWidgetFactory; +import com.fr.form.share.SharableWidgetProvider; import com.fr.form.share.ShareLoader; -import com.fr.form.ui.SharableWidgetBindInfo; import com.fr.general.CloudCenter; import com.fr.log.FineLoggerFactory; import com.fr.share.ShareConstants; @@ -51,7 +51,7 @@ public class FormWidgetDetailPane extends FormDockView{ private UIScrollPane downPane; private JPanel reuWidgetPanel; private UIComboBox comboBox; - private SharableWidgetBindInfo[] elCaseBindInfoList; + private SharableWidgetProvider[] elCaseBindInfoList; private UIButton deleteButton; private JPanel editPanel; private JPanel resetPanel; diff --git a/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetButton.java b/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetButton.java index a79ac17a5..7e7d76d89 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetButton.java @@ -1,14 +1,13 @@ package com.fr.design.mainframe; -import com.fr.base.BaseUtils; import com.fr.base.iofile.attr.SharableAttrMark; import com.fr.base.vcs.DesignerMode; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.gui.ilable.UILabel; +import com.fr.form.share.SharableWidgetProvider; import com.fr.form.share.ShareLoader; import com.fr.form.ui.AbstractBorderStyleWidget; -import com.fr.form.ui.SharableWidgetBindInfo; import com.fr.form.ui.Widget; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.general.ComparatorUtils; @@ -52,8 +51,9 @@ import java.io.Serializable; * Time: 16:14 */ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMotionListener, Serializable { + private static final Dimension TAB_DEFAULT_SIZE = new Dimension(500, 300); - private SharableWidgetBindInfo bindInfo; + private SharableWidgetProvider bindInfo; private MouseEvent lastPressEvent; private JPanel reportPane; private boolean isEdit; @@ -72,7 +72,7 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot } }; - public ShareWidgetButton(SharableWidgetBindInfo bindInfo) { + public ShareWidgetButton(SharableWidgetProvider bindInfo) { this.bindInfo = bindInfo; this.setPreferredSize(new Dimension(108, 68)); initUI(); @@ -149,11 +149,11 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot }; } - public SharableWidgetBindInfo getBindInfo() { + public SharableWidgetProvider getBindInfo() { return bindInfo; } - public void setBindInfo(SharableWidgetBindInfo bindInfo) { + public void setBindInfo(SharableWidgetProvider bindInfo) { this.bindInfo = bindInfo; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetPane.java b/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetPane.java index 32ce586c7..549a4b174 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetPane.java @@ -1,7 +1,8 @@ package com.fr.design.mainframe; -import com.fr.form.ui.SharableWidgetBindInfo; + +import com.fr.form.share.SharableWidgetProvider; import javax.swing.*; import java.awt.*; @@ -12,12 +13,12 @@ import java.awt.*; */ public class ShareWidgetPane extends JPanel { - public ShareWidgetPane(SharableWidgetBindInfo[] elCaseBindInfoList, boolean isEdit) { + public ShareWidgetPane(SharableWidgetProvider[] elCaseBindInfoList, boolean isEdit) { this.setBorder(BorderFactory.createEmptyBorder(10, 3, 0, 0));// 设置面板的边框 ,距离上、左、下、右 的距离 if (elCaseBindInfoList != null) { int rowCount = (elCaseBindInfoList.length + 1) / 2; this.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 10)); - for (SharableWidgetBindInfo rbModuleInfo : elCaseBindInfoList) { + for (SharableWidgetProvider rbModuleInfo : elCaseBindInfoList) { ShareWidgetButton widgetButton = new ShareWidgetButton(rbModuleInfo); widgetButton.setElementCaseEdit(isEdit); this.add(widgetButton);