PDFWritingMode.java
1.45 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException
*/
package com.adobe.internal.pdftoolkit.pdf.graphics.font;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public enum PDFWritingMode {
HORIZONTAL(0),
VERTICAL(1);
private final int mode;
private PDFWritingMode(int mode) {
this.mode = mode;
}
public String toString() {
String modeStr = null;
switch (this.mode) {
case 0: {
modeStr = "horizontal writing mode";
break;
}
case 1: {
modeStr = "vertical writing mode";
}
}
return modeStr;
}
int getValue() {
return this.mode;
}
public static final PDFWritingMode getWritingModeForValue(int modeValue) throws PDFInvalidParameterException {
PDFWritingMode mode = null;
switch (modeValue) {
case 0: {
mode = HORIZONTAL;
break;
}
case 1: {
mode = VERTICAL;
break;
}
default: {
throw new PDFInvalidParameterException("illegal writing mode value");
}
}
return mode;
}
}