From 6ab7a6ee156cd438a1c37a91116c6757e8c4fbfe Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Mon, 26 Jul 2021 16:11:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-54183=20=E5=8A=A0=E5=AF=86=E7=9A=84?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=E7=BB=84=E4=BB=B6=E6=97=A0=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=BB=84=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormWidgetDefinePaneFactoryBase.java | 4 +++ .../com/fr/design/share/SharableManager.java | 33 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java b/designer-form/src/main/java/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java index e6217dbf02..9b1097d37a 100644 --- a/designer-form/src/main/java/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java +++ b/designer-form/src/main/java/com/fr/design/widget/FormWidgetDefinePaneFactoryBase.java @@ -132,6 +132,10 @@ public class FormWidgetDefinePaneFactoryBase { defineMap.put(widget, appearance); } + public static Appearance getDefinePane(Class widget) { + return defineMap.get(widget); + } + public static RN createWidgetDefinePane(XCreator creator, FormDesigner designer, Widget widget, Operator operator) { if (isExtraXWidget(widget)) { WidgetDefinePane widgetDefinePane = new WidgetDefinePane(creator, designer); diff --git a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java index b84349be40..271625edc1 100644 --- a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java +++ b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java @@ -10,14 +10,21 @@ import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.collect.SharableCollectorManager; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler; -import com.fr.design.mainframe.share.ui.block.LocalWidgetBlock; import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; import com.fr.design.mainframe.share.util.ShareComponentUtils; import com.fr.design.share.utils.EffectItemUtils; -import com.fr.form.share.ShareLoader; +import com.fr.design.widget.FormWidgetDefinePaneFactoryBase; +import com.fr.form.share.encrypt.engine.ClazzCreatorFactory; +import com.fr.form.ui.AbstractBorderStyleWidget; +import com.fr.form.ui.ElementCaseEditor; +import com.fr.form.ui.Widget; +import com.fr.form.ui.container.WAbsoluteLayout; +import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.general.GeneralContext; import com.fr.json.JSONArray; import com.fr.stable.EnvChangedListener; +import com.fr.stable.bridge.BridgeMark; +import com.fr.stable.bridge.StableFactory; import java.util.List; @@ -27,6 +34,7 @@ public class SharableManager { listenEnv(); ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance()); + registerSharableEncryptDefinePanes(); } public static void saveTemplate(JTemplate jt) { @@ -61,4 +69,25 @@ public class SharableManager { } }); } + + private static void registerSharableEncryptDefinePane(Class mainClazz) { + String newClazzName = ClazzCreatorFactory.getInstance().createName(mainClazz); + Class newClazz; + try { + newClazz = (Class) Class.forName(newClazzName, false, mainClazz.getClassLoader()); + } catch (Exception e) { + newClazz = (Class) ClazzCreatorFactory.getInstance().newSharableClazz(mainClazz.getClassLoader(), mainClazz); + } + if (FormWidgetDefinePaneFactoryBase.getDefinePane(newClazz) == null) { + FormWidgetDefinePaneFactoryBase.registerDefinePane(newClazz, FormWidgetDefinePaneFactoryBase.getDefinePane(mainClazz)); + } + + } + + private static void registerSharableEncryptDefinePanes() { + registerSharableEncryptDefinePane(ElementCaseEditor.class); + registerSharableEncryptDefinePane(StableFactory.getMarkedClass(BridgeMark.CHART_EDITOR, AbstractBorderStyleWidget.class)); + registerSharableEncryptDefinePane(WAbsoluteLayout.class); + registerSharableEncryptDefinePane(WCardMainBorderLayout.class); + } } From d56fc70ef5104bace16c9a1241e8f7f16b951707 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 26 Jul 2021 16:41:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-55800=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=20=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E7=BB=84=E4=BB=B6=E6=A0=91=E6=9C=80=E7=BB=88=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=BB=84=E4=BB=B6=E4=B8=8E=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=A0=8F=E7=9A=84=E7=BB=84=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E5=90=8C=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/ComponentTree.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java b/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java index f9a9440916..0f39f089f8 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/ComponentTree.java @@ -411,6 +411,11 @@ public class ComponentTree extends JTree { if (e.isControlDown() || e.isShiftDown()) { return; } + XCreator currentCreator = designer.getSelectionModel().getSelection().getSelectedCreator(); + // 以当前选中的为准 + if (currentCreator != selectedCreator) { + selectedCreator = currentCreator; + } if (e.getButton() == MouseEvent.BUTTON1 && selectedCreator != null) { showSelectedPopup(selectedCreator); } From 76f76a891515ea9b3b5b430507146e0752c09ee1 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 26 Jul 2021 16:41:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-55757=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-=E6=A0=87=E9=A2=98=E5=9B=BE=E6=A1=88?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=9B=BE=EF=BC=8C=E6=82=AC=E6=B5=AE=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E9=81=AE=E7=BD=A9=E5=92=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=9B=BE=E6=A0=87=EF=BC=8C=E9=BC=A0=E6=A0=87=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E4=BB=8E=E5=B7=A6=E8=BE=B9/=E4=B8=8A=E8=BE=B9?= =?UTF-8?q?=E6=BB=91=E5=87=BA=EF=BC=8C=E5=88=99=E5=88=A0=E9=99=A4=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=B6=88=E5=A4=B1=EF=BC=9B=E4=BD=86=E4=BB=8E=E5=8F=B3?= =?UTF-8?q?=E8=BE=B9/=E4=B8=8B=E8=BE=B9=E6=BB=91=E5=87=BA=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9B=BE=E6=A0=87=E8=BF=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 不需要在mouseExited里加多余的判断 【改动思路】 同上 --- .../com/fr/design/gui/xpane/TitleInsetImagePane.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/TitleInsetImagePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/TitleInsetImagePane.java index 48d1028e64..2573f6adfa 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/TitleInsetImagePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/TitleInsetImagePane.java @@ -115,13 +115,9 @@ public class TitleInsetImagePane extends JPanel implements UIObserver { @Override public void mouseExited(MouseEvent e) { super.mouseExited(e); - int x = e.getX(); - int y = e.getY(); - if (x <= 0 || getWidth() <= x || y <= 0 || y >= getHeight()) { - imagePreviewOverlayPane.setVisible(false); - imageDeleteButton.setVisible(false); - imageDeleteButton.setEnabled(false); - } + imagePreviewOverlayPane.setVisible(false); + imageDeleteButton.setVisible(false); + imageDeleteButton.setEnabled(false); } });