@ -318,18 +318,15 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
T theme = updateBean ( ) ;
T theme = updateBean ( ) ;
FineColorManager . traverse ( theme , replaceByColorScheme ) ;
FineColorManager . traverse ( theme , replaceByColorScheme ) ;
populateBean ( theme ) ;
populateBean4CustomEditors ( theme ) ;
//图表渐变色
//图表渐变色
chartStyleSettingPane . populateGradientBar ( colors ) ;
chartStyleSettingPane . populateGradientBar ( colors ) ;
themePreviewPane . refresh ( theme ) ;
}
}
public void populateBean ( T theme ) {
public void populateBean ( T theme ) {
try {
this . theme = theme ;
this . theme = ( T ) theme . clone ( ) ;
} catch ( CloneNotSupportedException e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
}
isPopulating = true ;
isPopulating = true ;
String name = theme . getName ( ) ;
String name = theme . getName ( ) ;
@ -345,14 +342,20 @@ public abstract class TemplateThemeProfilePane<T extends TemplateTheme> extends
saveAsButton . setEnabled ( ! currentIsNewTheme ) ;
saveAsButton . setEnabled ( ! currentIsNewTheme ) ;
}
}
cellStyleSettingPane . populateBean ( theme . getCellStyleList ( ) ) ;
colorListPane . populate ( theme . getColorScheme ( ) . getColors ( ) ) ;
colorListPane . populate ( theme . getColorScheme ( ) . getColors ( ) ) ;
colorListExtendedPane . populate ( colorListPane . update ( ) ) ;
colorListExtendedPane . populate ( colorListPane . update ( ) ) ;
chartStyleSettingPane . populateBean ( theme . getChartStyle ( ) ) ;
populateBean4CustomEditors ( theme ) ;
themePreviewPane . refresh ( theme ) ;
themePreviewPane . refresh ( theme ) ;
isPopulating = false ;
isPopulating = false ;
}
}
protected void populateBean4CustomEditors ( T theme ) {
cellStyleSettingPane . populateBean ( theme . getCellStyleList ( ) ) ;
chartStyleSettingPane . populateBean ( theme . getChartStyle ( ) ) ;
}
public T updateBean ( ) {
public T updateBean ( ) {
if ( theme = = null ) {
if ( theme = = null ) {
theme = config . createNewTheme ( ) ;
theme = config . createNewTheme ( ) ;