PdfPCell.java

1
/*
2
 * $Id: PdfPCell.java 4065 2009-09-16 23:09:11Z psoares33 $
3
 *
4
 * Copyright 2001, 2002 Paulo Soares
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7
 * (the "License"); you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the License.
13
 *
14
 * The Original Code is 'iText, a free JAVA-PDF library'.
15
 *
16
 * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17
 * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18
 * All Rights Reserved.
19
 * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20
 * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21
 *
22
 * Contributor(s): all the names of the contributors are added in the source code
23
 * where applicable.
24
 *
25
 * Alternatively, the contents of this file may be used under the terms of the
26
 * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27
 * provisions of LGPL are applicable instead of those above.  If you wish to
28
 * allow use of your version of this file only under the terms of the LGPL
29
 * License and not to allow others to use your version of this file under
30
 * the MPL, indicate your decision by deleting the provisions above and
31
 * replace them with the notice and other provisions required by the LGPL.
32
 * If you do not delete the provisions above, a recipient may use your version
33
 * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34
 *
35
 * This library is free software; you can redistribute it and/or modify it
36
 * under the terms of the MPL as stated above or under the terms of the GNU
37
 * Library General Public License as published by the Free Software Foundation;
38
 * either version 2 of the License, or any later version.
39
 *
40
 * This library is distributed in the hope that it will be useful, but WITHOUT
41
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42
 * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43
 * details.
44
 *
45
 * If you didn't download this code from the following link, you should check if
46
 * you aren't using an obsolete version:
47
 * http://www.lowagie.com/iText/
48
 */
49
50
package com.lowagie.text.pdf;
51
52
import java.util.List;
53
import com.lowagie.text.error_messages.MessageLocalization;
54
55
import com.lowagie.text.Chunk;
56
import com.lowagie.text.DocumentException;
57
import com.lowagie.text.Element;
58
59
import com.lowagie.text.Image;
60
import com.lowagie.text.Phrase;
61
import com.lowagie.text.Rectangle;
62
import com.lowagie.text.ExceptionConverter;
63
import com.lowagie.text.pdf.events.PdfPCellEventForwarder;
64
65
/**
66
 * A cell in a PdfPTable.
67
 */
