From dca702f558ac454ed087dc9b695fa4dcd1f3eda9 Mon Sep 17 00:00:00 2001 From: Harrison Date: Mon, 7 Nov 2022 09:28:46 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20REPORT-82928=E3=80=90=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E9=AA=8C=E6=94=B6=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=B5=B7=E5=A7=8B=E9=A1=B5=20debug=20=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E6=BA=90=E7=A0=81=E3=80=82=E5=A4=84=E7=90=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E8=AF=A6=E8=A7=81=EF=BC=9Ahttps://kms.fineres.com/?= =?UTF-8?q?pages/viewpage.action=3FpageId=3D572293771?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../startup/ui/StartupPageWorkspacePanel.java | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java index ced2aa3767..923a12292c 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java @@ -4,6 +4,7 @@ import com.fr.base.svg.IconUtils; import com.fr.design.components.tooltip.ModernToolTip; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.FRGraphics2D; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.ColorUtils; @@ -17,6 +18,8 @@ import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JToolTip; +import javax.swing.JViewport; +import javax.swing.RepaintManager; import javax.swing.ScrollPaneConstants; import javax.swing.border.EmptyBorder; import java.awt.BasicStroke; @@ -28,9 +31,11 @@ import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GridLayout; +import java.awt.Image; import java.awt.RenderingHints; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.image.ImageObserver; import java.util.List; import java.util.concurrent.atomic.AtomicReference; @@ -127,9 +132,15 @@ public class StartupPageWorkspacePanel extends JPanel { this.contentPanel = generateUnLimitContentPanel(this.partitions); this.add(contentPanel, BorderLayout.NORTH); } - private JComponent generateUnLimitContentPanel(List> partitions) { + JComponent panel = generateUnLimitContentPanel0(partitions); + ColorUtils.transparentBackground(panel); + return panel; + } + + private JComponent generateUnLimitContentPanel0(List> partitions) { + JPanel workspaceDescWrapper = new JPanel(); workspaceDescWrapper.setLayout(new BorderLayout(0, 0)); workspaceDescWrapper.setBorder(new EmptyBorder(0, 0, 0, 0)); @@ -144,14 +155,20 @@ public class StartupPageWorkspacePanel extends JPanel { if (needScroll) { // 滚动条 UIScrollPane scrollPane = new UIScrollPane(workspaceDescPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + JViewport viewport = scrollPane.getViewport(); + JViewport scrollViewport = new TransparentScrollViewPort(); + // 动态画图 + scrollViewport.addChangeListener(e -> repaintAll()); + scrollViewport.setView(viewport.getView()); + scrollPane.setViewport(scrollViewport); scrollPane.setBorder(new EmptyBorder(10, 0, 0, 0)); scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, SCROLL_HEIGHT)); workspaceDescWrapper.add(scrollPane, BorderLayout.CENTER); + return workspaceDescWrapper; } workspaceDescWrapper.add(workspaceDescPanel, BorderLayout.CENTER); - ColorUtils.transparentBackground(workspaceDescWrapper); return workspaceDescWrapper; } @@ -580,4 +597,27 @@ public class StartupPageWorkspacePanel extends JPanel { this.getRootPane().repaint(); } + + /** + * 支持透明的滚动视图 + */ + private class TransparentScrollViewPort extends JViewport { + + /** + * 从而屏蔽掉 {@link RepaintManager.PaintManager#paintDoubleBuffered(JComponent, Image, Graphics, int, int, int, int)} + * + * @return 创建一个不会实际画图的 Graphics + */ + @Override + public Graphics getGraphics() { + + Graphics graphics = super.getGraphics(); + return new FRGraphics2D((Graphics2D) graphics) { + @Override + public boolean drawImage(Image img, int x, int y, ImageObserver observer) { + return true; + } + }; + } + } } From 465c5b6388b31d6182235532f63d9e3a55b9c06c Mon Sep 17 00:00:00 2001 From: Yann Date: Mon, 7 Nov 2022 10:26:51 +0800 Subject: [PATCH 2/7] =?UTF-8?q?REPORT-81039=20FR11=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=93=B6=E8=A1=8C=E5=B7=A5=E4=BD=9C=E5=B9=B3=E5=8F=B0=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8Cfrm=E8=AE=BE=E8=AE=A1=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E6=8B=96=E5=85=A5=E6=8F=92=E4=BB=B6=E6=8E=A7=E4=BB=B6=20?= =?UTF-8?q?=E5=8F=8C=E5=87=BB=EF=BC=8C=E5=81=B6=E7=8E=B0=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B9=E5=8F=98=E4=B8=BA=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E8=AE=BE=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/style/series/ColorPickerPaneNumFiled.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java index fcaed6d990..12ab30b558 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java @@ -6,6 +6,7 @@ import com.fr.module.ModuleContext; import com.fr.value.ClearableLazyValue; import org.jetbrains.annotations.NotNull; +import javax.swing.*; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @@ -32,12 +33,9 @@ public class ColorPickerPaneNumFiled extends UINumberField { @Override protected void attributeChange() { - ses.getValue().schedule(new Runnable() { - @Override - public void run() { - // kuns: 默认修改500, 在地图修改系列颜色text时, 快速响应. - runChange(); - } + ses.getValue().schedule(() -> { + // kuns: 默认修改500, 在地图修改系列颜色text时, 快速响应. + SwingUtilities.invokeLater(this::runChange); }, 500, TimeUnit.MILLISECONDS); } From 4f54af4c9a8abba370b5eaa1871a020471591432 Mon Sep 17 00:00:00 2001 From: Yann Date: Mon, 7 Nov 2022 10:31:10 +0800 Subject: [PATCH 3/7] =?UTF-8?q?REPORT-81039=20FR11=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=93=B6=E8=A1=8C=E5=B7=A5=E4=BD=9C=E5=B9=B3=E5=8F=B0=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8Cfrm=E8=AE=BE=E8=AE=A1=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E6=8B=96=E5=85=A5=E6=8F=92=E4=BB=B6=E6=8E=A7=E4=BB=B6=20?= =?UTF-8?q?=E5=8F=8C=E5=87=BB=EF=BC=8C=E5=81=B6=E7=8E=B0=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=A1=B9=E5=8F=98=E4=B8=BA=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=E8=AE=BE=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/series/ColorPickerPaneNumFiled.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java index 12ab30b558..7ab5058f7e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/ColorPickerPaneNumFiled.java @@ -6,7 +6,7 @@ import com.fr.module.ModuleContext; import com.fr.value.ClearableLazyValue; import org.jetbrains.annotations.NotNull; -import javax.swing.*; +import javax.swing.SwingUtilities; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; From 4e3c7e01ed9f2f809d4d6dece1f351facb0356f3 Mon Sep 17 00:00:00 2001 From: Harrison Date: Mon, 7 Nov 2022 10:33:18 +0800 Subject: [PATCH 4/7] =?UTF-8?q?REPORT-80211=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E4=BF=AE=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87?= =?UTF-8?q?=EF=BC=8C=E5=90=AF=E5=8A=A8=E9=A1=B5=E8=BF=9B=E5=85=A5=E5=90=8E?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=9C=89=E8=AF=AF=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E9=95=BF=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/com/fr/design/i18n/dimension_en.properties | 1 + .../main/resources/com/fr/design/i18n/dimension_ja_JP.properties | 1 + .../main/resources/com/fr/design/i18n/dimension_ko_KR.properties | 1 + .../main/resources/com/fr/design/i18n/dimension_zh_TW.properties | 1 + 4 files changed, 4 insertions(+) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties index 0205e6ea2b..d1f8ee17b2 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties @@ -15,6 +15,7 @@ com.fr.design.report.fit.firstColumn=120*20 com.fr.design.report.fit.column=160*20 com.fr.design.lock.LockInfoDialog=500*180 com.fr.design.mainframe.ForbiddenPane.refreshButton=75*24 +com.fr.start.common.DesignerOpenEmptyPanel.createButton=120*24 com.fr.design.cell.expand.sort.pane=257*185 com.fr.design.sort.rule.item=125*20 com.fr.design.ds.column.sort.pane=250*180 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 9b143294f3..48164621c7 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -14,6 +14,7 @@ com.fr.design.report.fit.firstColumn=170*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=500*180 com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 +com.fr.start.common.DesignerOpenEmptyPanel.createButton=120*24 com.fr.design.cell.expand.sort.pane=257*170 com.fr.design.sort.rule.item=125*20 com.fr.design.ds.column.sort.pane=250*165 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties index e0f0130224..4e8b3f9cdb 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties @@ -14,6 +14,7 @@ com.fr.design.report.fit.firstColumn=130*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=500*180 com.fr.design.mainframe.ForbiddenPane.refreshButton=80*24 +com.fr.start.common.DesignerOpenEmptyPanel.createButton=70*24 com.fr.design.cell.expand.sort.pane=267*165 com.fr.design.sort.rule.item=125*20 com.fr.design.ds.column.sort.pane=250*180 diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties index c00c2b8a9a..82f86a3a43 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties @@ -14,6 +14,7 @@ com.fr.design.report.fit.firstColumn=80*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=400*180 com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 +com.fr.start.common.DesignerOpenEmptyPanel.createButton=70*24 com.fr.design.cell.expand.sort.pane=227*155 com.fr.design.sort.rule.item=80*20 com.fr.design.ds.column.sort.pane=220*150 From b877e9d9344b902912627f3ab64b3d0beeb4664e Mon Sep 17 00:00:00 2001 From: Harrison Date: Mon, 7 Nov 2022 10:35:49 +0800 Subject: [PATCH 5/7] =?UTF-8?q?refactor:=20=E5=8F=98=E6=9B=B4=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../startup/ui/StartupPageWorkspacePanel.java | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java index 923a12292c..3cd6b78773 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWorkspacePanel.java @@ -153,25 +153,31 @@ public class StartupPageWorkspacePanel extends JPanel { } boolean needScroll = partitions.size() > 4; if (needScroll) { - // 滚动条 - UIScrollPane scrollPane = new UIScrollPane(workspaceDescPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - JViewport viewport = scrollPane.getViewport(); - JViewport scrollViewport = new TransparentScrollViewPort(); - // 动态画图 - scrollViewport.addChangeListener(e -> repaintAll()); - scrollViewport.setView(viewport.getView()); - scrollPane.setViewport(scrollViewport); - scrollPane.setBorder(new EmptyBorder(10, 0, 0, 0)); - scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, SCROLL_HEIGHT)); - workspaceDescWrapper.add(scrollPane, BorderLayout.CENTER); - - return workspaceDescWrapper; + return generateScrollUnLimitContentPanel(workspaceDescWrapper, workspaceDescPanel); } workspaceDescWrapper.add(workspaceDescPanel, BorderLayout.CENTER); return workspaceDescWrapper; } + @NotNull + private JPanel generateScrollUnLimitContentPanel(JPanel workspaceDescWrapper, JPanel workspaceDescPanel) { + + // 滚动条 + UIScrollPane scrollPane = new UIScrollPane(workspaceDescPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + JViewport viewport = scrollPane.getViewport(); + JViewport scrollViewport = new TransparentScrollViewPort(); + // 动态画图 + scrollViewport.addChangeListener(e -> repaintAll()); + scrollViewport.setView(viewport.getView()); + scrollPane.setViewport(scrollViewport); + scrollPane.setBorder(new EmptyBorder(10, 0, 0, 0)); + scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, SCROLL_HEIGHT)); + workspaceDescWrapper.add(scrollPane, BorderLayout.CENTER); + + return workspaceDescWrapper; + } + private JPanel generateLimitContentPanel(List> partitions) { JPanel workspaceDescPanel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEFT, 0, 0); From 33bc64393c75547b979f5d2889e4d84217b2c86f Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 7 Nov 2022 14:48:59 +0800 Subject: [PATCH 6/7] =?UTF-8?q?REPORT-80695=20=E6=A8=A1=E6=9D=BF=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=BA=A7=E5=88=AB=E6=9F=A5=E6=89=BE=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=BA=8C=E6=9C=9F=20=E5=85=88=E5=81=9C=E7=94=A8=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/replace/ui/ITReplaceMainDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java index dd01157a75..e5ba60f703 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java @@ -138,7 +138,7 @@ public class ITReplaceMainDialog extends UIDialog { southPanel = new ITReplaceSouthPanel(); westPanel = new ITReplaceWestPanel(); - initCloseListener(); + //initCloseListener(); northPane.fitScreen(0, 0, jTemplate.getWidth()); JPanel center = new JPanel(new BorderLayout()); From 93b763f09bffb4cfac25d44c937bcc34a3831227 Mon Sep 17 00:00:00 2001 From: Harrison Date: Mon, 7 Nov 2022 20:05:48 +0800 Subject: [PATCH 7/7] =?UTF-8?q?REPORT-80211=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E4=BF=AE=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87?= =?UTF-8?q?=EF=BC=8C=E5=90=AF=E5=8A=A8=E9=A1=B5=E8=BF=9B=E5=85=A5=E5=90=8E?= =?UTF-8?q?=E9=99=90=E5=88=B6=E6=9C=89=E8=AF=AF=20=E6=97=A5=E6=96=87?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=80=E4=B8=8B=EF=BC=8C=E7=BC=A9=E7=9F=AD?= =?UTF-8?q?=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/i18n/dimension_ja_JP.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties index 48164621c7..a5b3a03fe6 100644 --- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties +++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties @@ -14,7 +14,7 @@ com.fr.design.report.fit.firstColumn=170*20 com.fr.design.report.fit.column=100*20 com.fr.design.lock.LockInfoDialog=500*180 com.fr.design.mainframe.ForbiddenPane.refreshButton=68*24 -com.fr.start.common.DesignerOpenEmptyPanel.createButton=120*24 +com.fr.start.common.DesignerOpenEmptyPanel.createButton=70*24 com.fr.design.cell.expand.sort.pane=257*170 com.fr.design.sort.rule.item=125*20 com.fr.design.ds.column.sort.pane=250*165