From 78ca28174bbecfbfb363a538b64d405022456049 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 18 May 2022 14:46:17 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-68422=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E5=AE=A2=E6=88=B7=E6=A8=A1=E6=9D=BF=EF=BC=8Cbody?= =?UTF-8?q?=E4=B8=8B=E6=94=BE=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97?= =?UTF-8?q?=EF=BC=8C=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97=E4=B8=8B?= =?UTF-8?q?tab=EF=BC=8C=E6=97=A7=E6=A8=A1=E5=BC=8F=E9=A2=84=E8=A7=88?= =?UTF-8?q?=EF=BC=8Ctab=E5=88=87=E6=8D=A2=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E6=8E=89=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E5=9D=97=E5=B0=B1=E6=AD=A3=E5=B8=B8=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/beans/models/ModelUtil.java | 2 +- .../fr/design/designer/creator/cardlayout/XWCardTagLayout.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java index 0f75896e1..dda70b96f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java @@ -18,7 +18,7 @@ import java.util.Set; /** * created by Harrison on 2020/06/05 **/ -abstract class ModelUtil { +public abstract class ModelUtil { public static void renameWidgetName(Form form, XCreator xCreator) { diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java index 010a38217..1bf00c234 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java @@ -9,6 +9,7 @@ import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRWCardTagLayoutAdapter; +import com.fr.design.designer.beans.models.ModelUtil; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; @@ -137,6 +138,8 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { WTabFitLayout fitLayout = new WTabFitLayout(widgetName, tabFitIndex, currentCard); fitLayout.setTabNameIndex(getTabNameIndex()); XWTabFitLayout tabFitLayout = new XWTabFitLayout(fitLayout, new Dimension()); + FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + ModelUtil.renameWidgetName(formDesigner.getTarget(), tabFitLayout); WCardTagLayout layout = (WCardTagLayout) this.toData(); if(!ComparatorUtils.equals(layout.getTemplateStyle().getStyle(), DefaultTemplateStyle.DEFAULT_TEMPLATE_STYLE)){ From 7b82a2c01b37d0b6d5dc9177e9c69081d4978091 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 6 May 2022 11:02:53 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-70387=20=E6=AC=A1=E7=AE=A1=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E8=BF=9E=E6=8E=A5=EF=BC=8C=E4=BC=9A=E7=9C=8B=E5=88=B0?= =?UTF-8?q?=E7=89=B9=E5=AE=9A=E7=9A=84=E6=B2=A1=E6=9C=89=E6=9D=83=E9=99=90?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/datapane/connect/ConnectionComboBoxPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java index c0e8ef023..81147d42d 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java @@ -204,7 +204,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel { if (StringUtils.isNotBlank(s)) { // 之前的写法有多线程问题,nameList异步尚未初始化完成的时候,这里可能无法匹配设置数据连接名称,导致DBTableDataPane打开后连接面板空白 // 这里的需求无非是设置上一次使用的数据连接,做个简单检查这个连接是否存在即可,存在就设置 - if (ConnectionConfig.getInstance().getConnection(s) != null) { + if (nameList.contains(s)) { this.setSelectedItem(s); } } From 182d70f604ada283eac66543e37ea6e347247c8b Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 20 May 2022 14:27:38 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-71957=20=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E5=88=9B=E5=BB=BA=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=90=8E=E6=8F=90=E7=A4=BA=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=9B=E5=BB=BA=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E6=97=A5=E5=BF=97=E6=9C=89=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 生成组件时需要使用组件名称作为文件名创建临时文件,而组件名称中可能 包含不合法字符,导致临时文件创建失败。虽然这种文件创建失败的情况 只会在特定操作系统上出现,但考虑到共享组件跨平台应用的可能性,因此 需要统一检查组件名称的合法性,以便在使用时能使用此名称创建文件。 若创建组件时名称非法,则给出提示。 【改动思路】 同上 【review建议】 --- .../com/fr/design/share/ui/generate/ShareMainPane.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java index ea5298cf2..6ec3fa61e 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java @@ -32,6 +32,7 @@ import com.fr.design.mainframe.share.ui.base.ui.PlaceHolderUI; import com.fr.design.mainframe.share.util.ShareUIUtils; import com.fr.design.share.effect.EffectItemGroup; import com.fr.design.share.utils.ShareDialogUtils; +import com.fr.file.FileCommonUtils; import com.fr.form.share.DefaultSharableWidget; import com.fr.form.share.bean.StyleThemeBean; import com.fr.form.share.constants.ShareComponentConstants; @@ -581,6 +582,15 @@ public class ShareMainPane extends JPanel { Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); return false; } + if (FileCommonUtils.isFileNameValid(name)) { + FineJOptionPane.showMessageDialog( + shareDialog, + Toolkit.i18nText("Fine-Design_Share_Generate_Failure_Illegal_Component_Name_Tip"), + Toolkit.i18nText("Fine-Design_Basic_Error"), + ERROR_MESSAGE, + UIManager.getIcon("OptionPane.errorIcon")); + return false; + } if (upload && StringUtils.isEmpty(content.getText())) { FineJOptionPane.showMessageDialog(shareDialog, Toolkit.i18nText("Fine-Design_Share_Lack_Content"), Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); From 76d77a6e9ee10449dc4d5836fa8c30d5ef3cb9a3 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 2 Jun 2022 10:19:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-72073=20alphafine,=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=8A=80=E5=B7=A7=E4=BA=A4=E4=BA=92=E6=95=88=E6=9E=9C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConstants.java | 4 +- .../alphafine/component/AlphaFineFrame.java | 59 ++++++++++++++++--- .../alphafine/images/light_yellow_bulb.svg | 4 ++ .../alphafine/images/yellow_bulb.svg | 4 ++ 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/yellow_bulb.svg diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index 9ceec2a2f..8de2a0d63 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -191,7 +191,9 @@ public class AlphaFineConstants { public static final Icon BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/bulb.svg"); - public static final Icon BLUE_BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/blue_bulb.svg"); + public static final Icon YELLOW_BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/yellow_bulb.svg"); + + public static final Icon LIGHT_YELLOW_BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg"); public static final String HOT_SEARCH = Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot_Search"); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index db89cf348..b6819f56c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -33,6 +33,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager import com.fr.design.mainframe.alphafine.search.manager.impl.ProductNewsSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager; import com.fr.design.utils.DesignUtils; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.stable.StringUtils; import java.awt.BorderLayout; @@ -66,8 +67,11 @@ import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; +import javax.swing.JPopupMenu; import javax.swing.SwingConstants; import javax.swing.Timer; +import javax.swing.event.PopupMenuEvent; +import javax.swing.event.PopupMenuListener; /** * @author hades @@ -241,13 +245,10 @@ public class AlphaFineFrame extends JFrame { topRightPane.setBackground(Color.WHITE); JPanel tipPane = new JPanel(new BorderLayout()); tipPane.setBackground(Color.WHITE); - String toolTip = AlphaFineShortCutUtil.getDisplayShortCut(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Short_Cut", DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortcuts())); tipIconLabel = new UILabel(AlphaFineConstants.BULB_ICON); tipIconLabel.addMouseListener(tipMouseListener); - tipIconLabel.setToolTipText(toolTip); useTipLabel = new UILabel(SKILLS); useTipLabel.addMouseListener(tipMouseListener); - useTipLabel.setToolTipText(toolTip); useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); tipPane.add(tipIconLabel, BorderLayout.WEST); tipPane.add(useTipLabel, BorderLayout.CENTER); @@ -264,19 +265,63 @@ public class AlphaFineFrame extends JFrame { private MouseAdapter tipMouseListener = new MouseAdapter() { + private JPopupMenu popupMenu; + @Override public void mouseEntered(MouseEvent e) { - useTipLabel.setForeground(UIConstants.FLESH_BLUE); - tipIconLabel.setIcon(AlphaFineConstants.BLUE_BULB_ICON); + tipIconLabel.setIcon(AlphaFineConstants.YELLOW_BULB_ICON); } @Override public void mouseExited(MouseEvent e) { - useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); - tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON); + if (popupMenu == null || !popupMenu.isShowing()) { + useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); + tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON); + } + } + + @Override + public void mousePressed(MouseEvent e) { + useTipLabel.setForeground(UIConstants.FLESH_BLUE); + tipIconLabel.setIcon(AlphaFineConstants.LIGHT_YELLOW_BULB_ICON); + popupMenu = createTipPop(); + GUICoreUtils.showPopupMenu(popupMenu, e.getComponent(), e.getComponent().getX() - 60, e.getComponent().getY() + 20); } }; + + private JPopupMenu createTipPop() { + JPanel panel = new JPanel(new BorderLayout()); + String toolTip = AlphaFineShortCutUtil.getDisplayShortCut(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Short_Cut", DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortcuts())); + UILabel label = new UILabel(toolTip); + label.setForeground(AlphaFineConstants.FOREGROUND_COLOR_8); + label.setBackground(Color.WHITE); + panel.add(label); + panel.setBackground(Color.WHITE); + JPopupMenu popupMenu = new JPopupMenu(); + popupMenu.setBorder(BorderFactory.createEmptyBorder(20, 5, 10, 5)); + popupMenu.add(panel); + popupMenu.setBackground(Color.WHITE); + popupMenu.addPopupMenuListener(new PopupMenuListener() { + @Override + public void popupMenuWillBecomeVisible(PopupMenuEvent e) { + // do nothing + } + + @Override + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6); + tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON); + } + + @Override + public void popupMenuCanceled(PopupMenuEvent e) { + // do nothing + } + }); + return popupMenu; + } + private JPanel createSearchPane() { JPanel searchPane = new JPanel(new BorderLayout()); searchPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20)); diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg new file mode 100644 index 000000000..16608753f --- /dev/null +++ b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg @@ -0,0 +1,4 @@ + + + + diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/yellow_bulb.svg b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/yellow_bulb.svg new file mode 100644 index 000000000..cabda1d9d --- /dev/null +++ b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/yellow_bulb.svg @@ -0,0 +1,4 @@ + + + + From f14699bce62ff12c722f43a340c754563a4ba9c8 Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 7 Jun 2022 11:27:34 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-71957=20=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E5=88=9B=E5=BB=BA=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=90=8E=E6=8F=90=E7=A4=BA=E5=85=B1=E4=BA=AB?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=9B=E5=BB=BA=E5=A4=B1=E8=B4=A5=EF=BC=8C?= =?UTF-8?q?=E4=B8=94=E6=97=A5=E5=BF=97=E6=9C=89=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 生成组件时需要使用组件名称作为文件名创建临时文件,而组件名称中可能 包含不合法字符,导致临时文件创建失败。虽然这种文件创建失败的情况 只会在特定操作系统上出现,但考虑到共享组件跨平台应用的可能性,因此 需要统一检查组件名称的合法性,以便在使用时能使用此名称创建文件。 若创建组件时名称非法,则给出提示。 【改动思路】 同上 【review建议】 --- .../java/com/fr/design/share/ui/generate/ShareMainPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java index 6ec3fa61e..550f0a0c0 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java @@ -582,7 +582,7 @@ public class ShareMainPane extends JPanel { Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); return false; } - if (FileCommonUtils.isFileNameValid(name)) { + if (!FileCommonUtils.isFileNameValid(name)) { FineJOptionPane.showMessageDialog( shareDialog, Toolkit.i18nText("Fine-Design_Share_Generate_Failure_Illegal_Component_Name_Tip"), From c93bd63727dc828920d2fe8b52717f237bb311c0 Mon Sep 17 00:00:00 2001 From: "Bruce.Deng" Date: Wed, 8 Jun 2022 15:51:33 +0800 Subject: [PATCH 6/6] =?UTF-8?q?REPORT-72769=20=E5=AF=BC=E5=87=BA=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6-=E5=B7=B2=E5=88=A0=E9=99=A4=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=AF=BC=E5=87=BA=E6=A8=A1=E6=9D=BF=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=BC=9A=E5=9C=A8=E5=86=8D=E6=AC=A1=E6=96=B0=E5=A2=9E=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=AD=98=E5=9C=A8=E6=AE=8B=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/javascript/ExportJavaScriptPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java index 460e838c5..b58dd6f65 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java @@ -279,8 +279,8 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane