@ -2,6 +2,8 @@ package com.fr.design.chartx.component.combobox;
import com.fr.base.ChartColorMatching ;
import com.fr.base.ChartColorMatching ;
import com.fr.base.ChartPreStyleConfig ;
import com.fr.base.ChartPreStyleConfig ;
import com.fr.cert.token.lang.Collections ;
import com.fr.chart.base.ChartConstants ;
import com.fr.design.gui.icombobox.UIComboBox ;
import com.fr.design.gui.icombobox.UIComboBox ;
import com.fr.design.gui.icombobox.UIComboBoxRenderer ;
import com.fr.design.gui.icombobox.UIComboBoxRenderer ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.i18n.Toolkit ;
@ -60,6 +62,7 @@ public class ColorSchemeComboBox extends UIComboBox {
//添加默认的方案和第一个方案
//添加默认的方案和第一个方案
String defaultName = config . getCurrentStyle ( ) ;
String defaultName = config . getCurrentStyle ( ) ;
ChartColorMatching defaultStyle = ( ChartColorMatching ) config . getPreStyle ( defaultName ) ;
ChartColorMatching defaultStyle = ( ChartColorMatching ) config . getPreStyle ( defaultName ) ;
if ( names . hasNext ( ) ) {
Object firstName = names . next ( ) ;
Object firstName = names . next ( ) ;
ChartColorMatching firstStyle = ( ChartColorMatching ) config . getPreStyle ( firstName ) ;
ChartColorMatching firstStyle = ( ChartColorMatching ) config . getPreStyle ( firstName ) ;
if ( defaultStyle = = null ) {
if ( defaultStyle = = null ) {
@ -67,6 +70,12 @@ public class ColorSchemeComboBox extends UIComboBox {
}
}
colorSchemes . put ( Toolkit . i18nText ( "Fine-Design_Report_Default" ) , colorMatchingToColorInfo ( defaultStyle ) ) ;
colorSchemes . put ( Toolkit . i18nText ( "Fine-Design_Report_Default" ) , colorMatchingToColorInfo ( defaultStyle ) ) ;
colorSchemes . put ( firstStyle . getId ( ) , colorMatchingToColorInfo ( firstStyle ) ) ;
colorSchemes . put ( firstStyle . getId ( ) , colorMatchingToColorInfo ( firstStyle ) ) ;
} else {
ColorInfo colorInfo = new ColorInfo ( ) ;
colorInfo . setGradient ( false ) ;
colorInfo . setColors ( Collections . arrayToList ( ChartConstants . CHART_COLOR_ARRAY ) ) ;
colorSchemes . put ( Toolkit . i18nText ( "Fine-Design_Report_Default" ) , colorInfo ) ;
}
//添加其他的配色方案
//添加其他的配色方案
while ( names . hasNext ( ) ) {
while ( names . hasNext ( ) ) {