@ -3,15 +3,19 @@ package com.fr.van.chart.custom;
import com.fr.base.chart.chartdata.TopDefinitionProvider ;
import com.fr.base.chart.chartdata.TopDefinitionProvider ;
import com.fr.chart.base.DataSeriesCondition ;
import com.fr.chart.base.DataSeriesCondition ;
import com.fr.chart.chartattr.Chart ;
import com.fr.chart.chartattr.Chart ;
import com.fr.chart.chartattr.ChartCollection ;
import com.fr.chart.chartattr.Plot ;
import com.fr.chart.chartattr.Plot ;
import com.fr.chart.chartglyph.ConditionAttr ;
import com.fr.chart.chartglyph.ConditionAttr ;
import com.fr.chart.chartglyph.ConditionCollection ;
import com.fr.chart.chartglyph.ConditionCollection ;
import com.fr.chartx.attr.ChartProvider ;
import com.fr.chartx.data.AbstractDataDefinition ;
import com.fr.chartx.data.AbstractDataDefinition ;
import com.fr.chartx.data.ChartDataDefinitionProvider ;
import com.fr.chartx.data.ChartDataDefinitionProvider ;
import com.fr.chartx.data.CustomChartDataDefinition ;
import com.fr.chartx.data.CustomChartDataDefinition ;
import com.fr.design.ChartTypeInterfaceManager ;
import com.fr.design.layout.TableLayout ;
import com.fr.design.layout.TableLayout ;
import com.fr.design.layout.TableLayoutHelper ;
import com.fr.design.layout.TableLayoutHelper ;
import com.fr.design.mainframe.chart.gui.type.ChartImagePane ;
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.log.FineLoggerFactory ;
import com.fr.plugin.chart.attr.plot.VanChartPlot ;
import com.fr.plugin.chart.attr.plot.VanChartPlot ;
import com.fr.plugin.chart.base.VanChartAttrLine ;
import com.fr.plugin.chart.base.VanChartAttrLine ;
@ -28,12 +32,12 @@ import com.fr.van.chart.designer.type.AbstractVanChartTypePane;
import javax.swing.JPanel ;
import javax.swing.JPanel ;
import javax.swing.JSeparator ;
import javax.swing.JSeparator ;
import java.util.HashMap ;
import java.util.LinkedHashMap ;
import java.util.Map ;
import java.awt.CardLayout ;
import java.awt.CardLayout ;
import java.awt.Component ;
import java.awt.Component ;
import java.awt.Dimension ;
import java.awt.Dimension ;
import java.util.HashMap ;
import java.util.LinkedHashMap ;
import java.util.Map ;
/ * *
/ * *
* Created by Mitisky on 16 / 2 / 16 .
* Created by Mitisky on 16 / 2 / 16 .
@ -54,11 +58,27 @@ public class VanChartCustomPlotPane extends AbstractVanChartTypePane {
//自定义和自动版面的容器,cardLayOut布局
//自定义和自动版面的容器,cardLayOut布局
private JPanel contentPane ;
private JPanel contentPane ;
@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 ) {
protected Component [ ] [ ] getPaneComponents ( JPanel typePane ) {
initContent ( ) ;
initContent ( ) ;
return new Component [ ] [ ] {
return ChartEditContext . duchampMode ( ) ? new Component [ ] [ ] {
new Component [ ] { contentPane } ,
new Component [ ] { buttonPane } ,
} : new Component [ ] [ ] {
new Component [ ] { typePane } ,
new Component [ ] { typePane } ,
new Component [ ] { stylePane } ,
new Component [ ] { stylePane } ,
new Component [ ] { contentPane } ,
new Component [ ] { contentPane } ,