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 98dbbbb6e..d0dd67529 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 d3e1adbb9..3bddc1aed 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 18f50e143..09e208cc1 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 e8825f246..9889ee64a 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