TextPosn.java
3.06 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.text.TextAttr;
import com.adobe.xfa.text.TextPosnBase;
import com.adobe.xfa.text.TextStream;
public class TextPosn
extends TextPosnBase {
TextPosn mpoNext;
public TextPosn() {
}
public TextPosn(TextPosn oSource) {
super(oSource);
this.streamAttach();
}
public TextPosn(TextPosnBase oSource) {
super(oSource);
this.streamAttach();
}
public TextPosn(TextStream poNewStream) {
super(poNewStream);
this.streamAttach();
}
public TextPosn(TextStream poNewStream, int nNewIndex, int eNewPosn) {
super(poNewStream, nNewIndex, eNewPosn);
this.streamAttach();
}
public TextPosn(TextStream poNewStream, int nNewIndex) {
super(poNewStream, nNewIndex);
this.streamAttach();
}
@Override
public boolean equals(Object object) {
return super.equals(object);
}
@Override
public int hashCode() {
return super.hashCode();
}
public void copyFrom(TextPosn oSource) {
this.copyFrom((TextPosnBase)oSource);
}
@Override
public void copyFrom(TextPosnBase oSource) {
boolean bReattach = this.conditionalDetach(oSource.stream());
super.copyFrom(oSource);
this.conditionalAttach(bReattach);
}
@Override
public void associate(TextStream poNewStream, int eNewPosn) {
boolean bReattach = this.conditionalDetach(poNewStream);
super.associate(poNewStream, eNewPosn);
this.conditionalAttach(bReattach);
}
@Override
public void associate(TextStream poNewStream, int nNewIndex, int eNewPosn) {
boolean bReattach = this.conditionalDetach(poNewStream);
super.associate(poNewStream, nNewIndex, eNewPosn);
this.conditionalAttach(bReattach);
}
@Override
public void associate(TextStream poNewStream) {
boolean bReattach = this.conditionalDetach(poNewStream);
super.associate(poNewStream);
this.conditionalAttach(bReattach);
}
@Override
public void para() {
this.insertPara();
}
@Override
public void text(String sText) {
this.insert(sText);
}
@Override
public void attr(TextAttr oAttr) {
this.attribute(oAttr);
}
private boolean conditionalDetach(TextStream poNewStream) {
if (this.stream() == poNewStream) {
return false;
}
if (this.stream() != null) {
this.streamDetach(this.stream());
}
return poNewStream != null;
}
private void conditionalAttach(boolean bReattach) {
if (bReattach) {
this.streamAttach(this.stream());
}
}
private void streamAttach() {
if (this.stream() != null) {
this.streamAttach(this.stream());
}
}
private void streamAttach(TextStream poNewStream) {
poNewStream.posnAttach(this);
}
private void streamDetach(TextStream poOldStream) {
poOldStream.posnDetach(this);
}
}