68
69
public class PdfPCell extends Rectangle{
70
    
71
    private ColumnText column = new ColumnText(null);
72
    
73
    /** Vertical alignment of the cell. */
74
    private int verticalAlignment = Element.ALIGN_TOP;
75
    
76
    /** Left padding of the cell. */
77
    private float paddingLeft = 2;
78
    
79
    /** Right padding of the cell. */
80
    private float paddingRight = 2;
81
    
82
    /** Top padding of the cell. */
83
    private float paddingTop = 2;
84
    
85
    /** Bottom padding of the cell. */
86
    private float paddingBottom = 2;
87
    
88
    /** Fixed height of the cell. */
89
    private float fixedHeight = 0;
90
    
91
    /** Minimum height of the cell. */
92
    private float minimumHeight;
93
    
94
    /** Holds value of property noWrap. */
95
    private boolean noWrap = false;
96
    
97
    /** Holds value of property table. */
98
    private PdfPTable table;
99
100
    /** Holds value of property colspan. */
101
    private int colspan = 1;
102
103
    /**
104
     * Holds value of property rowspan.
105
     * @since    2.1.6
106
     */
107
    private int rowspan = 1;
108
    
109
    /** Holds value of property image. */
110
    private Image image;
111
    
112
    /** Holds value of property cellEvent. */
113
    private PdfPCellEvent cellEvent;
114
115
    /** Holds value of property useDescender. */
116
    private boolean useDescender;
117
118
    /** Increases padding to include border if true */
119
    private boolean useBorderPadding = false;
120
121
    /** The text in the cell. */
122
    protected Phrase phrase;
123
124
    /**
125
     * The rotation of the cell. Possible values are
126
     * 0, 90, 180 and 270.
127
     */
128
    private int rotation;
129
130
    /**
131
     * Constructs an empty <CODE>PdfPCell</CODE>.
132
     * The default padding is 2.
133
     */
134
    public PdfPCell() {
135
        super(0, 0, 0, 0);
136
        borderWidth = 0.5f;
137
        border = BOX;
138 1 1. : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
        column.setLeading(0, 1);
139
    }
140
141
    /**
142
     * Constructs a <CODE>PdfPCell</CODE> with a <CODE>Phrase</CODE>.
143
     * The default padding is 2.
144
     * 
145
     * @param phrase the text
146
     */
147
    public PdfPCell(Phrase phrase) {
148
        super(0, 0, 0, 0);
149
        borderWidth = 0.5f;
150
        border = BOX;
151 1 1. : removed call to com/lowagie/text/pdf/ColumnText::addText → NO_COVERAGE
        column.addText(this.phrase = phrase);
152 1 1. : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
        column.setLeading(0, 1);
153
    }
154
    
155
    /**
156
     * Constructs a <CODE>PdfPCell</CODE> with an <CODE>Image</CODE>.
157
     * The default padding is 0.
158
     * 
159
     * @param image the <CODE>Image</CODE>
160
     */
161
    public PdfPCell(Image image) {
162
        this(image, false);
163
    }
164
    
165
    /**
166
     * Constructs a <CODE>PdfPCell</CODE> with an <CODE>Image</CODE>.
167
     * The default padding is 0.25 for a border width of 0.5.
168
     * 
169
     * @param image the <CODE>Image</CODE>
170
     * @param fit <CODE>true</CODE> to fit the image to the cell
171
     */
172
    public PdfPCell(Image image, boolean fit) {
173
        super(0, 0, 0, 0);
174
        borderWidth = 0.5f;
175
        border = BOX;
176 1 1. : negated conditional → NO_COVERAGE
        if (fit) {
177
            this.image = image;
178 1 1. : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
            column.setLeading(0, 1);
179 2 1. : Replaced float division with multiplication → NO_COVERAGE
2. : removed call to com/lowagie/text/pdf/PdfPCell::setPadding → NO_COVERAGE
            setPadding(borderWidth / 2);
180
        }
181
        else {
182 1 1. : removed call to com/lowagie/text/pdf/ColumnText::addText → NO_COVERAGE
            column.addText(this.phrase = new Phrase(new Chunk(image, 0, 0)));
183 1 1. : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
            column.setLeading(0, 1);
184 1 1. : removed call to com/lowagie/text/pdf/PdfPCell::setPadding → NO_COVERAGE
            setPadding(0);
185
        }
186
    }
187
    
188
    /**
189
     * Constructs a <CODE>PdfPCell</CODE> with a <CODE>PdfPtable</CODE>.
190
     * This constructor allows nested tables.
191
     * The default padding is 0.
192
     * 
193
     * @param table The <CODE>PdfPTable</CODE>
194
     */
195
    public PdfPCell(PdfPTable table) {
196
        this(table, null);
197
    }
198
    
199
    /**
200
     * Constructs a <CODE>PdfPCell</CODE> with a <CODE>PdfPtable</CODE>.
201
     * This constructor allows nested tables.
202
     * 
203
     * @param table The <CODE>PdfPTable</CODE>
204
     * @param style    The style to apply to the cell (you could use getDefaultCell())
205
     * @since 2.1.0
206
     */
207
    public PdfPCell(PdfPTable table, PdfPCell style) {
208
        super(0, 0, 0, 0);
209
        borderWidth = 0.5f;
210
        border = BOX;
211 1 1. : removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE
        column.setLeading(0, 1);
212
        this.table = table;
213 1 1. : removed call to com/lowagie/text/pdf/PdfPTable::setWidthPercentage → NO_COVERAGE
        table.setWidthPercentage(100);
214 1 1. : removed call to com/lowagie/text/pdf/PdfPTable::setExtendLastRow → NO_COVERAGE
        table.setExtendLastRow(true);
215 1 1. : removed call to com/lowagie/text/pdf/ColumnText::addElement → NO_COVERAGE
        column.addElement(table);
216 1 1. : negated conditional → NO_COVERAGE
        if (style != null) {
217 1 1. : removed call to com/lowagie/text/pdf/PdfPCell::cloneNonPositionParameters → NO_COVERAGE
            cloneNonPositionParameters(style);
218
            verticalAlignment = style.verticalAlignment;
219
            paddingLeft = style.paddingLeft;
220
            paddingRight = style.paddingRight;
221
            paddingTop = style.paddingTop;
222
            paddingBottom = style.paddingBottom;
223
            colspan = style.colspan;
224
            rowspan = style.rowspan;
225
            cellEvent = style.cellEvent;
226
            useDescender = style.useDescender;
227
            useBorderPadding = style.useBorderPadding;
228
            rotation = style.rotation;
229
        }
230
        else
231 1 1. : removed call to com/lowagie/text/pdf/PdfPCell::setPadding → NO_COVERAGE
            setPadding(0);
232
    }
233
    
234
    /**
235
     * Constructs a deep copy of a <CODE>PdfPCell</CODE>.
236
     * 
237
     * @param cell the <CODE>PdfPCell</CODE> to duplicate
238
     */
239
    public PdfPCell(PdfPCell cell) {
240
        super(cell.llx, cell.lly, cell.urx, cell.ury);
241 1 1. : removed call to com/lowagie/text/pdf/PdfPCell::cloneNonPositionParameters → NO_COVERAGE
        cloneNonPositionParameters(cell);
242
        verticalAlignment = cell.verticalAlignment;
243
        paddingLeft = cell.paddingLeft;
244
        paddingRight = cell.paddingRight;
245
        paddingTop = cell.paddingTop;
246
        paddingBottom = cell.paddingBottom;
247
        phrase = cell.phrase;
248
        fixedHeight = cell.fixedHeight;
249
        minimumHeight = cell.minimumHeight;
250
        noWrap = cell.noWrap;
251
        colspan = cell.colspan;
252
        rowspan = cell.rowspan;
253 1 1. : negated conditional → NO_COVERAGE
        if (cell.table != null)
254
            table = new PdfPTable(cell.table);
255
        image = Image.getInstance(cell.image);
256
        cellEvent = cell.cellEvent;
257
        useDescender = cell.useDescender;
258
        column = ColumnText.duplicate(cell.column);
259
        useBorderPadding = cell.useBorderPadding;
260
        rotation = cell.rotation;
261
    }
262
    
263
    /**
264
     * Adds an iText element to the cell.
265
     * 
266
     * @param element
267
     */
268
    public void addElement(Element element) {
269 1 1. addElement : negated conditional → NO_COVERAGE
        if (table != null) {
270
            table = null;
271 1 1. addElement : removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE
            column.setText(null);
272
        }
273 1 1. addElement : removed call to com/lowagie/text/pdf/ColumnText::addElement → NO_COVERAGE
        column.addElement(element);
274
    }
275
    
276
    /**
277
     * Gets the <CODE>Phrase</CODE> from this cell.
278
     * 
279
     * @return the <CODE>Phrase</CODE>
280
     */
281
    public Phrase getPhrase() {
282
        return phrase;
283
    }
284
    
285
    /**
286
     * Sets the <CODE>Phrase</CODE> for this cell.
287
     * 
288
     * @param phrase the <CODE>Phrase</CODE>
289
     */
290
    public void setPhrase(Phrase phrase) {
291
        table = null;
292
        image = null;
293 1 1. setPhrase : removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE
        column.setText(this.phrase = phrase);
294
    }
295
    
296
    /**
297
     * Gets the horizontal alignment for the cell.
298
     * 
299
     * @return the horizontal alignment for the cell
300
     */
301
    public int getHorizontalAlignment() {
302
        return column.getAlignment();
303
    }
304
    
305
    /**
306
     * Sets the horizontal alignment for the cell. It could be
307
     * <CODE>Element.ALIGN_CENTER</CODE> for example.
308
     * 
309
     * @param horizontalAlignment The horizontal alignment
310
     */
311
    public void setHorizontalAlignment(int horizontalAlignment) {
312
        column.setAlignment(horizontalAlignment);
313
    }
314
    
315
    /**
316
     * Gets the vertical alignment for the cell.
317
     * 
318
     * @return the vertical alignment for the cell
319
     */
320
    public int getVerticalAlignment() {
321
        return verticalAlignment;
322
    }
323
    
324
    /**
325
     * Sets the vertical alignment for the cell. It could be
326
     * <CODE>Element.ALIGN_MIDDLE</CODE> for example.
327
     * 
328
     * @param verticalAlignment The vertical alignment
329
     */
330
    public void setVerticalAlignment(int verticalAlignment) {
331 1 1. setVerticalAlignment : negated conditional → NO_COVERAGE
        if (table != null)
332 2 1. setVerticalAlignment : negated conditional → NO_COVERAGE
2. setVerticalAlignment : removed call to com/lowagie/text/pdf/PdfPTable::setExtendLastRow → NO_COVERAGE
            table.setExtendLastRow(verticalAlignment == Element.ALIGN_TOP);
333
        this.verticalAlignment = verticalAlignment;
334
    }
335
    
336
    /**
337
     * Gets the effective left padding.
338
     * This will include the left border width if
339
     * {@link #isUseBorderPadding()} is true.
340
     * 
341
     * @return effective value of property paddingLeft.
342
     */
343
    public float getEffectivePaddingLeft() {
344 1 1. getEffectivePaddingLeft : negated conditional → NO_COVERAGE
        if (isUseBorderPadding()) {
345 2 1. getEffectivePaddingLeft : Replaced float division with multiplication → NO_COVERAGE
2. getEffectivePaddingLeft : negated conditional → NO_COVERAGE
            float border = getBorderWidthLeft() / (isUseVariableBorders() ? 1f : 2f);
346 2 1. getEffectivePaddingLeft : Replaced float addition with subtraction → NO_COVERAGE
2. getEffectivePaddingLeft : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingLeft → NO_COVERAGE
            return paddingLeft + border;
347
        }
348 1 1. getEffectivePaddingLeft : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingLeft → NO_COVERAGE
        return paddingLeft;
349
    }
350
    
351
    /**
352
     * @return Value of property paddingLeft.
353
     */
354
    public float getPaddingLeft() {
355
        return paddingLeft;
356
    }
357
358
    /**
359
     * Setter for property paddingLeft.
360
     * 
361
     * @param paddingLeft New value of property paddingLeft.
362
     */
363
    public void setPaddingLeft(float paddingLeft) {
364
        this.paddingLeft = paddingLeft;
365
    }
366
    
367
    /**
368
     * Gets the effective right padding.  This will include
369
     * the right border width if {@link #isUseBorderPadding()} is true.
370
     * 
371
     * @return effective value of property paddingRight.
372
     */
373
    public float getEffectivePaddingRight() {
374 1 1. getEffectivePaddingRight : negated conditional → NO_COVERAGE
        if (isUseBorderPadding()) {
375 2 1. getEffectivePaddingRight : Replaced float division with multiplication → NO_COVERAGE
2. getEffectivePaddingRight : negated conditional → NO_COVERAGE
            float border = getBorderWidthRight() / (isUseVariableBorders() ? 1f : 2f);
376 2 1. getEffectivePaddingRight : Replaced float addition with subtraction → NO_COVERAGE
2. getEffectivePaddingRight : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingRight → NO_COVERAGE
            return paddingRight + border;
377
        }
378 1 1. getEffectivePaddingRight : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingRight → NO_COVERAGE
        return paddingRight;
379
    }
380
    
381
    /**
382
     * Getter for property paddingRight.
383
     * 
384
     * @return Value of property paddingRight.
385
     */
386
    public float getPaddingRight() {
387
        return paddingRight;
388
    }
389
390
    /**
391
     * Setter for property paddingRight.
392
     * 
393
     * @param paddingRight New value of property paddingRight.
394
     */
395
    public void setPaddingRight(float paddingRight) {
396
        this.paddingRight = paddingRight;
397
    }
398
    
399
    /** 
400
     * Gets the effective top padding.  This will include
401
     * the top border width if {@link #isUseBorderPadding()} is true.
402
     * 
403
     * @return effective value of property paddingTop.
404
     */
405
    public float getEffectivePaddingTop() {
406 1 1. getEffectivePaddingTop : negated conditional → NO_COVERAGE
        if (isUseBorderPadding()) {
407 2 1. getEffectivePaddingTop : Replaced float division with multiplication → NO_COVERAGE
2. getEffectivePaddingTop : negated conditional → NO_COVERAGE
            float border = getBorderWidthTop()/(isUseVariableBorders()?1f:2f);
408 2 1. getEffectivePaddingTop : Replaced float addition with subtraction → NO_COVERAGE
2. getEffectivePaddingTop : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingTop → NO_COVERAGE
            return paddingTop + border;
409
        }
410 1 1. getEffectivePaddingTop : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingTop → NO_COVERAGE
        return paddingTop;
411
    }
412
    
413
    /**
414
     * Getter for property paddingTop.
415
     * 
416
     * @return Value of property paddingTop.
417
     */
418
    public float getPaddingTop() {
419
        return paddingTop;
420
    }
421
422
    /**
423
     * Setter for property paddingTop.
424
     * 
425
     * @param paddingTop New value of property paddingTop.
426
     */
427
    public void setPaddingTop(float paddingTop) {
428
        this.paddingTop = paddingTop;
429
    }
430
    
431
    /**
432
     * Gets the effective bottom padding.
433
     * This will include  the bottom border width if
434
     * {@link #isUseBorderPadding()} is true.
435
     * 
436
     * @return effective value of property paddingBottom.
437
     */
438
    public float getEffectivePaddingBottom() {
439 1 1. getEffectivePaddingBottom : negated conditional → NO_COVERAGE
        if (isUseBorderPadding()) {
440 2 1. getEffectivePaddingBottom : Replaced float division with multiplication → NO_COVERAGE
2. getEffectivePaddingBottom : negated conditional → NO_COVERAGE
            float border = getBorderWidthBottom()/(isUseVariableBorders()?1f:2f);
441 2 1. getEffectivePaddingBottom : Replaced float addition with subtraction → NO_COVERAGE
2. getEffectivePaddingBottom : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingBottom → NO_COVERAGE
            return paddingBottom + border;
442
        }
443 1 1. getEffectivePaddingBottom : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingBottom → NO_COVERAGE
        return paddingBottom;
444
    }
445
    
446
    /**
447
     * Getter for property paddingBottom.
448
     * 
449
     * @return Value of property paddingBottom.
450
     */
451
    public float getPaddingBottom() {
452
        return paddingBottom;
453
    }
454
455
    /**
456
     * Setter for property paddingBottom.
457
     * 
458
     * @param paddingBottom New value of property paddingBottom.
459
     */
460
    public void setPaddingBottom(float paddingBottom) {
461
        this.paddingBottom = paddingBottom;
462
    }
463
    
464
    /**
465
     * Sets the padding of the contents in the cell (space between content and border).
466
     * 
467
     * @param padding
468
     */
469
    public void setPadding(float padding) {
470
        paddingBottom = padding;
471
        paddingTop = padding;
472
        paddingLeft = padding;
473
        paddingRight = padding;
474
    }
475
476
    /**
477
     * If true, then effective padding will include border widths
478
     * 
479
     * @return true if effective padding includes border widths
480
     */
481
    public boolean isUseBorderPadding() {
482
        return useBorderPadding;
483
    }
484
485
    /**
486
     * Adjusts effective padding to include border widths.
487
     * 
488
     * @param use adjust effective padding if true
489
     */
490
    public void setUseBorderPadding(boolean use) {
491
        useBorderPadding = use;
492
    }
493
494
    /**
495
     * Sets the leading fixed and variable. 
496
     * The resultant leading will be:
497
     * fixedLeading+multipliedLeading*maxFontSize
498
     * where maxFontSize is the size of the biggest font in the line.
499
     * 
500
     * @param fixedLeading the fixed leading
501
     * @param multipliedLeading the variable leading
502
     */
503
    public void setLeading(float fixedLeading, float multipliedLeading) {
504
        column.setLeading(fixedLeading, multipliedLeading);
505
    }
506
    
507
    /**
508
     * Gets the fixed leading.
509
     * 
510
     * @return the leading
511
     */
512
    public float getLeading() {
513
        return column.getLeading();
514
    }
515
    
516
    /**
517
     * Gets the variable leading.
518
     * 
519
     * @return the leading
520
     */
521
    public float getMultipliedLeading() {
522
        return column.getMultipliedLeading();
523
    }
524
    
525
    /**
526
     * Sets the first paragraph line indent.
527
     * 
528
     * @param indent the indent
529
     */
530
    public void setIndent(float indent) {
531
        column.setIndent(indent);
532
    }
533
    
534
    /**
535
     * Gets the first paragraph line indent.
536
     * 
537
     * @return the indent
538
     */
539
    public float getIndent() {
540
        return column.getIndent();
541
    }
542
    
543
    /**
544
     * Gets the extra space between paragraphs.
545
     * 
546
     * @return the extra space between paragraphs
547
     */
548
    public float getExtraParagraphSpace() {
549
        return column.getExtraParagraphSpace();
550
    }
551
    
552
    /**
553
     * Sets the extra space between paragraphs.
554
     * 
555
     * @param extraParagraphSpace the extra space between paragraphs
556
     */
557
    public void setExtraParagraphSpace(float extraParagraphSpace) {
558
        column.setExtraParagraphSpace(extraParagraphSpace);
559
    }
560
    
561
    /**
562
     * Set a fixed height for the cell.
563
     * This will automatically unset minimumHeight, if set.
564
     * 
565
     * @param fixedHeight New value of property fixedHeight.
566
     */
567
    public void setFixedHeight(float fixedHeight) {
568
        this.fixedHeight = fixedHeight;
569
        minimumHeight = 0;
570
    }
571
    
572
    /**
573
     * Get the fixed height of the cell.
574
     * 
575
     * @return Value of property fixedHeight.
576
     */
577
    public float getFixedHeight() {
578
        return fixedHeight;
579
    }
580
581
    /**
582
     * Tells you whether the cell has a fixed height.
583
     * 
584
     * @return    true is a fixed height was set.
585
     * @since 2.1.5
586
     */
587
    public boolean hasFixedHeight() {
588 3 1. hasFixedHeight : changed conditional boundary → NO_COVERAGE
2. hasFixedHeight : negated conditional → NO_COVERAGE
3. hasFixedHeight : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return getFixedHeight() > 0;
589
    }
590
    
591
    /**
592
     * Set a minimum height for the cell.
593
     * This will automatically unset fixedHeight, if set.
594
     * 
595
     * @param minimumHeight New value of property minimumHeight.
596
     */
597
    public void setMinimumHeight(float minimumHeight) {
598
        this.minimumHeight = minimumHeight;
599
        fixedHeight = 0;
600
    }
601
    
602
    /**
603
     * Get the minimum height of the cell.
604
     *
605
     * @return Value of property minimumHeight.
606
     */
607
    public float getMinimumHeight() {
608
        return minimumHeight;
609
    }
610
611
    /**
612
     * Tells you whether the cell has a minimum height.
613
     * 
614
     * @return    true if a minimum height was set.
615
     * @since 2.1.5
616
     */
617
    public boolean hasMinimumHeight() {
618 3 1. hasMinimumHeight : changed conditional boundary → NO_COVERAGE
2. hasMinimumHeight : negated conditional → NO_COVERAGE
3. hasMinimumHeight : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
        return getMinimumHeight() > 0;
619
    }
620
    
621
    /**
622
     * Getter for property noWrap.
623
     * 
624
     * @return Value of property noWrap.
625
     */
626
    public boolean isNoWrap() {
627
        return noWrap;
628
    }
629
    
630
    /**
631
     * Setter for property noWrap.
632
     * 
633
     * @param noWrap New value of property noWrap.
634
     */
635
    public void setNoWrap(boolean noWrap) {
636
        this.noWrap = noWrap;
637
    }
638
    
639
    /**
640
     * Getter for property table.
641
     * 
642
     * @return Value of property table.
643
     * @since 2.x
644
     */
645
    public PdfPTable getTable() {
646
        return table;
647
    }
648
    
649
    void setTable(PdfPTable table) {
650
        this.table = table;
651 1 1. setTable : removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE
        column.setText(null);
652
        image = null;
653 1 1. setTable : negated conditional → NO_COVERAGE
        if (table != null) {
654 2 1. setTable : negated conditional → NO_COVERAGE
2. setTable : removed call to com/lowagie/text/pdf/PdfPTable::setExtendLastRow → NO_COVERAGE
            table.setExtendLastRow(verticalAlignment == Element.ALIGN_TOP);
655 1 1. setTable : removed call to com/lowagie/text/pdf/ColumnText::addElement → NO_COVERAGE
            column.addElement(table);
656 1 1. setTable : removed call to com/lowagie/text/pdf/PdfPTable::setWidthPercentage → NO_COVERAGE
            table.setWidthPercentage(100);
657
        }
658
    }
659
660
    /**
661
     * Getter for property colspan.
662
     * 
663
     * @return Value of property colspan.
664
     */
665
    public int getColspan() {
666
        return colspan;
667
    }
668
    
669
    /**
670
     * Setter for property colspan.
671
     * 
672
     * @param colspan New value of property colspan.
673
     */
674
    public void setColspan(int colspan) {
675
        this.colspan = colspan;
676
    }
677
    
678
    /**
679
     * Getter for property rowspan.
680
     * 
681
     * @return Value of property rowspan.
682
     * @since    2.1.6
683
     */
684
    public int getRowspan() {
685
        return rowspan;
686
    }
687
    
688
    /**
689
     * Setter for property rowspan.
690
     * 
691
     * @param rowspan New value of property rowspan.
692
     * @since    2.1.6
693
     */
694
    public void setRowspan(int rowspan) {
695
        this.rowspan = rowspan;
696
    }
697
698
    /**
699
     * Sets the following paragraph lines indent.
700
     * 
701
     * @param indent the indent
702
     */
703
    public void setFollowingIndent(float indent) {
704
        column.setFollowingIndent(indent);
705
    }
706
    
707
    /**
708
     * Gets the following paragraph lines indent.
709
     * 
710
     * @return the indent
711
     */
712
    public float getFollowingIndent() {
713
        return column.getFollowingIndent();
714
    }
715
    
716
    /**
717
     * Sets the right paragraph lines indent.
718
     * 
719
     * @param indent the indent
720
     */
721
    public void setRightIndent(float indent) {
722
        column.setRightIndent(indent);
723
    }
724
    
725
    /**
726
     * Gets the right paragraph lines indent.
727
     * 
728
     * @return the indent
729
     */
730
    public float getRightIndent() {
731
        return column.getRightIndent();
732
    }
733
    
734
    /**
735
     * Gets the space/character extra spacing ratio for fully justified text.
736
     * 
737
     * @return the space/character extra spacing ratio
738
     */
739
    public float getSpaceCharRatio() {
740
        return column.getSpaceCharRatio();
741
    }
742
    
743
    /** Sets the ratio between the extra word spacing and the
744
     * extra character spacing when the text is fully justified.
745
     * Extra word spacing will grow <CODE>spaceCharRatio</CODE> times more
746
     * than extra character spacing.
747
     * If the ratio is <CODE>PdfWriter.NO_SPACE_CHAR_RATIO</CODE> then the
748
     * extra character spacing will be zero.
749
     * 
750
     * @param spaceCharRatio the ratio between the extra word spacing and the extra character spacing
751
     */
752
    public void setSpaceCharRatio(float spaceCharRatio) {
753
        column.setSpaceCharRatio(spaceCharRatio);
754
    }
755
    
756
    /**
757
     * Sets the run direction of the text content in the cell.
758
     * May be either of:
759
     * PdfWriter.RUN_DIRECTION_DEFAULT, PdfWriter.RUN_DIRECTION_NO_BIDI,
760
     * PdfWriter.RUN_DIRECTION_LTR or PdfWriter.RUN_DIRECTION_RTL.
761
     * @param runDirection
762
     */
763
    public void setRunDirection(int runDirection) {
764
        column.setRunDirection(runDirection);
765
    }
766
    
767
    /**
768
     * Gets the run direction of the text content in the cell
769
     * 
770
     * @return One of the following values:
771
     * PdfWriter.RUN_DIRECTION_DEFAULT, PdfWriter.RUN_DIRECTION_NO_BIDI,
772
     * PdfWriter.RUN_DIRECTION_LTR or PdfWriter.RUN_DIRECTION_RTL.
773
     */
774
    public int getRunDirection() {
775
        return column.getRunDirection();
776
    }
777
    
778
    /**
779
     * Getter for property image.
780
     * 
781
     * @return Value of property image.
782
     */
783
    public Image getImage() {
784
        return image;
785
    }
786
    
787
    /**
788
     * Setter for property image.
789
     * 
790
     * @param image New value of property image.
791
     */
792
    public void setImage(Image image) {
793 1 1. setImage : removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE
        column.setText(null);
794
        table = null;
795
        this.image = image;
796
    }
797
    
798
    /**
799
     * Gets the cell event for this cell.
800
     * 
801
     * @return the cell event
802
     */
803
    public PdfPCellEvent getCellEvent() {
804
        return cellEvent;
805
    }
806
    
807
    /**
808
     * Sets the cell event for this cell.
809
     * 
810
     * @param cellEvent the cell event
811
     */
812
    public void setCellEvent(PdfPCellEvent cellEvent) {
813 1 1. setCellEvent : negated conditional → NO_COVERAGE
        if (cellEvent == null)
814
            this.cellEvent = null;
815 1 1. setCellEvent : negated conditional → NO_COVERAGE
        else if (this.cellEvent == null)
816
            this.cellEvent = cellEvent;
817 1 1. setCellEvent : negated conditional → NO_COVERAGE
        else if (this.cellEvent instanceof PdfPCellEventForwarder)
818 1 1. setCellEvent : removed call to com/lowagie/text/pdf/events/PdfPCellEventForwarder::addCellEvent → NO_COVERAGE
            ((PdfPCellEventForwarder)this.cellEvent).addCellEvent(cellEvent);
819
        else {
820
            PdfPCellEventForwarder forward = new PdfPCellEventForwarder();
821 1 1. setCellEvent : removed call to com/lowagie/text/pdf/events/PdfPCellEventForwarder::addCellEvent → NO_COVERAGE
            forward.addCellEvent(this.cellEvent);
822 1 1. setCellEvent : removed call to com/lowagie/text/pdf/events/PdfPCellEventForwarder::addCellEvent → NO_COVERAGE
            forward.addCellEvent(cellEvent);
823
            this.cellEvent = forward;
824
        }
825
    }
826
    
827
    /**
828
     * Gets the arabic shaping options.
829
     * 
830
     * @return the arabic shaping options
831
     */
832
    public int getArabicOptions() {
833
        return column.getArabicOptions();
834
    }
835
    
836
    /** 
837
     * Sets the arabic shaping options.
838
     * The option can be AR_NOVOWEL, AR_COMPOSEDTASHKEEL and AR_LIG.
839
     * 
840
     * @param arabicOptions the arabic shaping options
841
     */
842
    public void setArabicOptions(int arabicOptions) {
843
        column.setArabicOptions(arabicOptions);
844
    }
845
    
846
    /**
847
     * Gets state of first line height based on max ascender
848
     * 
849
     * @return true if an ascender is to be used.
850
     */
851
    public boolean isUseAscender() {
852
        return column.isUseAscender();
853
    }
854
855
    /**
856
     * Enables/ Disables adjustment of first line height based on max ascender.
857
     *
858
     * @param useAscender adjust height if true
859
     */
860
    public void setUseAscender(boolean useAscender) {
861
        column.setUseAscender(useAscender);
862
    }
863
864
865
    /**
866
     * Getter for property useDescender.
867
     * 
868
     * @return Value of property useDescender.
869
     */
870
    public boolean isUseDescender() {
871
        return useDescender;
872
    }
873
874
    /**
875
     * Setter for property useDescender.
876
     * 
877
     * @param useDescender New value of property useDescender.
878
     */
879
    public void setUseDescender(boolean useDescender) {
880
        this.useDescender = useDescender;
881
    }
882
883
    /**
884
     * Gets the ColumnText with the content of the cell.
885
     * 
886
     * @return a columntext object
887
     */
888
    public ColumnText getColumn() {
889
        return column;
890
    }
891
    
892
    /**
893
     * Returns the list of composite elements of the column.
894
     *
895
     * @return    a List object.
896
     * @since    2.1.1
897
     */
898
    public List getCompositeElements() {
899 1 1. getCompositeElements : mutated return of Object value for com/lowagie/text/pdf/PdfPCell::getCompositeElements to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return getColumn().compositeElements;
900
    }
901
    
902
    /**
903
     * Sets the columntext in the cell.
904
     *
905
     * @param column
906
     */
907
    public void setColumn(ColumnText column) {
908
        this.column = column;
909
    }
910
911
    /**
912
     * Gets the rotation of the cell.
913
     *
914
     * @return the rotation of the cell.
915
     */
916
    public int getRotation() {
917
        return rotation;
918
    }
919
920
    /**
921
     * Sets the rotation of the cell. 
922
     * Possible values are 0, 90, 180 and 270.
923
     *
924
     * @param rotation the rotation of the cell
925
     */
926
    public void setRotation(int rotation) {
927 1 1. setRotation : Replaced integer modulus with multiplication → NO_COVERAGE
        rotation %= 360;
928 2 1. setRotation : changed conditional boundary → NO_COVERAGE
2. setRotation : negated conditional → NO_COVERAGE
        if (rotation < 0)
929 1 1. setRotation : Changed increment from 360 to -360 → NO_COVERAGE
            rotation += 360;
930 2 1. setRotation : Replaced integer modulus with multiplication → NO_COVERAGE
2. setRotation : negated conditional → NO_COVERAGE
        if ((rotation % 90) != 0)
931
            throw new IllegalArgumentException(MessageLocalization.getComposedMessage("rotation.must.be.a.multiple.of.90"));
932
        this.rotation = rotation;
933
    }
934
    
935
    /**
936
     * Consumes part of the content of the cell.
937
     * @param    height    the hight of the part that has to be consumed
938
     * @since    2.1.6
939
     */
940
    void consumeHeight(float height) {
941 1 1. consumeHeight : Replaced float subtraction with addition → NO_COVERAGE
        float rightLimit = getRight() - getEffectivePaddingRight();
942 1 1. consumeHeight : Replaced float addition with subtraction → NO_COVERAGE
        float leftLimit = getLeft() + getEffectivePaddingLeft();
943 2 1. consumeHeight : Replaced float subtraction with addition → NO_COVERAGE
2. consumeHeight : Replaced float subtraction with addition → NO_COVERAGE
        float bry = height - getEffectivePaddingTop() - getEffectivePaddingBottom();
944 2 1. consumeHeight : negated conditional → NO_COVERAGE
2. consumeHeight : negated conditional → NO_COVERAGE
        if (getRotation() != 90 && getRotation() != 270) {
945 2 1. consumeHeight : Replaced float addition with subtraction → NO_COVERAGE
2. consumeHeight : removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE
            column.setSimpleColumn(leftLimit, bry + 0.001f,    rightLimit, 0);
946
        }
947
        else {
948 2 1. consumeHeight : Replaced float addition with subtraction → NO_COVERAGE
2. consumeHeight : removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE
            column.setSimpleColumn(0, leftLimit, bry + 0.001f, rightLimit);
949
        }
950
        try {
951
            column.go(true);
952
        } catch (DocumentException e) {
953
            // do nothing
954
        }
955
    }
956
    
957
    /**
958
     * Returns the height of the cell.
959
     * @return    the height of the cell
960
     * @since    3.0.0
961
     */
962
    public float getMaxHeight() {
963 2 1. getMaxHeight : negated conditional → NO_COVERAGE
2. getMaxHeight : negated conditional → NO_COVERAGE
        boolean pivoted = (getRotation() == 90 || getRotation() == 270);
964
        Image img = getImage();
965 1 1. getMaxHeight : negated conditional → NO_COVERAGE
        if (img != null) {
966 1 1. getMaxHeight : removed call to com/lowagie/text/Image::scalePercent → NO_COVERAGE
            img.scalePercent(100);
967 1 1. getMaxHeight : negated conditional → NO_COVERAGE
            float refWidth = pivoted ? img.getScaledHeight() : img.getScaledWidth();
968 1 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
            float scale = (getRight() - getEffectivePaddingRight()
969 3 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
2. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
3. getMaxHeight : Replaced float division with multiplication → NO_COVERAGE
                    - getEffectivePaddingLeft() - getLeft()) / refWidth;
970 2 1. getMaxHeight : Replaced float multiplication with division → NO_COVERAGE
2. getMaxHeight : removed call to com/lowagie/text/Image::scalePercent → NO_COVERAGE
            img.scalePercent(scale * 100);
971 1 1. getMaxHeight : negated conditional → NO_COVERAGE
            float refHeight = pivoted ? img.getScaledWidth() : img.getScaledHeight();
972 4 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
2. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
3. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
4. getMaxHeight : removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE
            setBottom(getTop() - getEffectivePaddingTop() - getEffectivePaddingBottom() - refHeight);
973
        }
974
        else {
975 3 1. getMaxHeight : negated conditional → NO_COVERAGE
2. getMaxHeight : negated conditional → NO_COVERAGE
3. getMaxHeight : negated conditional → NO_COVERAGE
            if ((pivoted && hasFixedHeight()) || getColumn() == null)
976 2 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
2. getMaxHeight : removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE
                setBottom(getTop() - getFixedHeight());
977
            else {
978
                ColumnText ct = ColumnText.duplicate(getColumn());
979
                float right, top, left, bottom;
980 1 1. getMaxHeight : negated conditional → NO_COVERAGE
                if (pivoted) {
981
                    right = PdfPRow.RIGHT_LIMIT;
982 1 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
                    top = getRight() - getEffectivePaddingRight();
983
                    left = 0;
984 1 1. getMaxHeight : Replaced float addition with subtraction → NO_COVERAGE
                    bottom = getLeft() + getEffectivePaddingLeft();
985
                }
986
                else {
987 2 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
2. getMaxHeight : negated conditional → NO_COVERAGE
                    right = isNoWrap() ? PdfPRow.RIGHT_LIMIT : getRight() - getEffectivePaddingRight();
988 1 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
                    top = getTop() - getEffectivePaddingTop();
989 1 1. getMaxHeight : Replaced float addition with subtraction → NO_COVERAGE
                    left = getLeft() + getEffectivePaddingLeft();
990 3 1. getMaxHeight : Replaced float addition with subtraction → NO_COVERAGE
2. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
3. getMaxHeight : negated conditional → NO_COVERAGE
                    bottom = hasFixedHeight() ? getTop() + getEffectivePaddingBottom() - getFixedHeight() : PdfPRow.BOTTOM_LIMIT;
991
                }
992
                PdfPRow.setColumn(ct, left, bottom, right, top);
993
                try {
994
                    ct.go(true);
995
                } catch (DocumentException e) {
996
                    throw new ExceptionConverter(e);
997
                }
998 1 1. getMaxHeight : negated conditional → NO_COVERAGE
                if (pivoted)
999 4 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
2. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
3. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
4. getMaxHeight : removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE
                    setBottom(getTop() - getEffectivePaddingTop() - getEffectivePaddingBottom() - ct.getFilledWidth());
1000
                else {
1001
                    float yLine = ct.getYLine();
1002 1 1. getMaxHeight : negated conditional → NO_COVERAGE
                    if (isUseDescender())
1003 1 1. getMaxHeight : Replaced float addition with subtraction → NO_COVERAGE
                        yLine += ct.getDescender();
1004 2 1. getMaxHeight : Replaced float subtraction with addition → NO_COVERAGE
2. getMaxHeight : removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE
                    setBottom(yLine - getEffectivePaddingBottom());
1005
                }
1006
            }
1007
        }
1008
        float height = getHeight();
1009 1 1. getMaxHeight : negated conditional → NO_COVERAGE
        if (hasFixedHeight())
1010
            height = getFixedHeight();
1011 2 1. getMaxHeight : changed conditional boundary → NO_COVERAGE
2. getMaxHeight : negated conditional → NO_COVERAGE
        else if (height < getMinimumHeight())
1012
            height = getMinimumHeight();
1013 1 1. getMaxHeight : replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getMaxHeight → NO_COVERAGE
        return height;
1014
    }
1015
}

Mutations

138

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

151

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::addText → NO_COVERAGE

152

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

176

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

178

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

179

1.1
Location :
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setPadding → NO_COVERAGE

182

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::addText → NO_COVERAGE

183

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

184

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setPadding → NO_COVERAGE

211

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setLeading → NO_COVERAGE

213

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPTable::setWidthPercentage → NO_COVERAGE

214

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPTable::setExtendLastRow → NO_COVERAGE

215

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::addElement → NO_COVERAGE

216

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

217

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::cloneNonPositionParameters → NO_COVERAGE

231

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setPadding → NO_COVERAGE

241

1.1
Location :
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::cloneNonPositionParameters → NO_COVERAGE

253

1.1
Location :
Killed by : none
negated conditional → NO_COVERAGE

269

1.1
Location : addElement
Killed by : none
negated conditional → NO_COVERAGE

271

1.1
Location : addElement
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE

273

1.1
Location : addElement
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::addElement → NO_COVERAGE

293

1.1
Location : setPhrase
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE

331

1.1
Location : setVerticalAlignment
Killed by : none
negated conditional → NO_COVERAGE

332

1.1
Location : setVerticalAlignment
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : setVerticalAlignment
Killed by : none
removed call to com/lowagie/text/pdf/PdfPTable::setExtendLastRow → NO_COVERAGE

