KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > birt > chart > examples > api > script > java > SeriesScript


1 /*******************************************************************************
2  * Copyright (c) 2004 Actuate Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * Actuate Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.birt.chart.examples.api.script.java;
13
14 import org.eclipse.birt.chart.model.component.Series;
15 import org.eclipse.birt.chart.model.component.impl.CurveFittingImpl;
16 import org.eclipse.birt.chart.render.ISeriesRenderer;
17 import org.eclipse.birt.chart.script.ChartEventHandlerAdapter;
18 import org.eclipse.birt.chart.script.IChartScriptContext;
19
20 public class SeriesScript extends ChartEventHandlerAdapter
21 {
22
23     /*
24      * (non-Javadoc)
25      *
26      * @see org.eclipse.birt.chart.script.IChartItemScriptHandler#beforeDrawSeries(org.eclipse.birt.chart.model.component.Series,
27      * org.eclipse.birt.chart.render.ISeriesRenderer,
28      * org.eclipse.birt.chart.script.IChartScriptContext)
29      */

30     public void beforeDrawSeries( Series series, ISeriesRenderer isr,
31             IChartScriptContext icsc )
32     {
33         series.setCurveFitting( CurveFittingImpl.create( ) );
34         series.getLabel( ).getCaption( ).getColor( ).set( 12, 232, 182 );
35     }
36
37 }
38
Popular Tags