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: /**
031: * @author Teodor Danciu (teodord@users.sourceforge.net)
032: * @version $Id: JRPrintText.java 1485 2006-11-14 18:23:17Z teodord $
033: */
034: public interface JRPrintText extends JRPrintElement, JRAlignment,
035: JRPrintAnchor, JRPrintHyperlink, JRBox, JRFont {
036:
037: /**
038: *
039: */
040: public static final byte RUN_DIRECTION_LTR = 0;
041: public static final byte RUN_DIRECTION_RTL = 1;
042:
043: /**
044: *
045: */
046: public String getText();
047:
048: /**
049: *
050: */
051: public void setText(String text);
052:
053: /**
054: *
055: */
056: public float getLineSpacingFactor();
057:
058: /**
059: *
060: */
061: public void setLineSpacingFactor(float lineSpacingFactor);
062:
063: /**
064: *
065: */
066: public float getLeadingOffset();
067:
068: /**
069: *
070: */
071: public void setLeadingOffset(float leadingOffset);
072:
073: /**
074: * @deprecated Replaced by {@link #getHorizontalAlignment()}.
075: */
076: public byte getTextAlignment();
077:
078: /**
079: * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
080: */
081: public void setTextAlignment(byte horizontalAlignment);
082:
083: /**
084: *
085: */
086: public byte getRotation();
087:
088: /**
089: *
090: */
091: public Byte getOwnRotation();
092:
093: /**
094: *
095: */
096: public void setRotation(byte rotation);
097:
098: /**
099: *
100: */
101: public void setRotation(Byte rotation);
102:
103: /**
104: *
105: */
106: public byte getRunDirection();
107:
108: /**
109: *
110: */
111: public void setRunDirection(byte rotation);
112:
113: /**
114: *
115: */
116: public float getTextHeight();
117:
118: /**
119: *
120: */
121: public void setTextHeight(float textHeight);
122:
123: /**
124: *
125: */
126: public byte getLineSpacing();
127:
128: /**
129: *
130: */
131: public Byte getOwnLineSpacing();
132:
133: /**
134: *
135: */
136: public void setLineSpacing(byte lineSpacing);
137:
138: /**
139: *
140: */
141: public void setLineSpacing(Byte lineSpacing);
142:
143: /**
144: *
145: */
146: public boolean isStyledText();
147:
148: /**
149: *
150: */
151: public Boolean isOwnStyledText();
152:
153: /**
154: *
155: */
156: public void setStyledText(boolean isStyledText);
157:
158: /**
159: *
160: */
161: public void setStyledText(Boolean isStyledText);
162:
163: /**
164: * @deprecated
165: */
166: public JRBox getBox();
167:
168: /**
169: * @deprecated
170: */
171: public void setBox(JRBox box);
172:
173: /**
174: * @deprecated
175: */
176: public JRFont getFont();
177:
178: /**
179: * @deprecated
180: */
181: public void setFont(JRFont font);
182:
183: /**
184: * Returns the type of the value which was used to generate this text.
185: * <p>
186: * {@link JRTextField Text fields} that have a non-<code>String</code> expression
187: * save the value type using this attribute. This information can be used by
188: * exporters to treat numerical or date texts (for instance) in a special manner.
189: * </p>
190: *
191: * @return the type of the original value used to generate the text
192: */
193: public String getValueClassName();
194:
195: /**
196: * Returns the pattern used to format a value that was the source of this text.
197: * <p>
198: * The pattern can be used to parse the text back to its source value.
199: * </p>
200: *
201: * @return the pattern used to format this text's source value
202: * @see #getValueClassName()
203: */
204: public String getPattern();
205:
206: /**
207: * Returns the name of the class implementing the {@link net.sf.jasperreports.engine.util.FormatFactory FormatFactory}
208: * interface to use with this text element, in case it is not the same as the one for the overall document.
209: */
210: public String getFormatFactoryClass();
211:
212: /**
213: * Returns the code of the <code>java.util.Locale</code> which was used
214: * while formatting the source value of the text.
215: * <p>
216: * The code is created using the {@link java.util.Locale#toString() java.util.Locale.toString()}
217: * convention.
218: * </p>
219: * <p>
220: * When this attribute is null, the locale returned by
221: * {@link JasperPrint#getLocaleCode() JasperPrint.getLocaleCode()} is used.
222: * This way, the locale is specified in a single place when all the (or many ) texts from a print object
223: * were formatted using the same locale.
224: * </p>
225: *
226: * @return the code of the <code>java.util.Locale</code> used when formatting this text's source value
227: */
228: public String getLocaleCode();
229:
230: /**
231: * Returns the {@link java.util.TimeZone#getID() ID} of the <code>java.util.TimeZone</code>
232: * used to format this text's date source value.
233: * <p>
234: * When this attribute is null, the time zone returned by
235: * {@link JasperPrint#getTimeZoneId() JasperPrint.getTimeZoneId()} is used.
236: * </p>
237: *
238: * @return the {@link java.util.TimeZone#getID() ID} of the <code>java.util.TimeZone</code>
239: * used to format this text's date source value
240: */
241: public String getTimeZoneId();
242: }
|