SimpleTable.java

1
/*
2
 * $Id: SimpleTable.java 4065 2009-09-16 23:09:11Z psoares33 $
3
 *
4
 * Copyright 2005 by Bruno Lowagie.
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
package com.lowagie.text;
50
51
import java.util.ArrayList;
52
53
import com.lowagie.text.error_messages.MessageLocalization;
54
55
import com.lowagie.text.ExceptionConverter;
56
import com.lowagie.text.pdf.PdfContentByte;
57
import com.lowagie.text.pdf.PdfPTable;
58
import com.lowagie.text.pdf.PdfPTableEvent;
59
60
61
/**
62
 * Rectangle that can be used for Cells.
63
 * This Rectangle is padded and knows how to draw itself in a PdfPTable or PdfPcellEvent.
64
 */
65
public class SimpleTable extends Rectangle implements PdfPTableEvent, TextElementArray {
66
67
    /** the content of a Table. */
68
    private ArrayList content = new ArrayList();
69
    /** the width of the Table. */
70
    private float width = 0f;
71
    /** the widthpercentage of the Table. */
72
    private float widthpercentage = 0f;
73
    /** the spacing of the Cells. */
74
    private float cellspacing;
75
    /** the padding of the Cells. */
76
    private float cellpadding;
77
    /** the alignment of the table. */
78
    private int alignment;
79
    
80
    /**
81
     * A RectangleCell is always constructed without any dimensions.
82
     * Dimensions are defined after creation.
83
     */
84
    public SimpleTable() {
85
        super(0f, 0f, 0f, 0f);
86 1 1. : removed call to com/lowagie/text/SimpleTable::setBorder → NO_COVERAGE
        setBorder(BOX);
87 1 1. : removed call to com/lowagie/text/SimpleTable::setBorderWidth → NO_COVERAGE
        setBorderWidth(2f);
88
    }
89
    
90
    /**
91
     * Adds content to this object.
92
     * @param element
93
     * @throws BadElementException
94
     */
95
    public void addElement(SimpleCell element) throws BadElementException {
96 1 1. addElement : negated conditional → NO_COVERAGE
        if(!element.isCellgroup()) {
97
            throw new BadElementException(MessageLocalization.getComposedMessage("you.can.t.add.cells.to.a.table.directly.add.them.to.a.row.first"));
98
        }
99
        content.add(element);
100
    }
101
    
102
    /**
103
     * Creates a Table object based on this TableAttributes object.
104
     * @return a com.lowagie.text.Table object
105
     * @throws BadElementException
106
     */
107
    public Table createTable() throws BadElementException {
108 1 1. createTable : negated conditional → NO_COVERAGE
        if (content.isEmpty()) throw new BadElementException(MessageLocalization.getComposedMessage("trying.to.create.a.table.without.rows"));
109
        SimpleCell row = (SimpleCell)content.get(0);
110
        SimpleCell cell;
111
        int columns = 0;
112
        for (Object o2 : row.getContent()) {
113
            cell = (SimpleCell) o2;
114 1 1. createTable : Replaced integer addition with subtraction → NO_COVERAGE
            columns += cell.getColspan();
115
        }
116
        float[] widths = new float[columns];
117
        float[] widthpercentages = new float[columns];
118
        Table table = new Table(columns);
119 1 1. createTable : removed call to com/lowagie/text/Table::setAlignment → NO_COVERAGE
        table.setAlignment(alignment);
120 1 1. createTable : removed call to com/lowagie/text/Table::setSpacing → NO_COVERAGE
        table.setSpacing(cellspacing);
121 1 1. createTable : removed call to com/lowagie/text/Table::setPadding → NO_COVERAGE
        table.setPadding(cellpadding);
122 1 1. createTable : removed call to com/lowagie/text/Table::cloneNonPositionParameters → NO_COVERAGE
        table.cloneNonPositionParameters(this);
123
        int pos;
124
        for (Object o1 : content) {
125
            row = (SimpleCell) o1;
126
            pos = 0;
127
            for (Object o : row.getContent()) {
128
                cell = (SimpleCell) o;
129 1 1. createTable : removed call to com/lowagie/text/Table::addCell → NO_COVERAGE
                table.addCell(cell.createCell(row));
130 1 1. createTable : negated conditional → NO_COVERAGE
                if (cell.getColspan() == 1) {
131 2 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : negated conditional → NO_COVERAGE
                    if (cell.getWidth() > 0) widths[pos] = cell.getWidth();
132 2 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : negated conditional → NO_COVERAGE
                    if (cell.getWidthpercentage() > 0) widthpercentages[pos] = cell.getWidthpercentage();
133
                }
134 1 1. createTable : Replaced integer addition with subtraction → NO_COVERAGE
                pos += cell.getColspan();
135
            }
136
        }
137
        float sumWidths = 0f;
138 3 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : Changed increment from 1 to -1 → NO_COVERAGE
3. createTable : negated conditional → NO_COVERAGE
        for(int i = 0; i < columns; i++) {
139 1 1. createTable : negated conditional → NO_COVERAGE
            if (widths[i] == 0) {
140
                sumWidths = 0;
141
                break;
142
            }
143 1 1. createTable : Replaced float addition with subtraction → NO_COVERAGE
            sumWidths += widths[i];
144
        }
145 2 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : negated conditional → NO_COVERAGE
        if (sumWidths > 0) {
146 1 1. createTable : removed call to com/lowagie/text/Table::setWidth → NO_COVERAGE
            table.setWidth(sumWidths);
147 1 1. createTable : removed call to com/lowagie/text/Table::setLocked → NO_COVERAGE
            table.setLocked(true);
148 1 1. createTable : removed call to com/lowagie/text/Table::setWidths → NO_COVERAGE
            table.setWidths(widths);
149
        }
150
        else {
151 3 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : Changed increment from 1 to -1 → NO_COVERAGE
3. createTable : negated conditional → NO_COVERAGE
            for(int i = 0; i < columns; i++) {
152 1 1. createTable : negated conditional → NO_COVERAGE
                if (widthpercentages[i] == 0) {
153
                    sumWidths = 0;
154
                    break;
155
                }
156 1 1. createTable : Replaced float addition with subtraction → NO_COVERAGE
                sumWidths += widthpercentages[i];
157
            }
158 2 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : negated conditional → NO_COVERAGE
            if (sumWidths > 0) {
159 1 1. createTable : removed call to com/lowagie/text/Table::setWidths → NO_COVERAGE
                table.setWidths(widthpercentages);
160
            }
161
        }
162 2 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : negated conditional → NO_COVERAGE
        if (width > 0) {
163 1 1. createTable : removed call to com/lowagie/text/Table::setWidth → NO_COVERAGE
            table.setWidth(width);
164 1 1. createTable : removed call to com/lowagie/text/Table::setLocked → NO_COVERAGE
            table.setLocked(true);
165
        }
166 2 1. createTable : changed conditional boundary → NO_COVERAGE
2. createTable : negated conditional → NO_COVERAGE
        else if (widthpercentage > 0) {
167 1 1. createTable : removed call to com/lowagie/text/Table::setWidth → NO_COVERAGE
            table.setWidth(widthpercentage);
168
        }
169 1 1. createTable : mutated return of Object value for com/lowagie/text/SimpleTable::createTable to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return table;
170
    }
171
    
172
    /**
173
     * Creates a PdfPTable object based on this TableAttributes object.
174
     * @return a com.lowagie.text.pdf.PdfPTable object
175
     * @throws DocumentException
176
     */
177
    public PdfPTable createPdfPTable() throws DocumentException {
178 1 1. createPdfPTable : negated conditional → NO_COVERAGE
        if (content.isEmpty()) throw new BadElementException(MessageLocalization.getComposedMessage("trying.to.create.a.table.without.rows"));
179
        SimpleCell row = (SimpleCell)content.get(0);
180
        SimpleCell cell;
181
        int columns = 0;
182
        for (Object o2 : row.getContent()) {
183
            cell = (SimpleCell) o2;
184 1 1. createPdfPTable : Replaced integer addition with subtraction → NO_COVERAGE
            columns += cell.getColspan();
185
        }
186
        float[] widths = new float[columns];
187
        float[] widthpercentages = new float[columns];
188
        PdfPTable table = new PdfPTable(columns);
189 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setTableEvent → NO_COVERAGE
        table.setTableEvent(this);
190 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setHorizontalAlignment → NO_COVERAGE
        table.setHorizontalAlignment(alignment);
191
        int pos;
192
        for (Object o1 : content) {
193
            row = (SimpleCell) o1;
194
            pos = 0;
195
            for (Object o : row.getContent()) {
196
                cell = (SimpleCell) o;
197 1 1. createPdfPTable : negated conditional → NO_COVERAGE
                if (Float.isNaN(cell.getSpacing_left())) {
198 2 1. createPdfPTable : Replaced float division with multiplication → NO_COVERAGE
2. createPdfPTable : removed call to com/lowagie/text/SimpleCell::setSpacing_left → NO_COVERAGE
                    cell.setSpacing_left(cellspacing / 2f);
199
                }
200 1 1. createPdfPTable : negated conditional → NO_COVERAGE
                if (Float.isNaN(cell.getSpacing_right())) {
201 2 1. createPdfPTable : Replaced float division with multiplication → NO_COVERAGE
2. createPdfPTable : removed call to com/lowagie/text/SimpleCell::setSpacing_right → NO_COVERAGE
                    cell.setSpacing_right(cellspacing / 2f);
202
                }
203 1 1. createPdfPTable : negated conditional → NO_COVERAGE
                if (Float.isNaN(cell.getSpacing_top())) {
204 2 1. createPdfPTable : Replaced float division with multiplication → NO_COVERAGE
2. createPdfPTable : removed call to com/lowagie/text/SimpleCell::setSpacing_top → NO_COVERAGE
                    cell.setSpacing_top(cellspacing / 2f);
205
                }
206 1 1. createPdfPTable : negated conditional → NO_COVERAGE
                if (Float.isNaN(cell.getSpacing_bottom())) {
207 2 1. createPdfPTable : Replaced float division with multiplication → NO_COVERAGE
2. createPdfPTable : removed call to com/lowagie/text/SimpleCell::setSpacing_bottom → NO_COVERAGE
                    cell.setSpacing_bottom(cellspacing / 2f);
208
                }
209 1 1. createPdfPTable : removed call to com/lowagie/text/SimpleCell::setPadding → NO_COVERAGE
                cell.setPadding(cellpadding);
210 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::addCell → NO_COVERAGE
                table.addCell(cell.createPdfPCell(row));
211 1 1. createPdfPTable : negated conditional → NO_COVERAGE
                if (cell.getColspan() == 1) {
212 2 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : negated conditional → NO_COVERAGE
                    if (cell.getWidth() > 0) widths[pos] = cell.getWidth();
213 2 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : negated conditional → NO_COVERAGE
                    if (cell.getWidthpercentage() > 0) widthpercentages[pos] = cell.getWidthpercentage();
214
                }
215 1 1. createPdfPTable : Replaced integer addition with subtraction → NO_COVERAGE
                pos += cell.getColspan();
216
            }
217
        }
218
        float sumWidths = 0f;
219 3 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : Changed increment from 1 to -1 → NO_COVERAGE
3. createPdfPTable : negated conditional → NO_COVERAGE
        for(int i = 0; i < columns; i++) {
220 1 1. createPdfPTable : negated conditional → NO_COVERAGE
            if (widths[i] == 0) {
221
                sumWidths = 0;
222
                break;
223
            }
224 1 1. createPdfPTable : Replaced float addition with subtraction → NO_COVERAGE
            sumWidths += widths[i];
225
        }
226 2 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : negated conditional → NO_COVERAGE
        if (sumWidths > 0) {
227 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setTotalWidth → NO_COVERAGE
            table.setTotalWidth(sumWidths);
228 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setWidths → NO_COVERAGE
            table.setWidths(widths);
229
        }
230
        else {
231 3 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : Changed increment from 1 to -1 → NO_COVERAGE
3. createPdfPTable : negated conditional → NO_COVERAGE
            for(int i = 0; i < columns; i++) {
232 1 1. createPdfPTable : negated conditional → NO_COVERAGE
                if (widthpercentages[i] == 0) {
233
                    sumWidths = 0;
234
                    break;
235
                }
236 1 1. createPdfPTable : Replaced float addition with subtraction → NO_COVERAGE
                sumWidths += widthpercentages[i];
237
            }
238 2 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : negated conditional → NO_COVERAGE
            if (sumWidths > 0) {
239 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setWidths → NO_COVERAGE
                table.setWidths(widthpercentages);
240
            }
241
        }
242 2 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : negated conditional → NO_COVERAGE
        if (width > 0) {
243 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setTotalWidth → NO_COVERAGE
            table.setTotalWidth(width);
244
        }
245 2 1. createPdfPTable : changed conditional boundary → NO_COVERAGE
2. createPdfPTable : negated conditional → NO_COVERAGE
        if (widthpercentage > 0) {
246 1 1. createPdfPTable : removed call to com/lowagie/text/pdf/PdfPTable::setWidthPercentage → NO_COVERAGE
            table.setWidthPercentage(widthpercentage);
247
        }
248 1 1. createPdfPTable : mutated return of Object value for com/lowagie/text/SimpleTable::createPdfPTable to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return table;
249
    }
250
    
251
    /**
252
     * @see com.lowagie.text.pdf.PdfPTableEvent#tableLayout(com.lowagie.text.pdf.PdfPTable, float[][], float[], int, int, com.lowagie.text.pdf.PdfContentByte[])
253
      */
254
    public void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases) {
255
        float[] width = widths[0];
256 2 1. tableLayout : Replaced integer subtraction with addition → NO_COVERAGE
2. tableLayout : Replaced integer subtraction with addition → NO_COVERAGE
        Rectangle rect = new Rectangle(width[0], heights[heights.length - 1], width[width.length - 1], heights[0]);
257 1 1. tableLayout : removed call to com/lowagie/text/Rectangle::cloneNonPositionParameters → NO_COVERAGE
        rect.cloneNonPositionParameters(this);
258
        int bd = rect.getBorder();
259 1 1. tableLayout : removed call to com/lowagie/text/Rectangle::setBorder → NO_COVERAGE
        rect.setBorder(Rectangle.NO_BORDER);
260 1 1. tableLayout : removed call to com/lowagie/text/pdf/PdfContentByte::rectangle → NO_COVERAGE
        canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
261 1 1. tableLayout : removed call to com/lowagie/text/Rectangle::setBorder → NO_COVERAGE
        rect.setBorder(bd);
262 1 1. tableLayout : removed call to com/lowagie/text/Rectangle::setBackgroundColor → NO_COVERAGE
        rect.setBackgroundColor(null);
263 1 1. tableLayout : removed call to com/lowagie/text/pdf/PdfContentByte::rectangle → NO_COVERAGE
        canvases[PdfPTable.LINECANVAS].rectangle(rect);
264
    }
265
    
266
    /**
267
     * @return Returns the cellpadding.
268
     */
269
    public float getCellpadding() {
270
        return cellpadding;
271
    }
272
    /**
273
     * @param cellpadding The cellpadding to set.
274
     */
275
    public void setCellpadding(float cellpadding) {
276
        this.cellpadding = cellpadding;
277
    }
278
    /**
279
     * @return Returns the cellspacing.
280
     */
281
    public float getCellspacing() {
282
        return cellspacing;
283
    }
284
    /**
285
     * @param cellspacing The cellspacing to set.
286
     */
287
    public void setCellspacing(float cellspacing) {
288
        this.cellspacing = cellspacing;
289
    }
290
    
291
    /**
292
     * @return Returns the alignment.
293
     */
294
    public int getAlignment() {
295
        return alignment;
296
    }
297
    /**
298
     * @param alignment The alignment to set.
299
     */
300
    public void setAlignment(int alignment) {
301
        this.alignment = alignment;
302
    }
303
    /**
304
     * @return Returns the width.
305
     */
306
    public float getWidth() {
307
        return width;
308
    }
309
    /**
310
     * @param width The width to set.
311
     */
312
    public void setWidth(float width) {
313
        this.width = width;
314
    }
315
    /**
316
     * @return Returns the widthpercentage.
317
     */
