From bffc93847ee3f5d78f624964fcb33a77d9ab7bfb Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 4 Jan 2023 11:52:25 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-87013=20=E8=AE=BE=E8=AE=A1=E5=99=A81?= =?UTF-8?q?1.0.11=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E4=BF=A1=E6=81=AF=E6=98=AF=E9=87=8D=E5=A4=8D=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/update/ui/dialog/UpdateMainDialog.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java index 1fa37f60f8..033e2cb07f 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java @@ -118,6 +118,8 @@ public class UpdateMainDialog extends UIDialog { private ArrayList updateInfoList; + private Set titleSet; + private boolean getUpdateInfoSuccess; private UpdateInfoCachePropertyManager cacheProperty; @@ -267,6 +269,7 @@ public class UpdateMainDialog extends UIDialog { String keyword = searchUpdateInfoKeyword.getText(); if (ComparatorUtils.equals(keyword, StringUtils.EMPTY) && getUpdateInfoSuccess) { updateInfoList.clear(); + titleSet.clear(); getUpdateInfo(keyword).execute(); } } @@ -281,6 +284,7 @@ public class UpdateMainDialog extends UIDialog { public void actionPerformed(ActionEvent e) { if (getUpdateInfoSuccess) { updateInfoList.clear(); + titleSet.clear(); getUpdateInfo(searchUpdateInfoKeyword.getText()).execute(); } } @@ -388,6 +392,7 @@ public class UpdateMainDialog extends UIDialog { private SwingWorker getUpdateInfo(final String keyword) { updateInfoList = new ArrayList<>(); + titleSet = new HashSet<>(); lastUpdateCacheTime = UpdateConstants.CHANGELOG_X_START; String cacheConfigPath = getUpdateCacheConfig(); cacheProperty = new UpdateInfoCachePropertyManager(StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres", cacheConfigPath)); @@ -489,6 +494,7 @@ public class UpdateMainDialog extends UIDialog { } } if (isValid(updateInfo, GeneralUtils.objectToString(curJarDate))) { + titleSet.add(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]); updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)}); } } @@ -501,7 +507,7 @@ public class UpdateMainDialog extends UIDialog { private boolean isValid(String[] updateInfo, String curJarDate) { - return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0; + return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0 && !titleSet.contains(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]); } private void updateCachedInfoFile(JSONArray jsonArray) throws Exception { @@ -561,6 +567,7 @@ public class UpdateMainDialog extends UIDialog { } Date curDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); if (isValid4GenerateInfo(updateTitle, GeneralUtils.objectToString(curDate), updateTimeStr)) { + titleSet.add(updateTitle); updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)}); } } @@ -568,7 +575,7 @@ public class UpdateMainDialog extends UIDialog { } private boolean isValid4GenerateInfo(String updateTitle, String curDate, String updateTimeStr) { - return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0; + return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0 && !titleSet.contains(updateTitle); } private boolean containsKeyword(String str, String keyword) { From 0a11d39fb414aa7ef3cb49bd0a892adc83bedd36 Mon Sep 17 00:00:00 2001 From: Yann Date: Wed, 4 Jan 2023 15:10:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-87576=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=90=8E=E4=BC=9A=E8=AE=A9fr=E5=8D=A1?= =?UTF-8?q?=E4=BD=8F=E3=80=82=E5=8F=AF=E7=A8=B3=E5=AE=9A=E5=A4=8D=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/BorderPane.java | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java index 6d62593935..d2a302ea01 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java @@ -265,34 +265,31 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse int lineStyle = currentLineCombo.getSelectedLineStyle(); Color lineColor = currentLineColorPane.getSelectObject(); CellBorderStyle cellBorderStyle = new CellBorderStyle(); - if (topToggleButton.isSelected()) { - cellBorderStyle.setTopColor(lineColor); + if (lineColor != null) { + if (topToggleButton.isSelected()) { + cellBorderStyle.setTopColor(lineColor); + } + if (bottomToggleButton.isSelected()) { + cellBorderStyle.setBottomColor(lineColor); + } + if (leftToggleButton.isSelected()) { + cellBorderStyle.setLeftColor(lineColor); + } + if (rightToggleButton.isSelected()) { + cellBorderStyle.setRightColor(lineColor); + } + if (verticalToggleButton.isSelected()) { + cellBorderStyle.setVerticalColor(lineColor); + } + if (horizontalToggleButton.isSelected()) { + cellBorderStyle.setHorizontalColor(lineColor); + } } cellBorderStyle.setTopStyle(topToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (bottomToggleButton.isSelected()) { - cellBorderStyle.setBottomColor(lineColor); - } cellBorderStyle.setBottomStyle(bottomToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (leftToggleButton.isSelected()) { - cellBorderStyle.setLeftColor(lineColor); - } cellBorderStyle.setLeftStyle(leftToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (rightToggleButton.isSelected()) { - cellBorderStyle.setRightColor(lineColor); - } cellBorderStyle.setRightStyle(rightToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (verticalToggleButton.isSelected()) { - cellBorderStyle.setVerticalColor(lineColor); - } cellBorderStyle.setVerticalStyle(verticalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); - - if (horizontalToggleButton.isSelected()) { - cellBorderStyle.setHorizontalColor(lineColor); - } cellBorderStyle.setHorizontalStyle(horizontalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE); outerToggleButton.setSelected(leftToggleButton.isSelected() && bottomToggleButton.isSelected() && rightToggleButton.isSelected() && topToggleButton.isSelected()); From 5430ede56d55f3878eb0aa32940fdc852203951c Mon Sep 17 00:00:00 2001 From: Starryi Date: Tue, 3 Jan 2023 15:37:55 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-86045=20FR11=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=81=87=E4=BF=9D=E5=AD=98-=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E5=86=85=E6=92=A4=E9=94=80=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E7=BC=96=E8=BE=91=E9=99=A4=E6=AD=A4=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E5=A4=96=E9=83=A8=E5=88=86=EF=BC=8C=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=20=E5=AE=9E=E9=99=85=E6=9C=AA=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 在报表块编辑模式下重置Form对象,比如setTarget,需要做些额外 的工作,才能确保新的target完全可用,主要是要确保散落 在formDesign中各处的对象,如selectedCreators等,要有新的 target对象保持一致,否则再回到表单编辑界面时,就不能通过 这些creators,对target对象进行修改了。 【改动思路】 将表单编辑界面的一些修改操作也放到报表块编辑模式场景下执行, 确保该更新的都能更新到 --- .../java/com/fr/design/mainframe/JForm.java | 88 ++++++++++--------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index e3162e9ef6..4e9c45ce44 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -6,8 +6,6 @@ import com.fr.base.Parameter; import com.fr.base.Releasable; import com.fr.base.extension.FileExtension; import com.fr.base.iofile.attr.ExtendSharableAttrMark; -import com.fr.base.theme.FineColorGather; -import com.fr.base.theme.FineColorManager; import com.fr.base.theme.FineColorSynchronizer; import com.fr.base.theme.FormTheme; import com.fr.base.theme.TemplateTheme; @@ -17,8 +15,8 @@ import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; -import com.fr.design.actions.FormMobileAttrAction; import com.fr.design.actions.FormECParallelCalAction; +import com.fr.design.actions.FormMobileAttrAction; import com.fr.design.actions.TemplateParameterAction; import com.fr.design.actions.core.WorkBookSupportable; import com.fr.design.actions.file.export.EmbeddedFormExportExportAction; @@ -56,8 +54,8 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECDesignerProvider; import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; -import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.ComponentShareUtil; +import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.template.info.JFormProcessInfo; import com.fr.design.mainframe.template.info.TemplateProcessInfo; import com.fr.design.mainframe.theme.dialog.TemplateThemeUsingDialog; @@ -71,7 +69,6 @@ import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.preview.FormPreview; import com.fr.design.preview.MobilePreview; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; -import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.gui.LayoutUtils; import com.fr.file.FILE; import com.fr.file.FILEChooserPane; @@ -110,7 +107,14 @@ import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.SwingConstants; import javax.swing.tree.TreePath; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Insets; +import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; @@ -1266,46 +1270,48 @@ public class JForm extends JTemplate implements BaseJForm