diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 3cd33d6c3..01d53f850 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -5,11 +5,13 @@ package com.fr.design.designer.creator; import com.fr.base.GraphHelper; import com.fr.base.vcs.DesignerMode; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.events.DesignerEditor; import com.fr.design.designer.beans.models.SelectionModel; +import com.fr.design.fun.ShareWidgetUIProcessor; import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.layout.FRGUIPaneFactory; @@ -298,6 +300,10 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo @Override public JComponent createToolPane(BaseJForm jform, FormDesigner formEditor) { if (!DesignerMode.isAuthorityEditing()) { + ShareWidgetUIProcessor exportProcessor = ExtraDesignClassManager.getInstance().getSingle(ShareWidgetUIProcessor.MARK_STRING); + if (exportProcessor != null) { + return exportProcessor.createToolPane(this, jform, formEditor); + } if (isDedicateContainer() && this.getComponentCount() > 0) { // 图表块和报表块由于控件树处不显示,但对应的属性表要显示,此处处理下 XCreator child = ((XLayoutContainer) this).getXCreator(0); @@ -789,7 +795,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo public boolean isTopable() { return true; } - + } diff --git a/designer-form/src/main/java/com/fr/design/fun/ShareWidgetUIProcessor.java b/designer-form/src/main/java/com/fr/design/fun/ShareWidgetUIProcessor.java new file mode 100644 index 000000000..510b2cddd --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/fun/ShareWidgetUIProcessor.java @@ -0,0 +1,29 @@ +package com.fr.design.fun; + +import com.fr.design.designer.creator.XCreator; +import com.fr.design.mainframe.BaseJForm; +import com.fr.design.mainframe.FormDesigner; +import com.fr.stable.fun.mark.Immutable; + +import javax.swing.JComponent; + + +/** + * Created by kerry on 5/28/21 + */ +public interface ShareWidgetUIProcessor extends Immutable { + + String MARK_STRING = "ShareWidgetUIProcessor"; + + int CURRENT_LEVEL = 1; + + /** + * 生成属性配置界面 + * + * @param xCreator 选中的Xcreator + * @param formDesigner 表单设计器 + * @return 属性配置界面 + */ + JComponent createToolPane(XCreator xCreator, BaseJForm jform, FormDesigner formDesigner); + +} diff --git a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractShareWidgetUIProcessor.java b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractShareWidgetUIProcessor.java new file mode 100644 index 000000000..e0eddd09d --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractShareWidgetUIProcessor.java @@ -0,0 +1,19 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.ShareWidgetUIProcessor; +import com.fr.stable.fun.mark.API; + +/** + * Created by kerry on 5/28/21 + */ +@API(level = ShareWidgetUIProcessor.CURRENT_LEVEL) +public abstract class AbstractShareWidgetUIProcessor implements ShareWidgetUIProcessor { + + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } +}