PDFBead_First.java
4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.cos.CosObject
* com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException
* com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException
* com.adobe.internal.pdftoolkit.core.types.ASName
*/
package com.adobe.internal.pdftoolkit.pdf.interactive.navigation;
import com.adobe.internal.pdftoolkit.core.cos.CosObject;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidDocumentException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException;
import com.adobe.internal.pdftoolkit.core.types.ASName;
import com.adobe.internal.pdftoolkit.pdf.document.PDFCosObject;
import com.adobe.internal.pdftoolkit.pdf.document.PDFDocument;
import com.adobe.internal.pdftoolkit.pdf.graphics.PDFRectangle;
import com.adobe.internal.pdftoolkit.pdf.interactive.navigation.PDFBead;
import com.adobe.internal.pdftoolkit.pdf.interactive.navigation.PDFThread;
import com.adobe.internal.pdftoolkit.pdf.page.PDFPage;
public class PDFBead_First
extends PDFBead {
PDFBead_First(CosObject cosObject) throws PDFInvalidDocumentException {
super(cosObject);
}
PDFBead_First(PDFDocument pdfDoc) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
super(pdfDoc);
}
public static PDFBead_First newInstance(PDFDocument pdfDocument, PDFRectangle key_Rectangle, PDFBead key_N, PDFPage key_Page, PDFThread key_Thread, PDFBead key_Previous) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException, PDFInvalidParameterException {
if (key_Rectangle == null) {
throw new PDFInvalidParameterException("Rectangle is required when creating newInstance of PDFBead_First.");
}
if (key_N == null) {
throw new PDFInvalidParameterException("N is required when creating newInstance of PDFBead_First.");
}
if (key_Page == null) {
throw new PDFInvalidParameterException("Page is required when creating newInstance of PDFBead_First.");
}
if (key_Thread == null) {
throw new PDFInvalidParameterException("Thread is required when creating newInstance of PDFBead_First.");
}
if (key_Previous == null) {
throw new PDFInvalidParameterException("Previous is required when creating newInstance of PDFBead_First.");
}
PDFBead_First pdfObject = new PDFBead_First(pdfDocument);
pdfObject.setRect(key_Rectangle);
pdfObject.setNext(key_N);
pdfObject.setPage(key_Page);
pdfObject.setThread(key_Thread);
pdfObject.setPrevious(key_Previous);
return pdfObject;
}
public static PDFBead_First getInstance(CosObject cosObject) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
if (PDFCosObject.checkNullCosObject(cosObject) == null) {
return null;
}
PDFBead_First pdfObject = PDFCosObject.getCachedInstance(cosObject, PDFBead_First.class);
if (pdfObject == null) {
pdfObject = new PDFBead_First(cosObject);
}
return pdfObject;
}
public void setThread(PDFThread value) throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
if (value == null) {
throw new PDFInvalidDocumentException("Thread is a required key for the first bead and therefore cannot be removed.");
}
this.setDictionaryValue(ASName.k_T, value);
}
public PDFThread requireThread() throws PDFInvalidDocumentException, PDFIOException, PDFSecurityException {
PDFThread pdfObject = PDFThread.getInstance(this.getDictionaryCosObjectValue(ASName.k_T));
if (pdfObject == null) {
throw new PDFInvalidDocumentException("Could not get Thread");
}
return pdfObject;
}
}