318
    public float getWidthpercentage() {
319
        return widthpercentage;
320
    }
321
    /**
322
     * @param widthpercentage The widthpercentage to set.
323
     */
324
    public void setWidthpercentage(float widthpercentage) {
325
        this.widthpercentage = widthpercentage;
326
    }
327
    /**
328
     * @see com.lowagie.text.Element#type()
329
     */
330
    public int type() {
331
        return Element.TABLE;
332
    }
333
334
    /**
335
     * @see com.lowagie.text.Element#isNestable()
336
     * @since    iText 2.0.8
337
     */
338
    public boolean isNestable() {
339
        return true;
340
    }
341
342
    /**
343
     * @see com.lowagie.text.TextElementArray#add(java.lang.Object)
344
     */
345
    public boolean add(Object o) {
346
        try {
347 1 1. add : removed call to com/lowagie/text/SimpleTable::addElement → NO_COVERAGE
            addElement((SimpleCell)o);
348 1 1. add : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return true;
349
        }
350
        catch(ClassCastException e) {
351 1 1. add : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE
            return false;
352
        }
353
        catch(BadElementException e) {
354
            throw new ExceptionConverter(e);
355
        }
356
    }
357
}

Mutations

86

1.1
Location :
Killed by : none
removed call to com/lowagie/text/SimpleTable::setBorder → NO_COVERAGE

