From b45cfc65f0a5ee58c030452a821feba38a6d6151 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 31 May 2022 14:43:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-72097=20=E8=A1=A8=E6=A0=BC=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E9=80=89=E4=B8=AD=E5=90=8E=E4=BC=9A=E5=8F=98=E6=88=90?= =?UTF-8?q?=E9=BB=91=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/settingpane/CellOtherSetPane.java | 51 ++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index eeaf8f920f..742629af01 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -421,25 +421,37 @@ public class CellOtherSetPane extends AbstractCellAttrPane { @Override public void itemStateChanged(ItemEvent e) { - Style elementStyle = cellElement.getStyle(); - FRFont frFont = elementStyle.getFRFont(); - if (showContent.getSelectedIndex() == 3) { - fileNamePane.setPreferredSize(new Dimension(100, 20)); - fileNameLayout.show(fileNamePane, "content"); - frFont = frFont.applyForeground(Color.blue); - frFont = frFont.applyUnderline(Constants.LINE_THIN); - } else { - fileNameLayout.show(fileNamePane, "none"); - fileNamePane.setPreferredSize(new Dimension(0, 0)); - frFont = frFont.applyForeground(Color.black); - frFont = frFont.applyUnderline(Constants.LINE_NONE); + if (e.getStateChange() == ItemEvent.SELECTED) { + if (showContent.getSelectedIndex() == 3) { + fileNamePane.setPreferredSize(new Dimension(100, 20)); + fileNameLayout.show(fileNamePane, "content"); + } else { + fileNameLayout.show(fileNamePane, "none"); + fileNamePane.setPreferredSize(new Dimension(0, 0)); + } + handleCellShowStyleChange(e); } - cellElement.setStyle(elementStyle.deriveFRFont(frFont)); } }); return fileNamePane; } + private void handleCellShowStyleChange(ItemEvent itemEvent) { + CellGUIAttr cellGUIAttr = getCellGUIAttr(); + int selectedIndex = showContent.getSelectedIndex(); + boolean showAsDownload = cellGUIAttr.isShowAsDownload(); + Style elementStyle = cellElement.getStyle(); + FRFont frFont = elementStyle.getFRFont(); + if (!showAsDownload && selectedIndex == 3) { + frFont = frFont.applyForeground(Color.blue); + frFont = frFont.applyUnderline(Constants.LINE_THIN); + } else if (showAsDownload && selectedIndex != 3) { + frFont = frFont.applyForeground(Color.black); + frFont = frFont.applyUnderline(Constants.LINE_NONE); + } + cellElement.setStyle(elementStyle.deriveFRFont(frFont)); + } + private void initAllNames() { defaultAutoRadioButton.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Follow_Paper_Settings")); @@ -475,15 +487,20 @@ public class CellOtherSetPane extends AbstractCellAttrPane { return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other"); } + private CellGUIAttr getCellGUIAttr() { + CellGUIAttr cellGUIAttr = cellElement.getCellGUIAttr(); + if (cellGUIAttr == null) { + cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR; + } + return cellGUIAttr; + } + @Override protected void populateBean() { this.currentPageFixedRowDataTipLabel.setText(" (" + Toolkit.i18nText("Fine-Design_Report_CellWrite_No_Page_Fixed_Row_Cell") + ")"); this.pageFixedRowDataCell = null; checkPageFixedRow(); - CellGUIAttr cellGUIAttr = cellElement.getCellGUIAttr(); - if (cellGUIAttr == null) { - cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR; - } + CellGUIAttr cellGUIAttr = getCellGUIAttr(); // 支持 跟随页面设置 选项 = 不在编辑表单中的报表块 && 不在大屏模板cpt组件中 boolean supportFollowTplDefine = !EastRegionContainerPane.getInstance().getCurrentMode().equals(EastRegionContainerPane.PropertyMode.FORM_REPORT) From f4b28447f43ff9b14c68a0c045560d268dea8a79 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 1 Jun 2022 15:10:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-72252=20LocalResourceProvider?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=9C=A811=E7=89=88=E6=9C=AC=E4=B8=8A?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/PreStartActivator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java b/designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java index 65cdc1c30d..fa795fb372 100644 --- a/designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java @@ -2,6 +2,7 @@ package com.fr.start.module; import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; +import com.fr.design.file.TemplateResourceManager; import com.fr.design.utils.DesignUtils; import com.fr.file.TmpFileUtils; import com.fr.general.CloudCenter; @@ -28,6 +29,9 @@ public class PreStartActivator extends Activator { // 创建监听服务 DesignUtils.createListeningServer(DesignUtils.getPort(), startFileSuffix()); + // 在插件引擎模块起来前 初始化下插件接口监听 + TemplateResourceManager.getResource(); + initLanguage(); }