KickJava   Java API By Example, From Geeks To Geeks.

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


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 import net.sf.jasperreports.engine.util.JRProperties;
31
32
33 /**
34  * An abstract representation of a font. Fonts in JasperReports are very complex because of the library portability
35  * across operating systems and export formats. This interface provides basic font functionality methods for
36  * managing font attributes and special PDF font attributes.
37  * <p>
38  * Users can define report level fonts that can be referenced by name in text elements. Their default properties
39  * can be overriden in each element (for example, a text element can use a report level font and just change its
40  * "underline" attribute). All the "own" methods in this class actually return the override values of font properties.
41  * @author Teodor Danciu (teodord@users.sourceforge.net)
42  * @version $Id: JRFont.java 1504 2006-11-22 17:13:56 +0200 (Wed, 22 Nov 2006) teodord $
43  */

44 public interface JRFont extends JRStyleContainer
45 {
46
47     public static final String JavaDoc DEFAULT_FONT_NAME = JRProperties.PROPERTY_PREFIX + "default.font.name";
48     public static final String JavaDoc DEFAULT_FONT_SIZE = JRProperties.PROPERTY_PREFIX + "default.font.size";
49     public static final String JavaDoc DEFAULT_PDF_FONT_NAME = JRProperties.PROPERTY_PREFIX + "default.pdf.font.name";
50     public static final String JavaDoc DEFAULT_PDF_ENCODING = JRProperties.PROPERTY_PREFIX + "default.pdf.encoding";
51     public static final String JavaDoc DEFAULT_PDF_EMBEDDED = JRProperties.PROPERTY_PREFIX + "default.pdf.embedded";
52
53     /**
54      *
55      */

56     public JRReportFont getReportFont();
57     
58     /**
59      *
60      */

61     public void setReportFont(JRReportFont reportFont);
62
63     /**
64      *
65      */

66     public String JavaDoc getFontName();
67     
68     /**
69      *
70      */

71     public String JavaDoc getOwnFontName();
72     
73     /**
74      *
75      */

76     public void setFontName(String JavaDoc fontName);
77     
78     /**
79      *
80      */

81     public boolean isBold();
82     
83     /**
84      *
85      */

86     public Boolean JavaDoc isOwnBold();
87     
88     /**
89      *
90      */

91     public void setBold(boolean isBold);
92     
93     /**
94      *
95      */

96     public void setBold(Boolean JavaDoc isBold);
97     
98     /**
99      *
100      */

101     public boolean isItalic();
102     
103     /**
104      *
105      */

106     public Boolean JavaDoc isOwnItalic();
107     
108     /**
109      *
110      */

111     public void setItalic(boolean isItalic);
112     
113     /**
114      *
115      */

116     public void setItalic(Boolean JavaDoc isItalic);
117     
118     /**
119      *
120      */

121     public boolean isUnderline();
122     
123     /**
124      *
125      */

126     public Boolean JavaDoc isOwnUnderline();
127     
128     /**
129      *
130      */

131     public void setUnderline(boolean isUnderline);
132     
133     /**
134      *
135      */

136     public void setUnderline(Boolean JavaDoc isUnderline);
137     
138     /**
139      *
140      */

141     public boolean isStrikeThrough();
142     
143     /**
144      *
145      */

146     public Boolean JavaDoc isOwnStrikeThrough();
147     
148     /**
149      *
150      */

151     public void setStrikeThrough(boolean isStrikeThrough);
152
153     /**
154      *
155      */

156     public void setStrikeThrough(Boolean JavaDoc isStrikeThrough);
157
158     /**
159      * @deprecated Replaced by {@link #getFontSize()}.
160      */

161     public int getSize();
162     
163     /**
164      * @deprecated Replaced by {@link #getOwnFontSize()}.
165      */

166     public Integer JavaDoc getOwnSize();
167     
168     /**
169      * @deprecated Replaced by {@link #setFontSize(int)}.
170      */

171     public void setSize(int size);
172
173     /**
174      * @deprecated Replaced by {@link #setFontSize(Integer)}.
175      */

176     public void setSize(Integer JavaDoc size);
177
178     /**
179      *
180      */

181     public int getFontSize();
182     
183     /**
184      *
185      */

186     public Integer JavaDoc getOwnFontSize();
187     
188     /**
189      *
190      */

191     public void setFontSize(int fontSize);
192
193     /**
194      *
195      */

196     public void setFontSize(Integer JavaDoc fontSize);
197
198     /**
199      *
200      */

201     public String JavaDoc getPdfFontName();
202     
203     /**
204      *
205      */

206     public String JavaDoc getOwnPdfFontName();
207     
208     /**
209      *
210      */

211     public void setPdfFontName(String JavaDoc pdfFontName);
212
213     /**
214      *
215      */

216     public String JavaDoc getPdfEncoding();
217     
218     /**
219      *
220      */

221     public String JavaDoc getOwnPdfEncoding();
222     
223     /**
224      *
225      */

226     public void setPdfEncoding(String JavaDoc pdfEncoding);
227
228     /**
229      *
230      */

231     public boolean isPdfEmbedded();
232
233     /**
234      *
235      */

236     public Boolean JavaDoc isOwnPdfEmbedded();
237
238     /**
239      *
240      */

241     public void setPdfEmbedded(boolean isPdfEmbedded);
242     
243     /**
244      *
245      */

246     public void setPdfEmbedded(Boolean JavaDoc isPdfEmbedded);
247
248 }
249
Popular Tags