KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > crosstabs > JRCellContents


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * JasperSoft Corporation
24  * 303 Second Street, Suite 450 North
25  * San Francisco, CA 94107
26  * http://www.jaspersoft.com
27  */

28 package net.sf.jasperreports.crosstabs;
29
30 import java.awt.Color JavaDoc;
31
32 import net.sf.jasperreports.engine.JRBox;
33 import net.sf.jasperreports.engine.JRElementGroup;
34 import net.sf.jasperreports.engine.JRStyleContainer;
35
36 /**
37  * Crosstab cell contents interface.
38  * <p>
39  * This interface is used for both crosstab row/column headers and data cells.
40  * <p>
41  * There are some restrictions/rules regarding crosstab cells:
42  * <ul>
43  * <li>subreports, crosstabs and charts are not allowed</li>
44  * <li>delayed evaluation for text fields and images is not allowed</li>
45  * <li>cells cannot split on multiple pages</li>
46  * </ul>
47  *
48  * @author Lucian Chirita (lucianc@users.sourceforge.net)
49  * @version $Id: JRCellContents.java 1229 2006-04-19 13:27:35 +0300 (Wed, 19 Apr 2006) teodord $
50  */

51 public interface JRCellContents extends JRElementGroup, JRStyleContainer
52 {
53     /**
54      * Horizontal stretch position indicating that the contents will be rendered on the left side.
55      */

56     public static final byte POSITION_X_LEFT = 1;
57     
58     /**
59      * Horizontal stretch position indicating that the contents will be rendered on the center.
60      */

61     public static final byte POSITION_X_CENTER = 2;
62     
63     /**
64      * Horizontal stretch position indicating that the contents will be rendered on the right side.
65      */

66     public static final byte POSITION_X_RIGHT = 3;
67     
68     /**
69      * Horizontal stretch position indicating that the contents will be horizontally stretched.
70      */

71     public static final byte POSITION_X_STRETCH = 4;
72     
73     /**
74      * Vertical stretch position indicating that the contents will be rendered on the top.
75      */

76     public static final byte POSITION_Y_TOP = 1;
77     
78     /**
79      * Vertical stretch position indicating that the contents will be rendered on the middle.
80      */

81     public static final byte POSITION_Y_MIDDLE = 2;
82     
83     /**
84      * Vertical stretch position indicating that the contents will be rendered on the bottom.
85      */

86     public static final byte POSITION_Y_BOTTOM = 3;
87     
88     /**
89      * Vertical stretch position indicating that the contents will be rendered vertically stretched.
90      */

91     public static final byte POSITION_Y_STRETCH = 4;
92
93     /**
94      * Width or height value indicating that the value has not been computed.
95      */

96     public static final int NOT_CALCULATED = Integer.MIN_VALUE;
97     
98     
99     /**
100      * Returns the cell background color.
101      * <p>
102      * The cell is filled with the background color only if the cell has opaque mode.
103      *
104      * @return the cell backcolor
105      */

106     public Color JavaDoc getBackcolor();
107     
108     
109     /**
110      * Returns the cell border.
111      *
112      * @return the cell border
113      */

114     public JRBox getBox();
115     
116     
117     /**
118      * Returns the computed cell width.
119      *
120      * @return the computed cell width
121      * @see #NOT_CALCULATED
122      */

123     public int getWidth();
124     
125         
126     /**
127      * Returns the computed cell height.
128      *
129      * @return the computed cell height
130      * @see #NOT_CALCULATED
131      */

132     public int getHeight();
133     
134     
135     /**
136      * Returns the cell transparency mode.
137      *
138      * @return {@link net.sf.jasperreports.engine.JRElement#MODE_OPAQUE MODE_OPAQUE}
139      * or {@link net.sf.jasperreports.engine.JRElement#MODE_TRANSPARENT MODE_TRANSPARENT}
140      */

141     public Byte JavaDoc getMode();
142 }
143
Popular Tags