87

1.1
Location :
Killed by : none
removed call to com/lowagie/text/SimpleTable::setBorderWidth → NO_COVERAGE

96

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

108

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

114

1.1
Location : createTable
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

119

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setAlignment → NO_COVERAGE

120

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setSpacing → NO_COVERAGE

121

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

122

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

129

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::addCell → NO_COVERAGE

130

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

131

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

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

132

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

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

134

1.1
Location : createTable
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

138

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

2.2
Location : createTable
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

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

139

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

143

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

145

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

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

146

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setWidth → NO_COVERAGE

147

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setLocked → NO_COVERAGE

148

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setWidths → NO_COVERAGE

151

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

2.2
Location : createTable
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

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

152

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

156

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

158

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

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

159

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setWidths → NO_COVERAGE

162

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

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

163

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setWidth → NO_COVERAGE

164

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setLocked → NO_COVERAGE

166

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

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

167

1.1
Location : createTable
Killed by : none
removed call to com/lowagie/text/Table::setWidth → NO_COVERAGE

169

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

178

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

184

1.1
Location : createPdfPTable
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

189

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

190

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

197

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

198

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

2.2
Location : createPdfPTable
Killed by : none
removed call to com/lowagie/text/SimpleCell::setSpacing_left → NO_COVERAGE

