From 4885d330f06d153248745850d8621aa2c6b204d0 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 28 Jun 2021 16:59:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=E7=B1=BB=E5=9E=8B=E5=92=8C=E7=89=B9?= =?UTF-8?q?=E6=80=A7=E9=9D=A2=E6=9D=BF=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E8=AE=BE=E7=BD=AE=E9=A1=B9=20=E5=88=99?= =?UTF-8?q?=E6=8B=BF=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/fun/impl/AbstractChartTypeUI.java | 3 ++- .../chart/fun/impl/InvisibleChartTypePane.java | 15 +++++++++++++++ .../fr/design/mainframe/chart/ChartEditPane.java | 14 +++++++++----- .../mainframe/chart/ChartHyperEditPane.java | 2 +- .../area/AreaIndependentVanChartInterface.java | 4 +++- .../bar/BarIndependentVanChartInterface.java | 4 +++- .../box/BoxIndependentVanChartInterface.java | 4 +++- .../BubbleIndependentVanChartInterface.java | 4 +++- .../fr/van/chart/column/VanColumnChartTypeUI.java | 4 +++- .../van/chart/custom/VanChartCustomDataPane.java | 4 +++- .../van/chart/custom/VanChartCustomPlotPane.java | 14 +++++++++++--- .../FunnelIndependentVanChartInterface.java | 4 +++- .../GanttIndependentVanChartInterface.java | 4 +++- .../gauge/GaugeIndependentVanChartInterface.java | 4 +++- .../line/LineIndependentVanChartInterface.java | 4 +++- .../map/designer/type/VanChartMapPlotPane.java | 7 +++++-- .../MultiPieIndependentVanChartInterface.java | 4 +++- .../pie/PieIndependentVanChartInterface.java | 4 +++- .../radar/RadarIndependentVanChartInterface.java | 4 +++- .../ScatterIndependentVanChartInterface.java | 4 +++- .../desinger/VanStructureChartTypeUI.java | 4 +++- .../TreeMapIndependentVanChartInterface.java | 4 +++- .../WordCloudIndependentVanChartInterface.java | 4 +++- 23 files changed, 94 insertions(+), 29 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/design/chart/fun/impl/InvisibleChartTypePane.java diff --git a/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java b/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java index d1546653b7..4453559281 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java +++ b/designer-chart/src/main/java/com/fr/design/chart/fun/impl/AbstractChartTypeUI.java @@ -5,6 +5,7 @@ import com.fr.design.chartx.impl.AbstractDataPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -16,7 +17,7 @@ public abstract class AbstractChartTypeUI extends AbstractProvider implements Ch @Override public AbstractChartTypePane getPlotTypePane() { - return new DefaultChartTypePane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new DefaultChartTypePane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/design/chart/fun/impl/InvisibleChartTypePane.java b/designer-chart/src/main/java/com/fr/design/chart/fun/impl/InvisibleChartTypePane.java new file mode 100644 index 0000000000..6bc927b178 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/design/chart/fun/impl/InvisibleChartTypePane.java @@ -0,0 +1,15 @@ +package com.fr.design.chart.fun.impl; + +import com.fr.design.ChartTypeInterfaceManager; + +/** + * @author shine + * @version 10.0 + * Created by shine on 2021/6/25 + */ +public class InvisibleChartTypePane extends DefaultChartTypePane { + @Override + public String title4PopupWindow() { + return ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE; + } +} diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index 4537c6a6cb..c60f1abbdc 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -20,6 +20,7 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartOtherPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.ChartTypePane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; @@ -175,13 +176,13 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare */ public void reLayout(ChartProvider currentChart) { if (currentChart != null) { - int chartIndex = getSelectedChartIndex(currentChart); this.removeAll(); this.setLayout(new BorderLayout()); paneList = new ArrayList(); - addTypePane(); - String chartID = currentChart.getID(); + + addTypePane(chartID); + boolean isDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(chartID); if (isDefault) { @@ -214,8 +215,11 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare return chartDataPane; } - protected void addTypePane() { - paneList.add(typePane); + protected void addTypePane(String id) { + AbstractChartTypePane pane = ChartTypeInterfaceManager.getInstance().getPlotTypePane(id); + if (pane != null && !ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE.equals(pane.title4PopupWindow())) { + paneList.add(typePane); + } } protected void setSelectedTab() { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java index bae6e20bce..fcad48088e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java @@ -48,7 +48,7 @@ public class ChartHyperEditPane extends ChartEditPane { return dataPane; } - protected void addTypePane() { + protected void addTypePane(String id) { paneList.add(attrPane); paneList.add(typePane); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/area/AreaIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/area/AreaIndependentVanChartInterface.java index 23bd47004c..4fe84a35e3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/area/AreaIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/area/AreaIndependentVanChartInterface.java @@ -2,10 +2,12 @@ package com.fr.van.chart.area; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; /** @@ -47,7 +49,7 @@ public class AreaIndependentVanChartInterface extends AbstractMultiCategoryVanCh @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartAreaPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartAreaPlotPane(); } public ConditionAttributesPane getPlotConditionPane(Plot plot){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/bar/BarIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/bar/BarIndependentVanChartInterface.java index 63a8e7640c..542be966c7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/bar/BarIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/bar/BarIndependentVanChartInterface.java @@ -3,12 +3,14 @@ package com.fr.van.chart.bar; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.column.VanChartColumnConditionPane; import com.fr.van.chart.column.VanChartColumnSeriesPane; import com.fr.van.chart.designer.other.VanChartInteractivePane; @@ -57,7 +59,7 @@ public class BarIndependentVanChartInterface extends AbstractMultiCategoryVanCha @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartBarPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartBarPlotPane(); } public ConditionAttributesPane getPlotConditionPane(Plot plot) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java index e4906b6254..6e1d3d9712 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java @@ -3,6 +3,7 @@ package com.fr.van.chart.box; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; @@ -12,6 +13,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.van.chart.box.data.report.BoxPlotReportDataContentPane; import com.fr.van.chart.box.data.table.BoxPlotTableDataContentPane; @@ -56,7 +58,7 @@ public class BoxIndependentVanChartInterface extends AbstractIndependentVanChart } public AbstractChartTypePane getPlotTypePane() { - return new VanChartBoxPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartBoxPlotPane(); } public ConditionAttributesPane getPlotConditionPane(Plot plot) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java index 985e811ac2..cc344d4f43 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/bubble/BubbleIndependentVanChartInterface.java @@ -3,6 +3,7 @@ package com.fr.van.chart.bubble; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; @@ -13,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.base.VanChartConstants; import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.van.chart.bubble.data.VanChartBubblePlotTableDataContentPane; @@ -54,7 +56,7 @@ public class BubbleIndependentVanChartInterface extends AbstractIndependentVanCh */ @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartBubblePlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartBubblePlotPane(); } /** diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java index 0d491f9046..a971a98a9a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java @@ -2,10 +2,12 @@ package com.fr.van.chart.column; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; /** @@ -48,7 +50,7 @@ public class VanColumnChartTypeUI extends AbstractMultiCategoryVanChartUI { @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartColumnPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartColumnPlotPane(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java index 47e6488fd6..dc55527406 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java @@ -60,7 +60,9 @@ public class VanChartCustomDataPane extends ChartDataPane { */ public void addAttributeChangeListener(AttributeChangeListener listener) { super.addAttributeChangeListener(listener); - contentsTabPane.addAttributeChangeListener(listener); + if (contentsTabPane != null) { + contentsTabPane.addAttributeChangeListener(listener); + } } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java index ff0147652a..b69813d679 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java @@ -9,9 +9,11 @@ import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chartx.data.AbstractDataDefinition; import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.chartx.data.CustomChartDataDefinition; +import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.type.ChartImagePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.VanChartAttrLine; @@ -28,12 +30,12 @@ import com.fr.van.chart.designer.type.AbstractVanChartTypePane; import javax.swing.JPanel; import javax.swing.JSeparator; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; import java.awt.CardLayout; import java.awt.Component; import java.awt.Dimension; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; /** * Created by Mitisky on 16/2/16. @@ -54,6 +56,12 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane { //自定义和自动版面的容器,cardLayOut布局 private JPanel contentPane; + public String title4PopupWindow() { + //todo:check下组合图类 + return ChartEditContext.duchampMode() ? ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE : super.title4PopupWindow(); + } + + protected Component[][] getPaneComponents(JPanel typePane) { initContent(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java index 2899a9e117..b76f9047df 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java @@ -3,6 +3,7 @@ package com.fr.van.chart.funnel.designer; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; @@ -13,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.PiePlotTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.designer.data.OneDimensionalPlotReportDataContentPane; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartOtherPane; @@ -45,7 +47,7 @@ public class FunnelIndependentVanChartInterface extends AbstractIndependentVanCh */ @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartFunnelTypePane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartFunnelTypePane(); } public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/GanttIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/GanttIndependentVanChartInterface.java index 9bc3ce1232..839e049dd1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/GanttIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/GanttIndependentVanChartInterface.java @@ -3,6 +3,7 @@ package com.fr.van.chart.gantt.designer; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; @@ -12,6 +13,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.gantt.designer.data.VanChartGanttDataPane; @@ -42,7 +44,7 @@ public class GanttIndependentVanChartInterface extends AbstractIndependentVanCha @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartGanttPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartGanttPlotPane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java index 1e7a6fb322..7c424aa55b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gauge/GaugeIndependentVanChartInterface.java @@ -2,6 +2,7 @@ package com.fr.van.chart.gauge; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.AbstractChartAttrPane; @@ -14,6 +15,7 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.gauge.VanChartGaugePlot; import com.fr.van.chart.custom.component.CategoryCustomPlotTableDataContentPane; import com.fr.van.chart.custom.component.MeterCustomPlotReportDataContentPane; @@ -61,7 +63,7 @@ public class GaugeIndependentVanChartInterface extends AbstractIndependentVanCha @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartGaugePlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartGaugePlotPane(); } public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/line/LineIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/line/LineIndependentVanChartInterface.java index 739e87f14f..58252a74b0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/line/LineIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/line/LineIndependentVanChartInterface.java @@ -2,10 +2,12 @@ package com.fr.van.chart.line; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; /** @@ -42,7 +44,7 @@ public class LineIndependentVanChartInterface extends AbstractMultiCategoryVanCh @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartLinePlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartLinePlotPane(); } public ConditionAttributesPane getPlotConditionPane(Plot plot){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java index 9b5636e402..1bdb8d36ce 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapPlotPane.java @@ -7,6 +7,7 @@ import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.chartx.data.MapChartDataDefinition; 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.design.utils.gui.GUICoreUtils; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.plot.VanChartPlot; @@ -21,9 +22,9 @@ import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.designer.type.AbstractVanChartTypePane; import javax.swing.JPanel; +import java.awt.Component; import java.util.HashSet; import java.util.Set; -import java.awt.Component; /** * Created by Mitisky on 16/5/4. @@ -55,7 +56,9 @@ public class VanChartMapPlotPane extends AbstractVanChartTypePane { } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } - return new Component[][]{ + return ChartEditContext.duchampMode() ? new Component[][]{ + new Component[]{sourceChoosePane} + } : new Component[][]{ new Component[]{typePane}, new Component[]{buttonPane}, new Component[]{sourceChoosePane} diff --git a/designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java index 1cc66a2bf5..a5da06312a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java @@ -2,6 +2,7 @@ package com.fr.van.chart.multilayer; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartDataPane; @@ -9,6 +10,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.multilayer.data.MultiPiePlotReportDataContentPane; import com.fr.van.chart.multilayer.data.MultiPiePlotTableDataContentPane; import com.fr.van.chart.multilayer.other.VanChartMultiPieConditionPane; @@ -21,7 +23,7 @@ import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI; public class MultiPieIndependentVanChartInterface extends AbstractIndependentVanChartUI { @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartMultiPiePlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartMultiPiePlotPane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/pie/PieIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/pie/PieIndependentVanChartInterface.java index 06841c0c92..7ede0ad462 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/pie/PieIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/pie/PieIndependentVanChartInterface.java @@ -2,6 +2,7 @@ package com.fr.van.chart.pie; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartDataPane; @@ -9,6 +10,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.custom.component.CategoryCustomPlotTableDataContentPane; import com.fr.van.chart.custom.component.VanChartDataPane; import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI; @@ -50,7 +52,7 @@ public class PieIndependentVanChartInterface extends AbstractIndependentVanChart @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartPiePlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartPiePlotPane(); } public ConditionAttributesPane getPlotConditionPane(Plot plot){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/radar/RadarIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/radar/RadarIndependentVanChartInterface.java index 21784c522b..3f13cef0e8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/radar/RadarIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/radar/RadarIndependentVanChartInterface.java @@ -2,10 +2,12 @@ package com.fr.van.chart.radar; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI; /** @@ -40,7 +42,7 @@ public class RadarIndependentVanChartInterface extends AbstractIndependentVanCha @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartRadarPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartRadarPlotPane(); } public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot){ diff --git a/designer-chart/src/main/java/com/fr/van/chart/scatter/ScatterIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/scatter/ScatterIndependentVanChartInterface.java index 1b7063af4d..444a36ae5a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/scatter/ScatterIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/scatter/ScatterIndependentVanChartInterface.java @@ -4,6 +4,7 @@ package com.fr.van.chart.scatter; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; @@ -14,6 +15,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa import com.fr.design.mainframe.chart.gui.data.report.BubblePlotReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.zoom.ZoomPane; @@ -33,7 +35,7 @@ public class ScatterIndependentVanChartInterface extends AbstractIndependentVanC */ @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartScatterPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartScatterPlotPane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java index 8109adeb0c..6733b8dbda 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java @@ -3,6 +3,7 @@ package com.fr.van.chart.structure.desinger; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; @@ -12,6 +13,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.base.VanChartConstants; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartOtherPane; @@ -31,7 +33,7 @@ import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI; public class VanStructureChartTypeUI extends AbstractIndependentVanChartUI { @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartStructureTypePane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartStructureTypePane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/treemap/TreeMapIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/treemap/TreeMapIndependentVanChartInterface.java index 2b6589ed84..390a039197 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/treemap/TreeMapIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/treemap/TreeMapIndependentVanChartInterface.java @@ -3,11 +3,13 @@ package com.fr.van.chart.treemap; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.style.VanChartStylePane; @@ -20,7 +22,7 @@ import com.fr.van.chart.treemap.style.VanChartTreeMapSeriesPane; public class TreeMapIndependentVanChartInterface extends MultiPieIndependentVanChartInterface { @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartTreeMapPlotPane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartTreeMapPlotPane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java index 5ff077a4b6..290c6a43f0 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java @@ -3,6 +3,7 @@ package com.fr.van.chart.wordcloud.designer; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.chart.fun.impl.InvisibleChartTypePane; import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.AttributeChangeListener; @@ -13,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.base.VanChartConstants; import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort; import com.fr.van.chart.designer.other.VanChartOtherPane; @@ -39,7 +41,7 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa */ @Override public AbstractChartTypePane getPlotTypePane() { - return new VanChartWordCloudTypePane(); + return ChartEditContext.duchampMode() ? new InvisibleChartTypePane() : new VanChartWordCloudTypePane(); } @Override From 367eb6e1351192aa586cda53995d2dc999612973 Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 29 Jun 2021 16:14:30 +0800 Subject: [PATCH 2/3] refactor:plugin use 10.0 not compatible xxx copy from 10.0 code --- .../LineMapAreaLngLatPaneWithComboBox.java | 25 ++++++++++--------- .../PointMapAreaLngLatPaneWithComboBox.java | 16 ++++++------ ...ractCellDataFieldsWithSeriesValuePane.java | 2 +- ...tractDataSetFieldsWithSeriesValuePane.java | 15 ++++++++--- 4 files changed, 33 insertions(+), 25 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithComboBox.java b/designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithComboBox.java index 5d2f2298a8..5c692b2927 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithComboBox.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/data/map/LineMapAreaLngLatPaneWithComboBox.java @@ -2,7 +2,7 @@ package com.fr.design.chartx.data.map; import com.fr.chartx.data.field.diff.LineMapColumnFieldCollection; import com.fr.design.chartx.fields.AbstractDataSetFieldsPane; -import com.fr.design.chartx.fields.diff.LineMapDataSetFieldsPane; +import com.fr.design.chartx.fields.diff.MapDataSetFieldsPane; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.i18n.Toolkit; @@ -24,15 +24,15 @@ public class LineMapAreaLngLatPaneWithComboBox extends LineMapAreaLngLatPaneWith private UIComboBox toLng_tab1; private UIComboBox toLat_tab1; - private LineMapDataSetFieldsPane lineMapDataSetFieldsPane; + private MapDataSetFieldsPane mapDataSetFieldsPane; - public LineMapAreaLngLatPaneWithComboBox(LineMapDataSetFieldsPane lineMapDataSetFieldsPane) { - this.lineMapDataSetFieldsPane = lineMapDataSetFieldsPane; + public LineMapAreaLngLatPaneWithComboBox(MapDataSetFieldsPane mapDataSetFieldsPane) { + this.mapDataSetFieldsPane = mapDataSetFieldsPane; initComponents(); } protected void initComponents() { - if (lineMapDataSetFieldsPane == null) { + if (mapDataSetFieldsPane == null) { return; } super.initComponents(); @@ -48,7 +48,7 @@ public class LineMapAreaLngLatPaneWithComboBox extends LineMapAreaLngLatPaneWith return createPane( new String[]{Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_End_Area_Name")}, - lineMapDataSetFieldsPane.createAreaPanel(fromArea_tab0), lineMapDataSetFieldsPane.createAreaPanel(toArea_tab0) + mapDataSetFieldsPane.createAreaPanel(fromArea_tab0), mapDataSetFieldsPane.createAreaPanel(toArea_tab0) ); } @@ -64,18 +64,19 @@ public class LineMapAreaLngLatPaneWithComboBox extends LineMapAreaLngLatPaneWith } return createPane( new String[]{ - Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Start_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Start_Latitude"), - Toolkit.i18nText("Fine-Design_Chart_End_Area_Name"), + Toolkit.i18nText("Fine-Design_Chart_Start_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_End_Longitude"), - Toolkit.i18nText("Fine-Design_Chart_End_Latitude")}, - lineMapDataSetFieldsPane.createAreaPanel(fromArea_tab1), + Toolkit.i18nText("Fine-Design_Chart_End_Latitude"), + Toolkit.i18nText("Fine-Design_Chart_End_Area_Name") + }, fromLng_tab1, fromLat_tab1, - lineMapDataSetFieldsPane.createAreaPanel(toArea_tab1), + fromArea_tab1, toLng_tab1, - toLat_tab1); + toLat_tab1, + toArea_tab1); } protected void populateTab0(LineMapColumnFieldCollection fieldCollection) { diff --git a/designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithComboBox.java b/designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithComboBox.java index b3b503ddda..bb519cab6f 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithComboBox.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/data/map/PointMapAreaLngLatPaneWithComboBox.java @@ -2,7 +2,7 @@ package com.fr.design.chartx.data.map; import com.fr.chartx.data.field.diff.PointMapColumnFieldCollection; import com.fr.design.chartx.fields.AbstractDataSetFieldsPane; -import com.fr.design.chartx.fields.diff.PointMapDataSetFieldsPane; +import com.fr.design.chartx.fields.diff.MapDataSetFieldsPane; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.i18n.Toolkit; @@ -20,15 +20,15 @@ public class PointMapAreaLngLatPaneWithComboBox extends PointMapAreaLngLatPaneWi private UIComboBox lng_tab1; private UIComboBox lat_tab1; - private PointMapDataSetFieldsPane pointMapDataSetFieldsPane; + private MapDataSetFieldsPane mapDataSetFieldsPane; - public PointMapAreaLngLatPaneWithComboBox(PointMapDataSetFieldsPane pointMapDataSetFieldsPane) { - this.pointMapDataSetFieldsPane = pointMapDataSetFieldsPane; + public PointMapAreaLngLatPaneWithComboBox(MapDataSetFieldsPane pointMapDataSetFieldsPane) { + this.mapDataSetFieldsPane = pointMapDataSetFieldsPane; initComponents(); } protected void initComponents() { - if (pointMapDataSetFieldsPane == null) { + if (mapDataSetFieldsPane == null) { return; } super.initComponents(); @@ -41,7 +41,7 @@ public class PointMapAreaLngLatPaneWithComboBox extends PointMapAreaLngLatPaneWi } return createPane( new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name")}, - pointMapDataSetFieldsPane.createAreaPanel(area_tab0) + mapDataSetFieldsPane.createAreaPanel(area_tab0) ); } @@ -53,8 +53,8 @@ public class PointMapAreaLngLatPaneWithComboBox extends PointMapAreaLngLatPaneWi lat_tab1 = new UIComboBox(); } return createPane( - new String[]{Toolkit.i18nText("Fine-Design_Chart_Area_Name"), Toolkit.i18nText("Fine-Design_Chart_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Latitude")}, - pointMapDataSetFieldsPane.createAreaPanel(area_tab1), lng_tab1, lat_tab1 + new String[]{Toolkit.i18nText("Fine-Design_Chart_Longitude"), Toolkit.i18nText("Fine-Design_Chart_Latitude"), Toolkit.i18nText("Fine-Design_Chart_Area_Name")}, + lng_tab1, lat_tab1, area_tab1 ); } diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractCellDataFieldsWithSeriesValuePane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractCellDataFieldsWithSeriesValuePane.java index f6975d3d92..597bac5203 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractCellDataFieldsWithSeriesValuePane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/AbstractCellDataFieldsWithSeriesValuePane.java @@ -21,7 +21,7 @@ public abstract class AbstractCellDataFieldsWithSeriesValuePane Date: Tue, 29 Jun 2021 17:42:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=E5=85=B6=E4=BB=96=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=9B=BE=E4=B8=8D=E9=9C=80=E8=A6=81=E7=B1=BB=E5=9E=8B=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=9B=BE=E9=9C=80=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/ChartEditPane.java | 14 ++++++++---- .../mainframe/chart/ChartHyperEditPane.java | 3 ++- .../mainframe/chart/gui/ChartTypePane.java | 2 +- .../chart/gui/type/AbstractChartTypePane.java | 4 ++++ .../chart/custom/VanChartCustomPlotPane.java | 22 ++++++++++++++----- 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index c60f1abbdc..f51755f875 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -181,7 +181,7 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare paneList = new ArrayList(); String chartID = currentChart.getID(); - addTypePane(chartID); + addTypePane(currentChart); boolean isDefault = ChartTypeInterfaceManager.getInstance().isUseDefaultPane(chartID); @@ -215,13 +215,19 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare return chartDataPane; } - protected void addTypePane(String id) { - AbstractChartTypePane pane = ChartTypeInterfaceManager.getInstance().getPlotTypePane(id); - if (pane != null && !ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE.equals(pane.title4PopupWindow())) { + protected void addTypePane(ChartProvider chart) { + if (visibleTypePane(chart)) { paneList.add(typePane); } } + private boolean visibleTypePane(ChartProvider chart) { + AbstractChartTypePane pane = ChartTypeInterfaceManager.getInstance().getPlotTypePane(chart.getID()); + return pane != null + && !ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE.equals(pane.title4PopupWindow()) + && pane.visible(chart); + } + protected void setSelectedTab() { } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java index fcad48088e..fdfa6a3c3b 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartHyperEditPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.web.ChartHyperPoplink; +import com.fr.chartx.attr.ChartProvider; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPopAttrPane; @@ -48,7 +49,7 @@ public class ChartHyperEditPane extends ChartEditPane { return dataPane; } - protected void addTypePane(String id) { + protected void addTypePane(ChartProvider chart) { paneList.add(attrPane); paneList.add(typePane); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index 5137901ee9..cbbae30229 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -162,7 +162,7 @@ public class ChartTypePane extends AbstractChartAttrPane { for (String id : chartIDs) { AbstractChartTypePane pane = ChartTypeInterfaceManager.getInstance().getPlotTypePane(id); - if (AssistUtils.equals(pane.title4PopupWindow(), ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE)) { + if (pane == null || AssistUtils.equals(pane.title4PopupWindow(), ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE)) { continue; } pane.reLayout(id); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java index 4f3f025105..cde6e8fd6e 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/AbstractChartTypePane.java @@ -217,6 +217,10 @@ public abstract class AbstractChartTypePane extends Fur return plotID; } + public boolean visible(ChartProvider chart) { + return true; + } + /** * @param ob 对象 * @return diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java index b69813d679..c3dcf73909 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotPane.java @@ -3,9 +3,11 @@ package com.fr.van.chart.custom; import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; +import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.data.AbstractDataDefinition; import com.fr.chartx.data.ChartDataDefinitionProvider; import com.fr.chartx.data.CustomChartDataDefinition; @@ -56,17 +58,27 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane { //自定义和自动版面的容器,cardLayOut布局 private JPanel contentPane; - public String title4PopupWindow() { - //todo:check下组合图类 - return ChartEditContext.duchampMode() ? ChartTypeInterfaceManager.TYPE_PANE_DEFAULT_TITLE : super.title4PopupWindow(); - } + @Override + public boolean visible(ChartProvider chart) { + if (ChartEditContext.duchampMode() && chart instanceof VanChart) { + Plot plot = ((VanChart) chart).getPlot(); + if (plot instanceof VanChartCustomPlot) { + CustomStyle customStyle = ((VanChartCustomPlot) plot).getCustomStyle(); + return customStyle == CustomStyle.CUSTOM; + } + } + return super.visible(chart); + } protected Component[][] getPaneComponents(JPanel typePane) { initContent(); - return new Component[][]{ + return ChartEditContext.duchampMode() ? new Component[][]{ + new Component[]{contentPane}, + new Component[]{buttonPane}, + }: new Component[][]{ new Component[]{typePane}, new Component[]{stylePane}, new Component[]{contentPane},