TextField.java
3.71 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.text.TextGfxSource;
import com.adobe.xfa.text.TextPosn;
import com.adobe.xfa.text.TextStream;
public class TextField
extends TextStream {
public static final int EMBEDTYPE_SOM = 0;
public static final int EMBEDTYPE_URI = 1;
public static final int EMBED_RAW = 0;
public static final int EMBED_FORMATTED = 1;
private TextPosn moPosn;
private int meEmbedMode = 1;
private int meEmbedType = 0;
private String msExpression = "";
public TextField() {
}
public TextField(TextField oSource) {
super(oSource, null);
this.meEmbedMode = oSource.meEmbedMode;
this.meEmbedType = oSource.meEmbedType;
this.msExpression = oSource.msExpression;
}
public TextField(String sFieldText, int eEmbedMode, int eEmbedType) {
super(sFieldText);
this.meEmbedMode = eEmbedMode;
this.meEmbedType = eEmbedType;
}
public TextField(String sFieldText, int eEmbedMode, int eEmbedType, String sExpression) {
this(sFieldText, eEmbedMode, eEmbedType);
this.msExpression = sExpression;
}
public TextField(int eEmbedMode, int eEmbedType, String sExpression) {
this.meEmbedMode = eEmbedMode;
this.meEmbedType = eEmbedType;
this.msExpression = sExpression;
}
public TextField(String sFieldText) {
super(sFieldText);
}
public void copyFrom(TextField oSource) {
super.copyFrom(oSource);
this.meEmbedType = oSource.meEmbedType;
this.meEmbedMode = oSource.meEmbedMode;
this.msExpression = oSource.msExpression;
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!super.equals(object)) {
return false;
}
TextField test = (TextField)object;
if (this.msExpression != null && test.msExpression != null ? !this.msExpression.equals(test.msExpression) : this.msExpression != test.msExpression) {
return false;
}
return this.meEmbedType == test.meEmbedType && this.meEmbedMode == test.meEmbedMode;
}
@Override
public int hashCode() {
int hash = 53;
if (this.msExpression != null) {
hash = hash * 31 ^ this.msExpression.hashCode();
}
hash = hash * 31 ^ super.hashCode();
hash = hash * 31 ^ this.meEmbedType;
hash = hash * 31 ^ this.meEmbedMode;
return hash;
}
public boolean notEqual(TextField oCompare) {
return !this.equals(oCompare);
}
public boolean isEqual(TextField oCompare) {
return this.equals(oCompare);
}
public TextField cloneField() {
return new TextField(this);
}
@Override
public TextPosn position() {
return this.moPosn == null || this.moPosn.stream() == null ? null : this.moPosn;
}
public void setEmbedMode(int eEmbedMode) {
this.meEmbedMode = eEmbedMode;
}
public int getEmbedMode() {
return this.meEmbedMode;
}
public void setEmbedType(int eEmbedType) {
this.meEmbedType = eEmbedType;
}
public int getEmbedType() {
return this.meEmbedType;
}
public void setExpression(String sExpression) {
this.msExpression = sExpression;
}
public String getExpression() {
return this.msExpression;
}
void positionSet(TextStream poStream, int nIndex) {
if (poStream == null) {
this.moPosn = null;
} else if (this.moPosn == null) {
this.moPosn = new TextPosn(poStream, nIndex, 0);
} else {
this.moPosn.associate(poStream, nIndex, 0);
}
}
}