344

1.1
Location : getEffectivePaddingLeft
Killed by : none
negated conditional → NO_COVERAGE

345

1.1
Location : getEffectivePaddingLeft
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getEffectivePaddingLeft
Killed by : none
negated conditional → NO_COVERAGE

346

1.1
Location : getEffectivePaddingLeft
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getEffectivePaddingLeft
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingLeft → NO_COVERAGE

348

1.1
Location : getEffectivePaddingLeft
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingLeft → NO_COVERAGE

374

1.1
Location : getEffectivePaddingRight
Killed by : none
negated conditional → NO_COVERAGE

375

1.1
Location : getEffectivePaddingRight
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getEffectivePaddingRight
Killed by : none
negated conditional → NO_COVERAGE

376

1.1
Location : getEffectivePaddingRight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getEffectivePaddingRight
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingRight → NO_COVERAGE

378

1.1
Location : getEffectivePaddingRight
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingRight → NO_COVERAGE

406

1.1
Location : getEffectivePaddingTop
Killed by : none
negated conditional → NO_COVERAGE

407

1.1
Location : getEffectivePaddingTop
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getEffectivePaddingTop
Killed by : none
negated conditional → NO_COVERAGE

408

1.1
Location : getEffectivePaddingTop
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getEffectivePaddingTop
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingTop → NO_COVERAGE

