@ -23,7 +23,7 @@ import java.util.Map;
* /
public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTabPane < VanChartCustomPlot , ChartCollection > {
private boolean supportCellData = true ;
private boolean supportCellData ;
public VanChartCustomPlotDataContentsTabPane ( VanChartCustomPlot plot , VanChartCustomDataPane parent , AttributeChangeListener listener ) {
super ( plot , parent , listener ) ;
@ -40,7 +40,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
@Override
protected void initTabTitle ( ) {
if ( plot = = null ) {
if ( plot = = null ) {
return ;
}
@ -60,7 +60,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
@Override
protected List < JPanel > initPaneList ( ) {
if ( plot = = null ) {
if ( plot = = null ) {
return null ;
}
@ -68,7 +68,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
List < VanChartPlot > customPlotList = plot . getCustomPlotList ( ) ;
for ( int i = 0 ; i < customPlotList . size ( ) ; i + + ) {
for ( int i = 0 ; i < customPlotList . size ( ) ; i + + ) {
//根据不同的plot创建不同的数据配置界面
ChartDataPane contentPane = new VanChartDataPane ( listener ) ;
contentPane . setSupportCellData ( supportCellData ) ;
@ -79,16 +79,13 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
}
@Override
public void populateBean ( ChartCollection chartCollection ) {
public void populateBean ( ChartCollection chartCollection ) {
plot = ( VanChartCustomPlot ) chartCollection . getSelectedChart ( ) . getPlot ( ) ;
if ( paneList = = null ) {
paneList = initPaneList ( ) ;
}
if ( paneList ! = null ) {
relayoutWhenListChange ( ) ;
try {
List < VanChartPlot > customPlotList = plot . getCustomPlotList ( ) ;
@ -105,18 +102,17 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
TopDefinitionProvider definition = chartCollection . getSelectedChart ( ) . getFilterDefinition ( ) ;
TopDefinitionProvider dataDefinition = null ;
if ( definition ! = null & & definition instanceof CustomDefinition ) {
Map < CustomPlotType , TopDefinitionProvider > definitionProviderMap = ( ( CustomDefinition ) definition ) . getDefinitionProviderMap ( ) ;
Map < CustomPlotType , TopDefinitionProvider > definitionProviderMap = ( ( CustomDefinition ) definition ) . getDefinitionProviderMap ( ) ;
dataDefinition = definitionProviderMap . get ( CustomPlotFactory . getCustomType ( customPlotList . get ( i ) ) ) ;
}
cloneCollection . getSelectedChart ( ) . setFilterDefinition ( dataDefinition ) ;
( ( ChartDataPane ) paneList . get ( i ) ) . populate ( cloneCollection ) ;
}
} catch ( Exception e ) {
} catch ( Exception e ) {
return ;
}
}
}
@Override
public ChartCollection updateBean ( ) {
@ -124,8 +120,8 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
}
@Override
public void updateBean ( ChartCollection collection ) {
if ( paneList = = null | | plot = = null ) {
public void updateBean ( ChartCollection collection ) {
if ( paneList = = null | | plot = = null ) {
return ;
}
try {
@ -158,7 +154,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
customDefinition . setDefinitionProviderMap ( definitionMap ) ;
collection . getSelectedChart ( ) . setFilterDefinition ( customDefinition ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
return ;
}
}
@ -180,10 +176,11 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
/ * *
* 返回绑定的属性事件 .
*
* @param listener 增加监听
* /
public void addAttributeChangeListener ( AttributeChangeListener listener ) {
for ( int i = 0 ; i < paneList . size ( ) ; i + + ) {
for ( int i = 0 ; i < paneList . size ( ) ; i + + ) {
( ( ChartDataPane ) paneList . get ( i ) ) . addAttributeChangeListener ( listener ) ;
}
}