KickJava   Java API By Example, From Geeks To Geeks.

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


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  * @author Teodor Danciu (teodord@users.sourceforge.net)
33  * @version $Id: JRPrintText.java 1485 2006-11-14 20:23:17 +0200 (Tue, 14 Nov 2006) teodord $
34  */

35 public interface JRPrintText extends JRPrintElement, JRAlignment, JRPrintAnchor, JRPrintHyperlink, JRBox, JRFont
36 {
37
38
39     /**
40      *
41      */

42     public static final byte RUN_DIRECTION_LTR = 0;
43     public static final byte RUN_DIRECTION_RTL = 1;
44
45     
46     /**
47      *
48      */

49     public String JavaDoc getText();
50         
51     /**
52      *
53      */

54     public void setText(String JavaDoc text);
55
56     /**
57      *
58      */

59     public float getLineSpacingFactor();
60         
61     /**
62      *
63      */

64     public void setLineSpacingFactor(float lineSpacingFactor);
65
66     /**
67      *
68      */

69     public float getLeadingOffset();
70         
71     /**
72      *
73      */

74     public void setLeadingOffset(float leadingOffset);
75
76     /**
77      * @deprecated Replaced by {@link #getHorizontalAlignment()}.
78      */

79     public byte getTextAlignment();
80         
81     /**
82      * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
83      */

84     public void setTextAlignment(byte horizontalAlignment);
85         
86     /**
87      *
88      */

89     public byte getRotation();
90         
91     /**
92      *
93      */

94     public Byte JavaDoc getOwnRotation();
95         
96     /**
97      *
98      */

99     public void setRotation(byte rotation);
100         
101     /**
102      *
103      */

104     public void setRotation(Byte JavaDoc rotation);
105         
106     /**
107      *
108      */

109     public byte getRunDirection();
110         
111     /**
112      *
113      */

114     public void setRunDirection(byte rotation);
115         
116     /**
117      *
118      */

119     public float getTextHeight();
120         
121     /**
122      *
123      */

124     public void setTextHeight(float textHeight);
125         
126     /**
127      *
128      */

129     public byte getLineSpacing();
130         
131     /**
132      *
133      */

134     public Byte JavaDoc getOwnLineSpacing();
135         
136     /**
137      *
138      */

139     public void setLineSpacing(byte lineSpacing);
140         
141     /**
142      *
143      */

144     public void setLineSpacing(Byte JavaDoc lineSpacing);
145         
146     /**
147      *
148      */

149     public boolean isStyledText();
150         
151     /**
152      *
153      */

154     public Boolean JavaDoc isOwnStyledText();
155         
156     /**
157      *
158      */

159     public void setStyledText(boolean isStyledText);
160         
161     /**
162      *
163      */

164     public void setStyledText(Boolean JavaDoc isStyledText);
165         
166     /**
167      * @deprecated
168      */

169     public JRBox getBox();
170
171     /**
172      * @deprecated
173      */

174     public void setBox(JRBox box);
175
176     /**
177      * @deprecated
178      */

179     public JRFont getFont();
180
181     /**
182      * @deprecated
183      */

184     public void setFont(JRFont font);
185     
186     /**
187      * Returns the type of the value which was used to generate this text.
188      * <p>
189      * {@link JRTextField Text fields} that have a non-<code>String</code> expression
190      * save the value type using this attribute. This information can be used by
191      * exporters to treat numerical or date texts (for instance) in a special manner.
192      * </p>
193      *
194      * @return the type of the original value used to generate the text
195      */

196     public String JavaDoc getValueClassName();
197     
198     /**
199      * Returns the pattern used to format a value that was the source of this text.
200      * <p>
201      * The pattern can be used to parse the text back to its source value.
202      * </p>
203      *
204      * @return the pattern used to format this text's source value
205      * @see #getValueClassName()
206      */

207     public String JavaDoc getPattern();
208     
209
210     /**
211      * Returns the name of the class implementing the {@link net.sf.jasperreports.engine.util.FormatFactory FormatFactory}
212      * interface to use with this text element, in case it is not the same as the one for the overall document.
213      */

214     public String JavaDoc getFormatFactoryClass();
215     
216     
217     /**
218      * Returns the code of the <code>java.util.Locale</code> which was used
219      * while formatting the source value of the text.
220      * <p>
221      * The code is created using the {@link java.util.Locale#toString() java.util.Locale.toString()}
222      * convention.
223      * </p>
224      * <p>
225      * When this attribute is null, the locale returned by
226      * {@link JasperPrint#getLocaleCode() JasperPrint.getLocaleCode()} is used.
227      * This way, the locale is specified in a single place when all the (or many ) texts from a print object
228      * were formatted using the same locale.
229      * </p>
230      *
231      * @return the code of the <code>java.util.Locale</code> used when formatting this text's source value
232      */

233     public String JavaDoc getLocaleCode();
234     
235     
236     /**
237      * Returns the {@link java.util.TimeZone#getID() ID} of the <code>java.util.TimeZone</code>
238      * used to format this text's date source value.
239      * <p>
240      * When this attribute is null, the time zone returned by
241      * {@link JasperPrint#getTimeZoneId() JasperPrint.getTimeZoneId()} is used.
242      * </p>
243      *
244      * @return the {@link java.util.TimeZone#getID() ID} of the <code>java.util.TimeZone</code>
245      * used to format this text's date source value
246      */

247     public String JavaDoc getTimeZoneId();
248 }
249
Popular Tags