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.fill;
029:
030: import java.awt.Color;
031: import java.io.Serializable;
032:
033: import net.sf.jasperreports.engine.JRConstants;
034: import net.sf.jasperreports.engine.JRDefaultStyleProvider;
035: import net.sf.jasperreports.engine.JRPrintElement;
036: import net.sf.jasperreports.engine.JRStyle;
037:
038: /**
039: * @author Teodor Danciu (teodord@users.sourceforge.net)
040: * @version $Id: JRTemplatePrintElement.java 1759 2007-06-20 16:47:34Z lucianc $
041: */
042: public class JRTemplatePrintElement implements JRPrintElement,
043: Serializable {
044:
045: /**
046: *
047: */
048: private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
049:
050: /**
051: *
052: */
053: protected JRTemplateElement template = null;
054:
055: private int x = 0;
056: private int y = 0;
057: private int height = 0;
058: private int width = 0;
059:
060: /**
061: *
062: */
063: protected JRTemplatePrintElement(JRTemplateElement element) {
064: template = element;
065: }
066:
067: /**
068: *
069: */
070: public JRDefaultStyleProvider getDefaultStyleProvider() {
071: return template.getDefaultStyleProvider();
072: }
073:
074: /**
075: *
076: */
077: public JRStyle getStyle() {
078: return template.getStyle();
079: }
080:
081: /**
082: *
083: */
084: public void setStyle(JRStyle style) {
085: }
086:
087: /**
088: *
089: */
090: public byte getMode() {
091: return this .template.getMode();
092: }
093:
094: /**
095: *
096: */
097: public Byte getOwnMode() {
098: return this .template.getOwnMode();
099: }
100:
101: /**
102: *
103: */
104: public void setMode(byte mode) {
105: }
106:
107: /**
108: *
109: */
110: public void setMode(Byte mode) {
111: }
112:
113: /**
114: *
115: */
116: public int getX() {
117: return this .x;
118: }
119:
120: /**
121: *
122: */
123: public void setX(int x) {
124: this .x = x;
125: }
126:
127: /**
128: *
129: */
130: public int getY() {
131: return this .y;
132: }
133:
134: /**
135: *
136: */
137: public void setY(int y) {
138: this .y = y;
139: }
140:
141: /**
142: *
143: */
144: public int getWidth() {
145: return this .width;
146: }
147:
148: /**
149: *
150: */
151: public void setWidth(int width) {
152: this .width = width;
153: }
154:
155: /**
156: *
157: */
158: public int getHeight() {
159: return this .height;
160: }
161:
162: /**
163: *
164: */
165: public void setHeight(int height) {
166: this .height = height;
167: }
168:
169: /**
170: *
171: */
172: public Color getForecolor() {
173: return this .template.getForecolor();
174: }
175:
176: /**
177: *
178: */
179: public Color getOwnForecolor() {
180: return this .template.getOwnForecolor();
181: }
182:
183: /**
184: *
185: */
186: public void setForecolor(Color color) {
187: }
188:
189: /**
190: *
191: */
192: public Color getBackcolor() {
193: return this .template.getBackcolor();
194: }
195:
196: /**
197: *
198: */
199: public Color getOwnBackcolor() {
200: return this .template.getOwnBackcolor();
201: }
202:
203: /**
204: *
205: */
206: public void setBackcolor(Color color) {
207: }
208:
209: public JRTemplateElement getTemplate() {
210: return template;
211: }
212:
213: public void setTemplate(JRTemplateElement template) {
214: this .template = template;
215: }
216:
217: public String getKey() {
218: return template.getKey();
219: }
220:
221: /**
222: * Returns null as external style references are not allowed for print objects.
223: */
224: public String getStyleNameReference() {
225: return null;
226: }
227: }
|