001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.engine;
029:
030: import net.sf.jasperreports.engine.util.JRProperties;
031:
032: /**
033: * An abstract representation of a font. Fonts in JasperReports are very complex because of the library portability
034: * across operating systems and export formats. This interface provides basic font functionality methods for
035: * managing font attributes and special PDF font attributes.
036: * <p>
037: * Users can define report level fonts that can be referenced by name in text elements. Their default properties
038: * can be overriden in each element (for example, a text element can use a report level font and just change its
039: * "underline" attribute). All the "own" methods in this class actually return the override values of font properties.
040: * @author Teodor Danciu (teodord@users.sourceforge.net)
041: * @version $Id: JRFont.java 1504 2006-11-22 15:13:56Z teodord $
042: */
043: public interface JRFont extends JRStyleContainer {
044:
045: public static final String DEFAULT_FONT_NAME = JRProperties.PROPERTY_PREFIX
046: + "default.font.name";
047: public static final String DEFAULT_FONT_SIZE = JRProperties.PROPERTY_PREFIX
048: + "default.font.size";
049: public static final String DEFAULT_PDF_FONT_NAME = JRProperties.PROPERTY_PREFIX
050: + "default.pdf.font.name";
051: public static final String DEFAULT_PDF_ENCODING = JRProperties.PROPERTY_PREFIX
052: + "default.pdf.encoding";
053: public static final String DEFAULT_PDF_EMBEDDED = JRProperties.PROPERTY_PREFIX
054: + "default.pdf.embedded";
055:
056: /**
057: *
058: */
059: public JRReportFont getReportFont();
060:
061: /**
062: *
063: */
064: public void setReportFont(JRReportFont reportFont);
065:
066: /**
067: *
068: */
069: public String getFontName();
070:
071: /**
072: *
073: */
074: public String getOwnFontName();
075:
076: /**
077: *
078: */
079: public void setFontName(String fontName);
080:
081: /**
082: *
083: */
084: public boolean isBold();
085:
086: /**
087: *
088: */
089: public Boolean isOwnBold();
090:
091: /**
092: *
093: */
094: public void setBold(boolean isBold);
095:
096: /**
097: *
098: */
099: public void setBold(Boolean isBold);
100:
101: /**
102: *
103: */
104: public boolean isItalic();
105:
106: /**
107: *
108: */
109: public Boolean isOwnItalic();
110:
111: /**
112: *
113: */
114: public void setItalic(boolean isItalic);
115:
116: /**
117: *
118: */
119: public void setItalic(Boolean isItalic);
120:
121: /**
122: *
123: */
124: public boolean isUnderline();
125:
126: /**
127: *
128: */
129: public Boolean isOwnUnderline();
130:
131: /**
132: *
133: */
134: public void setUnderline(boolean isUnderline);
135:
136: /**
137: *
138: */
139: public void setUnderline(Boolean isUnderline);
140:
141: /**
142: *
143: */
144: public boolean isStrikeThrough();
145:
146: /**
147: *
148: */
149: public Boolean isOwnStrikeThrough();
150:
151: /**
152: *
153: */
154: public void setStrikeThrough(boolean isStrikeThrough);
155:
156: /**
157: *
158: */
159: public void setStrikeThrough(Boolean isStrikeThrough);
160:
161: /**
162: * @deprecated Replaced by {@link #getFontSize()}.
163: */
164: public int getSize();
165:
166: /**
167: * @deprecated Replaced by {@link #getOwnFontSize()}.
168: */
169: public Integer getOwnSize();
170:
171: /**
172: * @deprecated Replaced by {@link #setFontSize(int)}.
173: */
174: public void setSize(int size);
175:
176: /**
177: * @deprecated Replaced by {@link #setFontSize(Integer)}.
178: */
179: public void setSize(Integer size);
180:
181: /**
182: *
183: */
184: public int getFontSize();
185:
186: /**
187: *
188: */
189: public Integer getOwnFontSize();
190:
191: /**
192: *
193: */
194: public void setFontSize(int fontSize);
195:
196: /**
197: *
198: */
199: public void setFontSize(Integer fontSize);
200:
201: /**
202: *
203: */
204: public String getPdfFontName();
205:
206: /**
207: *
208: */
209: public String getOwnPdfFontName();
210:
211: /**
212: *
213: */
214: public void setPdfFontName(String pdfFontName);
215:
216: /**
217: *
218: */
219: public String getPdfEncoding();
220:
221: /**
222: *
223: */
224: public String getOwnPdfEncoding();
225:
226: /**
227: *
228: */
229: public void setPdfEncoding(String pdfEncoding);
230:
231: /**
232: *
233: */
234: public boolean isPdfEmbedded();
235:
236: /**
237: *
238: */
239: public Boolean isOwnPdfEmbedded();
240:
241: /**
242: *
243: */
244: public void setPdfEmbedded(boolean isPdfEmbedded);
245:
246: /**
247: *
248: */
249: public void setPdfEmbedded(Boolean isPdfEmbedded);
250:
251: }
|