Browse Source

修改组合图问题

master
mengao 7 years ago
parent
commit
2cd4a4b91b
  1. 5
      designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java
  2. 5
      designer_chart/src/com/fr/plugin/chart/custom/style/VanChartCustomSeriesPane.java
  3. 20
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  4. 2
      designer_chart/src/com/fr/plugin/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

5
designer_chart/src/com/fr/plugin/chart/area/VanChartAreaSeriesPane.java

@ -40,11 +40,6 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane{
return contentPane; return contentPane;
} }
//设置色彩面板内容
protected void setColorPaneContent (JPanel panel) {
panel.add(createStylePane(), BorderLayout.CENTER);
}
protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() { protected Class<? extends BasicBeanPane> getStackAndAxisPaneClass() {
return VanChartCustomStackAndAxisConditionPane.class; return VanChartCustomStackAndAxisConditionPane.class;
} }

5
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.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane; import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane;
import com.fr.design.mainframe.chart.gui.style.series.ChartSeriesPane; 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.attr.plot.VanChartPlot;
import com.fr.plugin.chart.custom.VanChartCustomPlot; 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.VanChartBeautyPane;
import com.fr.plugin.chart.designer.component.VanChartFillStylePane; 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 panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"),panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15)); panel.setBorder(BorderFactory.createEmptyBorder(10,10,0,15));
return colorPane; return panel;
} }
/** /**

20
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.TableLayout4VanChartHelper;
import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane; import com.fr.plugin.chart.designer.component.VanChartAreaSeriesFillColorPane;
import com.fr.plugin.chart.designer.component.VanChartBeautyPane; 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.VanChartLineTypePane;
import com.fr.plugin.chart.designer.component.VanChartMarkerPane; import com.fr.plugin.chart.designer.component.VanChartMarkerPane;
import com.fr.plugin.chart.designer.component.VanChartTrendLinePane; import com.fr.plugin.chart.designer.component.VanChartTrendLinePane;
@ -96,31 +95,30 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
* 返回 填充界面. * 返回 填充界面.
*/ */
protected ChartFillStylePane getFillStylePane() { protected ChartFillStylePane getFillStylePane() {
return new VanChartFillStylePane(); //如果是自定義組合圖,則不創建填充界面
return parentPane instanceof VanChartCustomStylePane ? null : new ChartFillStylePane();
} }
//风格 //风格
protected VanChartBeautyPane createStylePane() { protected VanChartBeautyPane createStylePane() {
stylePane = new VanChartBeautyPane(); return parentPane instanceof VanChartCustomStylePane ? null : new VanChartBeautyPane();
return stylePane;
} }
//获取色面板 //获取色面板
protected JPanel getColorPane () { protected JPanel getColorPane () {
//如果是自定義組合圖,則不創建色彩界面
if (parentPane instanceof VanChartCustomStylePane) {
return null;
}
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
stylePane = createStylePane();
setColorPaneContent(panel); setColorPaneContent(panel);
JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel); JPanel colorPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Color"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0)); panel.setBorder(BorderFactory.createEmptyBorder(10,5,0,0));
return colorPane; return panel.getComponentCount() == 0 ? null : colorPane;
} }
//设置色彩面板内容 //设置色彩面板内容
protected void setColorPaneContent (JPanel panel) { protected void setColorPaneContent (JPanel panel) {
panel.add(createStylePane(), BorderLayout.CENTER); if (stylePane != null) {
panel.add(stylePane, BorderLayout.CENTER);
}
} }
//趋势线 //趋势线

2
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) { protected void setColorPaneContent (JPanel panel) {
if (stylePane != null) {
panel.add(createStylePane(), BorderLayout.CENTER); panel.add(createStylePane(), BorderLayout.CENTER);
}
panel.add(createAlphaPane(), BorderLayout.SOUTH); panel.add(createAlphaPane(), BorderLayout.SOUTH);
} }

Loading…
Cancel
Save