200

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

201

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

2.2
Location : createPdfPTable
Killed by : none
removed call to com/lowagie/text/SimpleCell::setSpacing_right → NO_COVERAGE

203

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

204

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

2.2
Location : createPdfPTable
Killed by : none
removed call to com/lowagie/text/SimpleCell::setSpacing_top → NO_COVERAGE

206

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

207

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

2.2
Location : createPdfPTable
Killed by : none
removed call to com/lowagie/text/SimpleCell::setSpacing_bottom → NO_COVERAGE

209

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

210

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

211

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

212

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

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

213

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

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

215

1.1
Location : createPdfPTable
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

219

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

2.2
Location : createPdfPTable
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

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

220

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

224

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

226

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

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

227

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

228

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

231

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

2.2
Location : createPdfPTable
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

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

232

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

236

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

238

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

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

239

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

242

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

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

243

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

245

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

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

246

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

248

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

256

1.1
Location : tableLayout
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

2.2
Location : tableLayout
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

257

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

259

1.1
Location : tableLayout
Killed by : none
removed call to com/lowagie/text/Rectangle::setBorder → NO_COVERAGE

260

1.1
Location : tableLayout
Killed by : none
removed call to com/lowagie/text/pdf/PdfContentByte::rectangle → NO_COVERAGE

261

1.1
Location : tableLayout
Killed by : none
removed call to com/lowagie/text/Rectangle::setBorder → NO_COVERAGE

262

1.1
Location : tableLayout
Killed by : none
removed call to com/lowagie/text/Rectangle::setBackgroundColor → NO_COVERAGE

263

1.1
Location : tableLayout
Killed by : none
removed call to com/lowagie/text/pdf/PdfContentByte::rectangle → NO_COVERAGE

347

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

348

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

351

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

Active mutators

Tests examined


Report generated by PIT 1.4.2