410

1.1
Location : getEffectivePaddingTop
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingTop → NO_COVERAGE

439

1.1
Location : getEffectivePaddingBottom
Killed by : none
negated conditional → NO_COVERAGE

440

1.1
Location : getEffectivePaddingBottom
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

2.2
Location : getEffectivePaddingBottom
Killed by : none
negated conditional → NO_COVERAGE

441

1.1
Location : getEffectivePaddingBottom
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getEffectivePaddingBottom
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingBottom → NO_COVERAGE

443

1.1
Location : getEffectivePaddingBottom
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getEffectivePaddingBottom → NO_COVERAGE

588

1.1
Location : hasFixedHeight
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : hasFixedHeight
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : hasFixedHeight
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

618

1.1
Location : hasMinimumHeight
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : hasMinimumHeight
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : hasMinimumHeight
Killed by : none
replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE

651

1.1
Location : setTable
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE

653

1.1
Location : setTable
Killed by : none
negated conditional → NO_COVERAGE

654

1.1
Location : setTable
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : setTable
Killed by : none
removed call to com/lowagie/text/pdf/PdfPTable::setExtendLastRow → NO_COVERAGE

655

1.1
Location : setTable
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::addElement → NO_COVERAGE

656

1.1
Location : setTable
Killed by : none
removed call to com/lowagie/text/pdf/PdfPTable::setWidthPercentage → NO_COVERAGE

793

1.1
Location : setImage
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setText → NO_COVERAGE

813

1.1
Location : setCellEvent
Killed by : none
negated conditional → NO_COVERAGE

815

1.1
Location : setCellEvent
Killed by : none
negated conditional → NO_COVERAGE

817

1.1
Location : setCellEvent
Killed by : none
negated conditional → NO_COVERAGE

818

1.1
Location : setCellEvent
Killed by : none
removed call to com/lowagie/text/pdf/events/PdfPCellEventForwarder::addCellEvent → NO_COVERAGE

821

1.1
Location : setCellEvent
Killed by : none
removed call to com/lowagie/text/pdf/events/PdfPCellEventForwarder::addCellEvent → NO_COVERAGE

822

1.1
Location : setCellEvent
Killed by : none
removed call to com/lowagie/text/pdf/events/PdfPCellEventForwarder::addCellEvent → NO_COVERAGE

899

1.1
Location : getCompositeElements
Killed by : none
mutated return of Object value for com/lowagie/text/pdf/PdfPCell::getCompositeElements to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

927

1.1
Location : setRotation
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

928

1.1
Location : setRotation
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : setRotation
Killed by : none
negated conditional → NO_COVERAGE

929

1.1
Location : setRotation
Killed by : none
Changed increment from 360 to -360 → NO_COVERAGE

