From 66b7fe2181e29f044833a7cc9cb511db50ebd333 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 5 Nov 2021 16:57:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?CHART-21737=20fix:=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84=E5=9B=BE=E8=A1=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=20=E8=AE=BE=E7=BD=AE=E7=AC=AC=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E9=85=8D=E8=89=B2=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/designer/component/VanChartFillStylePane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFillStylePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFillStylePane.java index 42e33b89ca..3f7374c34d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFillStylePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFillStylePane.java @@ -6,6 +6,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerBean; import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.mainframe.predefined.ui.detail.ColorFillStylePane; import com.fr.design.utils.gui.GUICoreUtils; @@ -63,7 +64,7 @@ public class VanChartFillStylePane extends ColorFillStylePane implements Designe } public void updateBean(AttrFillStyle attrFillStyle) { - if (getStyleSelectBox().getSelectedIndex() == 0) { + if (getStyleSelectBox().getSelectedIndex() == 0 && ChartEditContext.supportTheme()) { attrFillStyle.setThemed(true); return; } From ea5a6fc9bb07069d0b0fb8683bc5d9d6ca0beff4 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 8 Nov 2021 14:46:51 +0800 Subject: [PATCH 2/5] =?UTF-8?q?CHART-21570=20=E9=80=82=E9=85=8D11.0=20?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84cpt?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20=E4=B8=8D=E6=94=AF=E6=8C=81=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utils/gui/AdjustWorkBookDefaultStyleUtils.java | 11 +++++++++++ .../mainframe/cell/settingpane/style/StylePane.java | 6 +++++- .../java/com/fr/design/report/ReportStylePane.java | 6 +++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java index abae997e39..aa2178ece0 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java @@ -43,4 +43,15 @@ public class AdjustWorkBookDefaultStyleUtils { return DesignModeContext.isDuchampMode() ? TEMPLATE_BACKGROUND : color; } + /** + * cpt模板是否支持跟随主题选项 + * 单元格样式 + * 悬浮元素样式 + * 纸张背景入口大屏模板屏蔽掉了 忽略 + * @return 大屏模板中cpt组件不支持 + */ + public static boolean supportTheme() { + return !DesignModeContext.isDuchampMode(); + } + } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java index bad6e6b6a6..84c0c12b43 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/style/StylePane.java @@ -13,6 +13,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; @@ -38,6 +39,7 @@ public class StylePane extends BasicPane implements UIObserver { public static final int DEFAULT_SELECTED_INDEX = 0; private final UIButtonGroup followingThemeButtonGroup; + private JPanel followingThemePane; private final CustomStylePane customStylePane; private final ThemedCellStyleListPane themedCellStyleListPane; private final CardLayout cardLayout; @@ -64,7 +66,7 @@ public class StylePane extends BasicPane implements UIObserver { private void initializePane() { setLayout(new BorderLayout(0, IntervalConstants.INTERVAL_L1)); - add(createFollowingThemePane(), BorderLayout.NORTH); + add(followingThemePane = createFollowingThemePane(), BorderLayout.NORTH); contentPane = createTabbedContentPane(); add(contentPane, BorderLayout.CENTER); } @@ -226,6 +228,8 @@ public class StylePane extends BasicPane implements UIObserver { setSelectedIndex(1); customStylePane.populateBean(style); } + //单元格配置界面是单例 所以直接在populate的时候把跟随主题的按钮组设置不可见 + followingThemePane.setVisible(AdjustWorkBookDefaultStyleUtils.supportTheme()); } private void fireStateChanged() { diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java b/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java index fc4b5a116c..e16af5e3d3 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportStylePane.java @@ -27,6 +27,7 @@ import com.fr.design.style.BorderUtils; import com.fr.design.style.FRFontPane; import com.fr.design.style.FormatPane; import com.fr.design.style.background.BackgroundPane; +import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils; import com.fr.general.FRFont; import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; @@ -66,6 +67,7 @@ public class ReportStylePane extends BasicPane { private final CellStylePreviewPane previewArea; private final UIButtonGroup followingThemeButtonGroup; + private JPanel followingThemePane; private final CustomFloatStyleSettingPane customStylePane; private final ThemedFloatStyleSettingPane themedFloatStyleSettingPane; private final CardLayout cardLayout; @@ -106,7 +108,7 @@ public class ReportStylePane extends BasicPane { add(createPreviewPane(), BorderLayout.NORTH); JPanel settingContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); - JPanel followingThemePane = createFollowingThemePane(); + followingThemePane = createFollowingThemePane(); followingThemePane.setBorder(BorderFactory.createEmptyBorder(20, 0, 10, 0)); settingContainer.add(followingThemePane, BorderLayout.NORTH); settingContainer.add(contentPane, BorderLayout.CENTER); @@ -319,6 +321,8 @@ public class ReportStylePane extends BasicPane { setSelectedIndex(1); customStylePane.populateBean(style); } + + followingThemePane.setVisible(AdjustWorkBookDefaultStyleUtils.supportTheme()); } public void updatePreviewArea() { From ee2191b929a59dc84908d821dca0a451c29344a1 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 8 Nov 2021 15:00:24 +0800 Subject: [PATCH 3/5] =?UTF-8?q?CHART-21570=20=E5=A4=A7=E5=B1=8F=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=20cpt=E7=BB=84=E4=BB=B6=E4=B8=AD=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E4=B9=9F=E4=B8=8D=E6=94=AF=E6=8C=81=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/mode/ChartEditContext.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java b/designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java index 56345aeda9..51fe2f816a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.chart.mode; import com.fr.common.annotations.Open; +import com.fr.design.base.mode.DesignModeContext; /** * @author shine @@ -27,9 +28,9 @@ public class ChartEditContext { /** * 是否支持 主题样式 设置 * - * @return duchamp大屏模板模式 不支持 + * @return duchamp大屏模板模式 不支持 图表组件&cpt组件中的图表 都不支持 */ public static boolean supportTheme() { - return !duchampMode(); + return !DesignModeContext.isDuchampMode(); } } From 23d23642c3f7c0f49fc901049e3ac45d0b21857e Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 8 Nov 2021 19:56:48 +0800 Subject: [PATCH 4/5] =?UTF-8?q?CHART-21570=20=E5=A4=A7=E5=B1=8F=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=E7=9A=84=E5=9B=BE=E8=A1=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/chart/ChartTypePane.java | 10 ++++++++-- .../type/AbstractVanChartTypePane.java | 4 ++++ .../chart/map/designer/type/GisLayerPane.java | 19 +++++++++++++++---- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java index d31cd32088..0337fff442 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java @@ -11,8 +11,10 @@ import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.chart.info.ChartInfoCollector; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.log.FineLoggerFactory; +import com.fr.plugin.chart.vanchart.VanChart; import javax.swing.BorderFactory; import javax.swing.DefaultListCellRenderer; @@ -23,10 +25,10 @@ import javax.swing.JSplitPane; import javax.swing.ListCellRenderer; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import java.awt.Color; import java.awt.Component; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; public class ChartTypePane extends ChartCommonWizardPane implements CallbackEvent { private static final long serialVersionUID = -1175602484968520546L; @@ -153,6 +155,10 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven } } + if (!ChartEditContext.supportTheme() && chart4Update instanceof VanChart) { + ((VanChart) chart4Update).setThemeAutoCustom(); + } + update(chart4Update); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java index 9cf9165547..04f48c7321 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java @@ -24,6 +24,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.ChartImagePane; import com.fr.design.mainframe.chart.info.ChartInfoCollector; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.general.Background; import com.fr.js.NameJavaScriptGroup; import com.fr.log.FineLoggerFactory; @@ -152,6 +153,9 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane { refreshZoomLevel(); @@ -236,9 +237,19 @@ public class GisLayerPane extends JPanel implements UIObserver { } public void resetGisLayer(VanChartMapPlot mapPlot) { - GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); - mapPlot.setGisLayer(defaultGisLayer); - populate(defaultGisLayer); + + if (ChartEditContext.supportTheme()) { + GisLayer defaultGisLayer = mapPlot.getDefaultGisLayer(); + mapPlot.setGisLayer(defaultGisLayer); + populate(defaultGisLayer); + } else { + GaoDeGisType gaoDeGisType = mapPlot.getDefaultGisLayerType(); + + mapPlot.getGisLayer().setGisLayerType(GISLayerType.GAO_DE_API); + mapPlot.getGisLayer().setLayerName(gaoDeGisType.getTypeName()); + mapPlot.getGisLayer().setGaoDeGisType(gaoDeGisType); + populate(mapPlot.getGisLayer()); + } } public void populate(GisLayer layer) { From 6c9a8425334a71b7e8ab88df6779aefd273a8a3d Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 8 Nov 2021 19:59:14 +0800 Subject: [PATCH 5/5] update --- .../src/main/java/com/fr/design/chart/ChartTypePane.java | 2 +- .../fr/van/chart/designer/type/AbstractVanChartTypePane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java index 0337fff442..968117156d 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java @@ -156,7 +156,7 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven } if (!ChartEditContext.supportTheme() && chart4Update instanceof VanChart) { - ((VanChart) chart4Update).setThemeAutoCustom(); + ((VanChart) chart4Update).setAutoThemeCustom(); } update(chart4Update); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java index 04f48c7321..3456dd0be8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java @@ -154,7 +154,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane