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: * An abstract representation of a report text element. It provides basic functionality for static texts and text fields.
032: *
033: * @author Teodor Danciu (teodord@users.sourceforge.net)
034: * @version $Id: JRTextElement.java 1444 2006-10-24 14:04:48Z ionut $
035: */
036: public interface JRTextElement extends JRElement, JRAlignment, JRBox,
037: JRFont {
038:
039: /**
040: * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_LEFT}.
041: */
042: public static final byte TEXT_ALIGN_LEFT = HORIZONTAL_ALIGN_LEFT;
043: /**
044: * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_CENTER}.
045: */
046: public static final byte TEXT_ALIGN_CENTER = HORIZONTAL_ALIGN_CENTER;
047: /**
048: * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_RIGHT}.
049: */
050: public static final byte TEXT_ALIGN_RIGHT = HORIZONTAL_ALIGN_RIGHT;
051: /**
052: * @deprecated Replaced by {@link JRAlignment#HORIZONTAL_ALIGN_JUSTIFIED}.
053: */
054: public static final byte TEXT_ALIGN_JUSTIFIED = HORIZONTAL_ALIGN_JUSTIFIED;
055:
056: /**
057: * Constant useful for displaying the text without rotating it
058: */
059: public static final byte ROTATION_NONE = 0;
060:
061: /**
062: * Constant useful for rotating the text 90 degrees counter clockwise.
063: */
064: public static final byte ROTATION_LEFT = 1;
065:
066: /**
067: * Constant useful for rotating the text 90 degrees clockwise.
068: */
069: public static final byte ROTATION_RIGHT = 2;
070:
071: /**
072: * Constant useful for rotating the text 180 degrees.
073: */
074: public static final byte ROTATION_UPSIDE_DOWN = 3;
075:
076: /**
077: * Constant for setting normal spacing between lines.
078: */
079: public static final byte LINE_SPACING_SINGLE = 0;
080:
081: /**
082: * Constant for setting spacing between lines to 50% more than normal.
083: */
084: public static final byte LINE_SPACING_1_1_2 = 1;
085:
086: /**
087: * Constant for setting spacing between lines to double size.
088: */
089: public static final byte LINE_SPACING_DOUBLE = 2;
090:
091: /**
092: * Gets the text horizontal alignment.
093: * @return a value representing one of the horizontal alignment constants in {@link JRAlignment}
094: * @deprecated Replaced by {@link #getHorizontalAlignment()}.
095: */
096: public byte getTextAlignment();
097:
098: /**
099: * Sets the text horizontal alignment.
100: * @param horizontalAlignment a value representing one of the horizontal alignment constants in {@link JRAlignment}
101: * @deprecated Replaced by {@link #setHorizontalAlignment(byte)}.
102: */
103: public void setTextAlignment(byte horizontalAlignment);
104:
105: /**
106: * Gets the text rotation.
107: * @return a value representing one of the rotation constants in this class
108: */
109: public byte getRotation();
110:
111: public Byte getOwnRotation();
112:
113: /**
114: * Sets the text rotation.
115: * @param rotation a value representing one of the rotation constants in this class
116: */
117: public void setRotation(byte rotation);
118:
119: public void setRotation(Byte rotation);
120:
121: /**
122: * Gets the line spacing.
123: * @return a value representing one of the line spacing constants in this class
124: */
125: public byte getLineSpacing();
126:
127: public Byte getOwnLineSpacing();
128:
129: /**
130: * Sets the line spacing.
131: * @param lineSpacing a value representing one of the line spacing constants in this class
132: */
133: public void setLineSpacing(byte lineSpacing);
134:
135: public void setLineSpacing(Byte lineSpacing);
136:
137: /**
138: * Returns true if the text can contain style tags.
139: */
140: public boolean isStyledText();
141:
142: public Boolean isOwnStyledText();
143:
144: /**
145: * Specifies whether the text can contain style tags.
146: */
147: public void setStyledText(boolean isStyledText);
148:
149: public void setStyledText(Boolean isStyledText);
150:
151: /**
152: * Returns an object containing all border and padding properties for this text element
153: * @deprecated
154: */
155: public JRBox getBox();
156:
157: /**
158: * Returns an object containing all font properties for this text element
159: * @deprecated
160: */
161: public JRFont getFont();
162:
163: }
|