1 11 12 package org.eclipse.birt.chart.examples.api.script.java; 13 14 import org.eclipse.birt.chart.model.component.Axis; 15 import org.eclipse.birt.chart.model.component.MarkerLine; 16 import org.eclipse.birt.chart.model.component.MarkerRange; 17 import org.eclipse.birt.chart.script.ChartEventHandlerAdapter; 18 import org.eclipse.birt.chart.script.IChartScriptContext; 19 20 import com.ibm.icu.util.ULocale; 21 22 25 26 public class MarkerScript extends ChartEventHandlerAdapter 27 { 28 29 36 public void beforeDrawMarkerLine( Axis axis, MarkerLine mLine, 37 IChartScriptContext icsc ) 38 { 39 ULocale.setDefault( ULocale.US ); 40 if ( icsc.getULocale( ).equals( ULocale.US ) ) 41 { 42 mLine.getLabel( ).getCaption( ).getColor( ).set( 165, 184, 55 ); 43 mLine.getLineAttributes( ).getColor( ).set( 165, 184, 55 ); 44 } 45 } 46 47 54 public void beforeDrawMarkerRange( Axis axis, MarkerRange mRange, 55 IChartScriptContext icsc ) 56 { 57 mRange.getLabel( ).getCaption( ).getColor( ).set( 225, 104, 105 ); 58 } 59 60 } 61 | Popular Tags |