From e7d50660bbe9eb0667c0f911ff0b32a0df4c8d39 Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 16 Nov 2023 15:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B3=A8=E9=87=8A=EF=BC=8C?= =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=B3=9B=E5=9E=8B=E5=86=99=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/WidgetThemeDisplayAction.java | 12 ++-- .../WidgetThemeDisplayConfigPane.java | 8 ++- .../parameter/RootDesignDefinePane.java | 2 +- .../ui/btn/AbstractExtraButtonPane.java | 2 +- .../widget/ui/designer/ButtonDefinePane.java | 2 +- .../ui/designer/CheckBoxDefinePane.java | 2 +- .../ui/designer/DateEditorDefinePane.java | 2 +- .../designer/DirectWriteEditorDefinePane.java | 2 +- .../widget/ui/designer/LabelDefinePane.java | 2 +- .../ui/designer/NumberEditorDefinePane.java | 2 +- .../designer/TextFieldEditorDefinePane.java | 2 +- .../designer/btn/ButtonGroupDefinePane.java | 2 +- .../WidgetThemeCreatorPaneAcceptor.java | 57 ++++++----------- .../WidgetThemeParaCreatorPaneAcceptor.java | 63 +++++++++---------- .../design/widget/ui/CheckBoxDefinePane.java | 2 +- .../widget/ui/FieldEditorDefinePane.java | 2 +- 16 files changed, 74 insertions(+), 90 deletions(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java b/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java index fed0ac4603..6a7edc36f8 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java +++ b/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayAction.java @@ -30,19 +30,19 @@ public class WidgetThemeDisplayAction> extends JTempla @Override public void actionPerformed(ActionEvent e) { - final T jwb = getEditingComponent(); - if (jwb == null) { + final T jTemplate = getEditingComponent(); + if (jTemplate == null) { return; } - BaseBook wbTpl = jwb.getTarget(); - WidgetDisplayEnhanceMarkAttr attr = WidgetThemeDesignerUtils.getStrongestControlAttrFromTemplate(wbTpl); + BaseBook baseBook = jTemplate.getTarget(); + WidgetDisplayEnhanceMarkAttr attr = WidgetThemeDesignerUtils.getStrongestControlAttrFromTemplate(baseBook); final WidgetThemeDisplayConfigPane configPane = new WidgetThemeDisplayConfigPane(); configPane.populate(attr); configPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override public void doOk() { - wbTpl.addAttrMark(configPane.update()); - jwb.fireTargetModified(); + baseBook.addAttrMark(configPane.update()); + jTemplate.fireTargetModified(); HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().activeOldJTemplate(); } }).setVisible(true); diff --git a/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java b/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java index f424da8183..ad96c00a9f 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/designer/WidgetThemeDisplayConfigPane.java @@ -67,9 +67,15 @@ public class WidgetThemeDisplayConfigPane extends BasicPane { WidgetDisplayEnhanceMarkAttr attr = new WidgetDisplayEnhanceMarkAttr(); attr.setWidgetEnhance(widgetEnhance.isSelected()); if (widgetEnhance.isSelected()) { - //埋点信息 + collectWidgetDisplayEnhanceRecord(); } return attr; } + /** + * 记录埋点信息,具体实现在云端运维插件,这里只作为切入点 + */ + private void collectWidgetDisplayEnhanceRecord() { + //记录埋点 + } } diff --git a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java index c4331a74c2..c0252746e0 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java @@ -204,7 +204,7 @@ public class RootDesignDefinePane extends AbstractDataModify { private void refreshExtraAdvancedPane() { extraPaneList.clear(); backgroundPane.removeAll(); - new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); + WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { if (!provider.accept(creator)) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/btn/AbstractExtraButtonPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/btn/AbstractExtraButtonPane.java index bfc7cd58d2..bc6c38d184 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/btn/AbstractExtraButtonPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/btn/AbstractExtraButtonPane.java @@ -47,7 +47,7 @@ public abstract class AbstractExtraButtonPane extends ButtonWi */ protected void refreshExtraAdvancedPane(Class cls) { extraPaneList.clear(); - new WidgetThemeCreatorPaneAcceptor().accept(cls, extraPaneList); + WidgetThemeCreatorPaneAcceptor.accept(cls, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java index 89915e0fe7..49abb165e8 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java @@ -66,7 +66,7 @@ public abstract class ButtonDefinePane extends AbstractDataMod private void refreshAdvancedPane() { extraPaneList.clear(); - new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); + WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList); containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java index aea3d20a69..74477593e7 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java @@ -78,7 +78,7 @@ public class CheckBoxDefinePane extends AbstractDataModify { protected void refreshExtraAdvancedPane() { extraPaneList.clear(); - new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); + WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java index e256d5eade..453ea44c57 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DateEditorDefinePane.java @@ -100,7 +100,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane().accept(creator, extraPaneList); + WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java index 6d49a507a6..120042a1a6 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/DirectWriteEditorDefinePane.java @@ -68,7 +68,7 @@ public abstract class DirectWriteEditorDefinePane e protected void refreshExtraAdvancedPane() { extraPaneList.clear(); - new WidgetThemeParaCreatorPaneAcceptor().accept(creator, extraPaneList); + WidgetThemeParaCreatorPaneAcceptor.accept(creator, extraPaneList); boolean containsExtraPane = !CollectionUtils.isEmpty(extraPaneList); Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); for (WidgetAdvancedPaneProvider provider : providers) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java index aad06d2a23..6dfd880c37 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -111,7 +111,7 @@ public class LabelDefinePane extends AbstractDataModify