KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > JRTextElement


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.engine;
29
30
31 /**
32  * An abstract representation of a report text element. It provides basic functionality for static texts and text fields.
33  *
34  * @author Teodor Danciu (teodord@users.sourceforge.net)
35  * @version $Id: JRTextElement.java 1444 2006-10-24 17:04:48 +0300 (Tue, 24 Oct 2006) ionut $
36  */

37 public interface JRTextElement extends JRElement, JRAlignment, JRBox, JRFont
38 {
39
40
41     /**
42      * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_LEFT}.
43      */

44     public static final byte TEXT_ALIGN_LEFT = HORIZONTAL_ALIGN_LEFT;
45     /**
46      * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_CENTER}.
47      */

48     public static final byte TEXT_ALIGN_CENTER = HORIZONTAL_ALIGN_CENTER;
49     /**
50      * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_RIGHT}.
51      */

52     public static final byte TEXT_ALIGN_RIGHT = HORIZONTAL_ALIGN_RIGHT;
53     /**
54      * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_JUSTIFIED}.
55      */

56     public static final byte TEXT_ALIGN_JUSTIFIED = HORIZONTAL_ALIGN_JUSTIFIED;
57
58     /**
59      * Constant useful for displaying the text without rotating it
60      */

61     public static final byte ROTATION_NONE = 0;
62
63     /**
64      * Constant useful for rotating the text 90 degrees counter clockwise.
65      */

66     public static final byte ROTATION_LEFT = 1;
67
68     /**
69      * Constant useful for rotating the text 90 degrees clockwise.
70      */

71     public static final byte ROTATION_RIGHT = 2;
72
73     /**
74      * Constant useful for rotating the text 180 degrees.
75      */

76     public static final byte ROTATION_UPSIDE_DOWN = 3;
77
78     /**
79      * Constant for setting normal spacing between lines.
80      */

81     public static final byte LINE_SPACING_SINGLE = 0;
82
83     /**
84      * Constant for setting spacing between lines to 50% more than normal.
85      */

86     public static final byte LINE_SPACING_1_1_2 = 1;
87
88     /**
89      * Constant for setting spacing between lines to double size.
90      */

91     public static final byte LINE_SPACING_DOUBLE = 2;
92
93
94     /**
95      * Gets the text horizontal alignment.
96      * @return a value representing one of the horizontal alignment constants in {@link JRAlignment}
97      * @deprecated Replaced by {@link #getHorizontalAlignment()}.
98      */

99     public byte getTextAlignment();
100
101     /**
102      * Sets the text horizontal alignment.
103      * @param horizontalAlignment a value representing one of the horizontal alignment constants in {@link JRAlignment}
104      * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
105      */

106     public void setTextAlignment(byte horizontalAlignment);
107
108     /**
109      * Gets the text rotation.
110      * @return a value representing one of the rotation constants in this class
111      */

112     public byte getRotation();
113         
114     public Byte JavaDoc getOwnRotation();
115
116     /**
117      * Sets the text rotation.
118      * @param rotation a value representing one of the rotation constants in this class
119      */

120     public void setRotation(byte rotation);
121         
122     public void setRotation(Byte JavaDoc rotation);
123     
124     /**
125      * Gets the line spacing.
126      * @return a value representing one of the line spacing constants in this class
127      */

128     public byte getLineSpacing();
129
130     public Byte JavaDoc getOwnLineSpacing();
131     /**
132      * Sets the line spacing.
133      * @param lineSpacing a value representing one of the line spacing constants in this class
134      */

135     public void setLineSpacing(byte lineSpacing);
136         
137     public void setLineSpacing(Byte JavaDoc lineSpacing);
138     
139     /**
140      * Returns true if the text can contain style tags.
141      */

142     public boolean isStyledText();
143
144     public Boolean JavaDoc isOwnStyledText();
145     /**
146      * Specifies whether the text can contain style tags.
147      */

148     public void setStyledText(boolean isStyledText);
149         
150     public void setStyledText(Boolean JavaDoc isStyledText);
151     
152     /**
153      * Returns an object containing all border and padding properties for this text element
154      * @deprecated
155      */

156     public JRBox getBox();
157
158     /**
159      * Returns an object containing all font properties for this text element
160      * @deprecated
161      */

162     public JRFont getFont();
163
164     
165 }
166
Popular Tags