1 | package com.lowagie.text.pdf.collection; | |
2 | ||
3 | import com.lowagie.text.pdf.PdfDictionary; | |
4 | import com.lowagie.text.pdf.PdfName; | |
5 | import com.lowagie.text.pdf.PdfString; | |
6 | ||
7 | public class PdfCollection extends PdfDictionary { | |
8 | ||
9 | /** A type of PDF Collection */ | |
10 | public static final int DETAILS = 0; | |
11 | /** A type of PDF Collection */ | |
12 | public static final int TILE = 1; | |
13 | /** A type of PDF Collection */ | |
14 | public static final int HIDDEN = 2; | |
15 | | |
16 | /** | |
17 | * Constructs a PDF Collection. | |
18 | * @param type the type of PDF collection. | |
19 | */ | |
20 | public PdfCollection(int type) { | |
21 | super(PdfName.COLLECTION); | |
22 | switch(type) { | |
23 | case TILE: | |
24 |
1
1. |
put(PdfName.VIEW, PdfName.T); |
25 | break; | |
26 | case HIDDEN: | |
27 |
1
1. |
put(PdfName.VIEW, PdfName.H); |
28 | break; | |
29 | default: | |
30 |
1
1. |
put(PdfName.VIEW, PdfName.D); |
31 | } | |
32 | } | |
33 | | |
34 | /** | |
35 | * Identifies the document that will be initially presented | |
36 | * in the user interface. | |
37 | * @param description the description that was used when attaching the file to the document | |
38 | */ | |
39 | public void setInitialDocument(String description) { | |
40 |
1
1. setInitialDocument : removed call to com/lowagie/text/pdf/collection/PdfCollection::put → NO_COVERAGE |
put(PdfName.D, new PdfString(description, null)); |
41 | } | |
42 | | |
43 | /** | |
44 | * Sets the Collection schema dictionary. | |
45 | * @param schema an overview of the collection fields | |
46 | */ | |
47 | public void setSchema(PdfCollectionSchema schema) { | |
48 |
1
1. setSchema : removed call to com/lowagie/text/pdf/collection/PdfCollection::put → NO_COVERAGE |
put(PdfName.SCHEMA, schema); |
49 | } | |
50 | | |
51 | /** | |
52 | * Gets the Collection schema dictionary. | |
53 | * @return schema an overview of the collection fields | |
54 | */ | |
55 | public PdfCollectionSchema getSchema() { | |
56 |
1
1. getSchema : mutated return of Object value for com/lowagie/text/pdf/collection/PdfCollection::getSchema to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return (PdfCollectionSchema)get(PdfName.SCHEMA); |
57 | } | |
58 | | |
59 | /** | |
60 | * Sets the Collection sort dictionary. | |
61 | * @param sort a collection sort dictionary | |
62 | */ | |
63 | public void setSort(PdfCollectionSort sort) { | |
64 |
1
1. setSort : removed call to com/lowagie/text/pdf/collection/PdfCollection::put → NO_COVERAGE |
put(PdfName.SORT, sort); |
65 | } | |
66 | } | |
Mutations | ||
24 |
1.1 |
|
27 |
1.1 |
|
30 |
1.1 |
|
40 |
1.1 |
|
48 |
1.1 |
|
56 |
1.1 |
|
64 |
1.1 |