From d24aee2fa946497c7e4f56f334171cd4d4963730 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sat, 19 Sep 2020 19:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/VanChartBoxTooltipContentPane.java | 24 ++-- .../fr/van/chart/designer/PlotFactory.java | 4 +- .../VanChartRefreshTooltipContentPane.java | 32 ++--- .../component/VanChartTooltipContentPane.java | 122 ++++++++++++++++-- .../label/GaugeLabelContentPane.java | 3 +- .../label/LabelContentPaneWithCate.java | 2 +- .../label/LabelContentPaneWithCateValue.java | 4 +- .../label/LabelContentPaneWithOutCate.java | 6 +- .../label/LabelContentPaneWithPercent.java | 2 +- ...efreshTooltipContentPaneWithOutSeries.java | 28 ++-- .../TooltipContentPaneWithOutSeries.java | 12 +- .../style/VanChartFunnelLabelContentPane.java | 29 +++-- ...nChartFunnelRefreshTooltipContentPane.java | 28 ++-- .../VanChartFunnelTooltipContentPane.java | 28 ++-- .../VanChartGanttTooltipContentPane.java | 23 ++-- .../label/VanChartMapLabelContentPane.java | 16 +-- .../VanChartMapRefreshTooltipContentPane.java | 40 +++--- .../VanChartMapTooltipContentPane.java | 16 +-- .../VanChartLineMapTooltipContentPane.java | 19 ++- .../VanChartMultiPieLabelContentPane.java | 17 +-- .../VanChartMultiPieTooltipContentPane.java | 17 +-- ...ChartMutiPieRefreshTooltipContentPane.java | 32 ++--- ...ChartScatterRefreshTooltipContentPane.java | 22 ++-- .../VanChartScatterTooltipContentPane.java | 8 +- .../VanChartStructureLabelContentPane.java | 24 ++-- ...artStructureRefreshTooltipContentPane.java | 44 ++++--- .../VanChartStructureTooltipContentPane.java | 42 +++--- ...artWordCloudRefreshTooltipContentPane.java | 79 ++++++++++++ ...hartWordCloudRefreshTootipContentPane.java | 73 ----------- .../VanChartWordCloudTooltipContentPane.java | 26 ++-- 30 files changed, 480 insertions(+), 342 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudRefreshTooltipContentPane.java delete mode 100644 designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudRefreshTootipContentPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index 98dbbbb6e1..d0dd675290 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -36,8 +36,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { - categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane); - seriesNameFormatPane = new SeriesNameFormatPaneWithCheckBox(parent, showOnPane); + setCategoryNameFormatPane(new CategoryNameFormatPaneWithCheckBox(parent, showOnPane)); + setSeriesNameFormatPane(new SeriesNameFormatPaneWithCheckBox(parent, showOnPane)); number = new VanChartFormatPaneWithCheckBox(parent, showOnPane) { protected String getCheckBoxText() { @@ -98,8 +98,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { double[] rowSize = {p, p}; Component[][] cateAndSeries = new Component[][]{ - new Component[]{categoryNameFormatPane, null}, - new Component[]{seriesNameFormatPane, null} + new Component[]{getCategoryNameFormatPane(), null}, + new Component[]{getSeriesNameFormatPane(), null} }; return TableLayoutHelper.createTableLayoutPane(cateAndSeries, rowSize, columnSize); @@ -152,8 +152,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } public boolean isDirty() { - return categoryNameFormatPane.isDirty() - || seriesNameFormatPane.isDirty() + return getCategoryNameFormatPane().isDirty() + || getSeriesNameFormatPane().isDirty() || number.isDirty() || max.isDirty() || q3.isDirty() @@ -164,8 +164,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } public void setDirty(boolean isDirty) { - categoryNameFormatPane.setDirty(isDirty); - seriesNameFormatPane.setDirty(isDirty); + getCategoryNameFormatPane().setDirty(isDirty); + getSeriesNameFormatPane().setDirty(isDirty); number.setDirty(isDirty); max.setDirty(isDirty); q3.setDirty(isDirty); @@ -180,8 +180,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { - categoryNameFormatPane.populate(attrTooltipContent.getCategoryFormat()); - seriesNameFormatPane.populate(attrTooltipContent.getSeriesFormat()); + getCategoryNameFormatPane().populate(attrTooltipContent.getCategoryFormat()); + getSeriesNameFormatPane().populate(attrTooltipContent.getSeriesFormat()); if (attrTooltipContent instanceof AttrBoxTooltipContent) { AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent; @@ -199,8 +199,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { - categoryNameFormatPane.update(attrTooltipContent.getCategoryFormat()); - seriesNameFormatPane.update(attrTooltipContent.getSeriesFormat()); + getCategoryNameFormatPane().update(attrTooltipContent.getCategoryFormat()); + getSeriesNameFormatPane().update(attrTooltipContent.getSeriesFormat()); if (attrTooltipContent instanceof AttrBoxTooltipContent) { AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java b/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java index d3e1adbb90..3bddc1aed4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java @@ -56,7 +56,7 @@ import com.fr.van.chart.scatter.component.label.VanChartScatterPlotLabelPane; import com.fr.van.chart.structure.desinger.style.VanChartStructureLabelContentPane; import com.fr.van.chart.structure.desinger.style.VanChartStructureRefreshTooltipContentPane; import com.fr.van.chart.structure.desinger.style.VanChartStructureTooltipContentPane; -import com.fr.van.chart.wordcloud.designer.style.VanChartWordCloudRefreshTootipContentPane; +import com.fr.van.chart.wordcloud.designer.style.VanChartWordCloudRefreshTooltipContentPane; import com.fr.van.chart.wordcloud.designer.style.VanChartWordCloudTooltipContentPane; import javax.swing.BorderFactory; @@ -182,7 +182,7 @@ public class PlotFactory { refreshTooltipContentMap.put(VanChartMultiPiePlot.class, VanChartMutiPieRefreshTooltipContentPane.class); refreshTooltipContentMap.put(VanChartTreeMapPlot.class, VanChartMutiPieRefreshTooltipContentPane.class); refreshTooltipContentMap.put(VanChartFunnelPlot.class, VanChartFunnelRefreshTooltipContentPane.class); - refreshTooltipContentMap.put(VanChartWordCloudPlot.class, VanChartWordCloudRefreshTootipContentPane.class); + refreshTooltipContentMap.put(VanChartWordCloudPlot.class, VanChartWordCloudRefreshTooltipContentPane.class); refreshTooltipContentMap.put(VanChartStructurePlot.class, VanChartStructureRefreshTooltipContentPane.class); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java index 18f50e1434..09e208cc10 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java @@ -26,37 +26,37 @@ public class VanChartRefreshTooltipContentPane extends VanChartTooltipContentPan protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { super.initFormatPane(parent, showOnPane); - changedValueFormatPane = new ChangedValueFormatPaneWithCheckBox(parent, showOnPane); - changedPercentFormatPane = new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane); + setChangedValueFormatPane(new ChangedValueFormatPaneWithCheckBox(parent, showOnPane)); + setChangedPercentFormatPane(new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane)); } @Override protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) { super.initRichTextFormatPane(parent, showOnPane); - richTextChangedValueFormatPane = new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane); - richTextChangedPercentFormatPane = new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane); + setRichTextChangedValueFormatPane(new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane)); + setRichTextChangedPercentFormatPane(new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane)); } protected Component[][] getPaneComponents(){ return new Component[][]{ - new Component[]{categoryNameFormatPane,null}, - new Component[]{seriesNameFormatPane,null}, - new Component[]{valueFormatPane,null}, - new Component[]{changedValueFormatPane,null}, - new Component[]{percentFormatPane,null}, - new Component[]{changedPercentFormatPane,null}, + new Component[]{getCategoryNameFormatPane(), null}, + new Component[]{getSeriesNameFormatPane(), null}, + new Component[]{getValueFormatPane(), null}, + new Component[]{getChangedValueFormatPane(), null}, + new Component[]{getPercentFormatPane(), null}, + new Component[]{getChangedPercentFormatPane(), null}, }; } protected Component[][] getRichTextComponents() { return new Component[][]{ - new Component[]{richTextCategoryNameFormatPane, null}, - new Component[]{richTextSeriesNameFormatPane, null}, - new Component[]{richTextValueFormatPane, null}, - new Component[]{richTextChangedValueFormatPane, null}, - new Component[]{richTextPercentFormatPane, null}, - new Component[]{richTextChangedPercentFormatPane, null} + new Component[]{getRichTextCategoryNameFormatPane(), null}, + new Component[]{getRichTextSeriesNameFormatPane(), null}, + new Component[]{getRichTextValueFormatPane(), null}, + new Component[]{getRichTextChangedValueFormatPane(), null}, + new Component[]{getRichTextPercentFormatPane(), null}, + new Component[]{getRichTextChangedPercentFormatPane(), null} }; } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index e8825f2460..9889ee64a6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -51,23 +51,23 @@ public class VanChartTooltipContentPane extends BasicBeanPane content; + private UIButtonGroup content; - protected CategoryNameFormatPaneWithCheckBox categoryNameFormatPane; - protected SeriesNameFormatPaneWithCheckBox seriesNameFormatPane; - protected ValueFormatPaneWithCheckBox valueFormatPane; - protected PercentFormatPaneWithCheckBox percentFormatPane; + private CategoryNameFormatPaneWithCheckBox categoryNameFormatPane; + private SeriesNameFormatPaneWithCheckBox seriesNameFormatPane; + private ValueFormatPaneWithCheckBox valueFormatPane; + private PercentFormatPaneWithCheckBox percentFormatPane; //监控刷新时,自动数据点提示使用 - protected ChangedValueFormatPaneWithCheckBox changedValueFormatPane; - protected ChangedPercentFormatPaneWithCheckBox changedPercentFormatPane; + private ChangedValueFormatPaneWithCheckBox changedValueFormatPane; + private ChangedPercentFormatPaneWithCheckBox changedPercentFormatPane; - protected CategoryNameFormatPaneWithoutCheckBox richTextCategoryNameFormatPane; - protected SeriesNameFormatPaneWithoutCheckBox richTextSeriesNameFormatPane; - protected ValueFormatPaneWithoutCheckBox richTextValueFormatPane; - protected PercentFormatPaneWithoutCheckBox richTextPercentFormatPane; - protected ChangedValueFormatPaneWithoutCheckBox richTextChangedValueFormatPane; - protected ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane; + private CategoryNameFormatPaneWithoutCheckBox richTextCategoryNameFormatPane; + private SeriesNameFormatPaneWithoutCheckBox richTextSeriesNameFormatPane; + private ValueFormatPaneWithoutCheckBox richTextValueFormatPane; + private PercentFormatPaneWithoutCheckBox richTextPercentFormatPane; + private ChangedValueFormatPaneWithoutCheckBox richTextChangedValueFormatPane; + private ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane; private JPanel centerPanel; private JPanel commonPanel; @@ -82,6 +82,102 @@ public class VanChartTooltipContentPane extends BasicBeanPane