KickJava   Java API By Example, From Geeks To Geeks.

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


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.Label;
15 import org.eclipse.birt.chart.script.ChartEventHandlerAdapter;
16 import org.eclipse.birt.chart.script.IChartScriptContext;
17
18 public class LegendScript extends ChartEventHandlerAdapter
19 {
20
21     /*
22      * (non-Javadoc)
23      *
24      * @see org.eclipse.birt.chart.script.IChartItemScriptHandler#beforeDrawLegendEntry(org.eclipse.birt.chart.model.component.Label,
25      * org.eclipse.birt.chart.script.IChartScriptContext)
26      */

27     public void beforeDrawLegendEntry( Label label, IChartScriptContext icsc )
28     {
29         label.getCaption( ).getColor( ).set( 35, 184, 245 );
30         label.getCaption( ).getFont( ).setBold( true );
31         label.getCaption( ).getFont( ).setItalic( true );
32         label.getOutline( ).setVisible( true );
33         label.getOutline( ).getColor( ).set( 177, 12, 187 );
34     }
35
36 }
37
Popular Tags