930

1.1
Location : setRotation
Killed by : none
Replaced integer modulus with multiplication → NO_COVERAGE

2.2
Location : setRotation
Killed by : none
negated conditional → NO_COVERAGE

941

1.1
Location : consumeHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

942

1.1
Location : consumeHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

943

1.1
Location : consumeHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : consumeHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

944

1.1
Location : consumeHeight
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : consumeHeight
Killed by : none
negated conditional → NO_COVERAGE

945

1.1
Location : consumeHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : consumeHeight
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE

948

1.1
Location : consumeHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : consumeHeight
Killed by : none
removed call to com/lowagie/text/pdf/ColumnText::setSimpleColumn → NO_COVERAGE

963

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

965

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

966

1.1
Location : getMaxHeight
Killed by : none
removed call to com/lowagie/text/Image::scalePercent → NO_COVERAGE

967

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

968

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

969

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getMaxHeight
Killed by : none
Replaced float division with multiplication → NO_COVERAGE

970

1.1
Location : getMaxHeight
Killed by : none
Replaced float multiplication with division → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
removed call to com/lowagie/text/Image::scalePercent → NO_COVERAGE

971

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

972

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getMaxHeight
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE

975

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

976

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE

980

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

982

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

984

1.1
Location : getMaxHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

987

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

988

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

989

1.1
Location : getMaxHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

990

1.1
Location : getMaxHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

998

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

999

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

3.3
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

4.4
Location : getMaxHeight
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE

1002

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

1003

1.1
Location : getMaxHeight
Killed by : none
Replaced float addition with subtraction → NO_COVERAGE

1004

1.1
Location : getMaxHeight
Killed by : none
Replaced float subtraction with addition → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
removed call to com/lowagie/text/pdf/PdfPCell::setBottom → NO_COVERAGE

1009

1.1
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

1011

1.1
Location : getMaxHeight
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getMaxHeight
Killed by : none
negated conditional → NO_COVERAGE

1013

1.1
Location : getMaxHeight
Killed by : none
replaced return of float value with -(x + 1) for com/lowagie/text/pdf/PdfPCell::getMaxHeight → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.4.2