KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > olap > CellFormatter


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/olap/CellFormatter.java#6 $
3 // This software is subject to the terms of the Common Public License
4 // Agreement, available at the following URL:
5 // http://www.opensource.org/licenses/cpl.html.
6 // Copyright (C) 2004-2005 TONBELLER AG
7 // All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 */

10 package mondrian.olap;
11
12 /**
13  * This interface provides a user exit to format
14  * the cell value to be displayed. The user registers the CellFormatter's
15  * full class name as an attribute of a Measure in the schema file.
16  * A single instance of the CellFormatter is created for the Measure.
17  * <p>
18  * It is important that different CellFormatter's, CellFormatter that will
19  * be used to format different Measures in different ways, implement
20  * the <code>equals</code> and <code>hashCode</code> methods so that
21  * the different CellFormatter are not treated as being the same in
22  * a java.util.Collection.
23  */

24 public interface CellFormatter {
25
26     /**
27      * user provided cell formatting function
28      * @param value
29      * @return the formatted value
30      */

31     String JavaDoc formatCell(Object JavaDoc value);
32
33 }
34
35 // End CellFormatter.java
36

37
Popular Tags