@ -30,6 +30,7 @@ public class ChartStylePane extends AbstractChartAttrPane {
private Chart chart ;
private Chart chart ;
private AttributeChangeListener listener ;
private AttributeChangeListener listener ;
private BasicPane chartAxisPane ;
private BasicPane chartAxisPane ;
private boolean chartStyleInitialized = false ;
protected Chart getChart ( ) {
protected Chart getChart ( ) {
return chart ;
return chart ;
@ -64,11 +65,15 @@ public class ChartStylePane extends AbstractChartAttrPane {
@Override
@Override
public void populate ( ChartCollection collection ) {
public void populate ( ChartCollection collection ) {
this . chart = collection . getSelectedChart ( ) ;
this . chart = collection . getSelectedChart ( ) ;
this . remove ( leftContentPane ) ;
// 子组件布局初始化,只在第一次进入的时候绘制
initContentPane ( ) ;
if ( ! chartStyleInitialized ) {
this . removeAttributeChangeListener ( ) ;
this . remove ( leftContentPane ) ;
stylePane . populateBean ( chart ) ;
initContentPane ( ) ;
this . addAttributeChangeListener ( listener ) ;
this . removeAttributeChangeListener ( ) ;
this . addAttributeChangeListener ( listener ) ;
this . initAllListeners ( ) ;
chartStyleInitialized = true ;
}
this . initAllListeners ( ) ;
this . initAllListeners ( ) ;
}
}