diff --git a/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java index d590de46c5..bbb30b8888 100644 --- a/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java @@ -40,11 +40,6 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{ return contentPane; } - //设置色彩面板内容 - protected void setColorPaneContent (JPanel panel) { - panel.add(createStylePane(), BorderLayout.CENTER); - } - protected Class getStackAndAxisPaneClass() { return VanChartCustomStackAndAxisConditionPane.class; } diff --git a/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java index 3af0a3642f..cc10070022 100644 --- a/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java @@ -6,10 +6,8 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane; import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; -import com.fr.general.Inter; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot; -import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.VanChartBeautyPane; import com.fr.plugin.chart.designer.component.VanChartFillStylePane; @@ -81,9 +79,8 @@ public class VanChartCustomSeriesPane extends ChartSeriesPane { }; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col); - JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"),panel); panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); - return colorPane; + return panel; } /** diff --git a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java index 7e02cbddf0..60b14c0c8b 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java @@ -29,7 +29,6 @@ import com.fr.plugin.chart.custom.style.VanChartCustomStylePane; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane; import com.fr.plugin.chart.designer.component.VanChartBeautyPane; -import com.fr.plugin.chart.designer.component.VanChartFillStylePane; import com.fr.plugin.chart.designer.component.VanChartLineTypePane; import com.fr.plugin.chart.designer.component.VanChartMarkerPane; import com.fr.plugin.chart.designer.component.VanChartTrendLinePane; @@ -96,31 +95,30 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP * 返回 填充界面. */ protected ChartFillStylePane getFillStylePane() { - return new VanChartFillStylePane(); + //如果是自定義組合圖,則不創建填充界面 + return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane(); } //风格 protected VanChartBeautyPane createStylePane() { - stylePane = new VanChartBeautyPane(); - return stylePane; + return parentPane instanceof VanChartCustomStylePane ? null : new VanChartBeautyPane(); } - //获取色彩面板 + //获取颜色面板 protected JPanel getColorPane () { - //如果是自定義組合圖,則不創建色彩界面 - if (parentPane instanceof VanChartCustomStylePane) { - return null; - } JPanel panel = new JPanel(new BorderLayout()); + stylePane = createStylePane(); setColorPaneContent(panel); JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel); panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0)); - return colorPane; + return panel.getComponentCount() == 0 ? null : colorPane; } //设置色彩面板内容 protected void setColorPaneContent (JPanel panel) { - panel.add(createStylePane(), BorderLayout.CENTER); + if (stylePane != null) { + panel.add(stylePane, BorderLayout.CENTER); + } } //趋势线 diff --git a/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java b/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java index e8beea2fbf..13b93daba1 100644 --- a/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java +++ b/designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java @@ -42,7 +42,9 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane { //设置色彩面板内容 protected void setColorPaneContent (JPanel panel) { - panel.add(createStylePane(), BorderLayout.CENTER); + if (stylePane != null) { + panel.add(createStylePane(), BorderLayout.CENTER); + } panel.add(createAlphaPane(), BorderLayout.SOUTH); }