1
24 package net.sf.jasperreports.engine.fill;
25
26 import net.sf.jasperreports.engine.JRDefaultStyleProvider;
27 import net.sf.jasperreports.engine.JRParagraph;
28 import net.sf.jasperreports.engine.JRParagraphContainer;
29 import net.sf.jasperreports.engine.JRStyle;
30 import net.sf.jasperreports.engine.TabStop;
31 import net.sf.jasperreports.engine.type.LineSpacingEnum;
32
33
36 public class CachingParagraph implements JRParagraph
37 {
38
39 private final JRParagraph base;
40
41 private final LineSpacingEnum lineSpacing;
42 private final Float lineSpacingSize;
43 private final Integer firstLineIndent;
44 private final Integer leftIndent;
45 private final Integer rightIndent;
46 private final Integer spacingBefore;
47 private final Integer spacingAfter;
48
49 public CachingParagraph(JRParagraph base)
50 {
51 this.base = base;
52
53 this.lineSpacing = base.getLineSpacing();
54 this.lineSpacingSize = base.getLineSpacingSize();
55 this.firstLineIndent = base.getFirstLineIndent();
56 this.leftIndent = base.getLeftIndent();
57 this.rightIndent = base.getRightIndent();
58 this.spacingBefore = base.getSpacingBefore();
59 this.spacingAfter = base.getSpacingAfter();
60 }
61
62
65 @Override
66 public JRDefaultStyleProvider getDefaultStyleProvider()
67 {
68 return base.getParagraphContainer().getDefaultStyleProvider();
69 }
70
71
74 @Override
75 public JRStyle getStyle()
76 {
77 return base.getParagraphContainer().getStyle();
78 }
79
80
83 @Override
84 public String getStyleNameReference()
85 {
86 return base.getParagraphContainer().getStyleNameReference();
87 }
88
89 @Override
90 public JRParagraphContainer getParagraphContainer()
91 {
92 return base.getParagraphContainer();
93 }
94
95 @Override
96 public JRParagraph clone(JRParagraphContainer paragraphContainer)
97 {
98
99 return base.clone(paragraphContainer);
100 }
101
102
103 @Override
104 public LineSpacingEnum getLineSpacing()
105 {
106 return lineSpacing;
107 }
108
109 @Override
110 public LineSpacingEnum getOwnLineSpacing()
111 {
112 return base.getOwnLineSpacing();
113 }
114
115 @Override
116 public void setLineSpacing(LineSpacingEnum lineSpacing)
117 {
118 throw new UnsupportedOperationException();
119 }
120
121 @Override
122 public Float getLineSpacingSize()
123 {
124 return lineSpacingSize;
125 }
126
127 @Override
128 public Float getOwnLineSpacingSize()
129 {
130 return base.getOwnLineSpacingSize();
131 }
132
133 @Override
134 public void setLineSpacingSize(Float lineSpacingSize)
135 {
136 throw new UnsupportedOperationException();
137 }
138
139
140 @Override
141 public Integer getLeftIndent()
142 {
143 return leftIndent;
144 }
145
146 @Override
147 public Integer getOwnLeftIndent()
148 {
149 return base.getOwnLeftIndent();
150 }
151
152 @Override
153 public void setLeftIndent(Integer leftIndent)
154 {
155 throw new UnsupportedOperationException();
156 }
157
158
159 @Override
160 public Integer getFirstLineIndent()
161 {
162 return firstLineIndent;
163 }
164
165 @Override
166 public Integer getOwnFirstLineIndent()
167 {
168 return base.getOwnFirstLineIndent();
169 }
170
171 @Override
172 public void setFirstLineIndent(Integer firstLineIndent)
173 {
174 throw new UnsupportedOperationException();
175 }
176
177 @Override
178 public Integer getRightIndent()
179 {
180 return rightIndent;
181 }
182
183 @Override
184 public Integer getOwnRightIndent()
185 {
186 return base.getOwnRightIndent();
187 }
188
189 @Override
190 public void setRightIndent(Integer rightIndent)
191 {
192 throw new UnsupportedOperationException();
193 }
194
195 @Override
196 public Integer getSpacingBefore()
197 {
198 return spacingBefore;
199 }
200
201 @Override
202 public Integer getOwnSpacingBefore()
203 {
204 return base.getOwnSpacingBefore();
205 }
206
207 @Override
208 public void setSpacingBefore(Integer spacingBefore)
209 {
210 throw new UnsupportedOperationException();
211 }
212
213 @Override
214 public Integer getSpacingAfter()
215 {
216 return spacingAfter;
217 }
218
219 @Override
220 public Integer getOwnSpacingAfter()
221 {
222 return base.getOwnSpacingAfter();
223 }
224
225 @Override
226 public void setSpacingAfter(Integer spacingAfter)
227 {
228 throw new UnsupportedOperationException();
229 }
230
231 @Override
232 public Integer getTabStopWidth()
233 {
234
235 return base.getTabStopWidth();
236 }
237
238 @Override
239 public Integer getOwnTabStopWidth()
240 {
241 return base.getOwnTabStopWidth();
242 }
243
244 @Override
245 public void setTabStopWidth(Integer tabStopWidth)
246 {
247 throw new UnsupportedOperationException();
248 }
249
250 @Override
251 public TabStop[] getTabStops()
252 {
253 return base.getTabStops();
254 }
255
256 @Override
257 public TabStop[] getOwnTabStops()
258 {
259 return base.getOwnTabStops();
260 }
261
262 @Override
263 public void addTabStop(TabStop tabStop)
264 {
265 throw new UnsupportedOperationException();
266 }
267
268 @Override
269 public void addTabStop(int index, TabStop tabStop)
270 {
271 throw new UnsupportedOperationException();
272 }
273
274 @Override
275 public void removeTabStop(int index)
276 {
277 throw new UnsupportedOperationException();
278 }
279
280 @Override
281 public void removeTabStop(TabStop tabStop)
282 {
283 throw new UnsupportedOperationException();
284 }
285
286 }
287