TextPanel.java
1.97 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.text.TextFrame;
import com.adobe.xfa.ut.UnitSpan;
public class TextPanel
extends TextFrame {
private static final UnitSpan DEFAULT_SIZE = new UnitSpan(3, 72000);
private UnitSpan moWidth;
private UnitSpan moHeight;
public TextPanel() {
this.moWidth = DEFAULT_SIZE;
this.moHeight = DEFAULT_SIZE;
}
public TextPanel(TextPanel oSource) {
this.moWidth = oSource.moWidth;
this.moHeight = oSource.moHeight;
}
public TextPanel(UnitSpan oWidth, UnitSpan oHeight) {
this.moWidth = oWidth;
this.moHeight = oHeight;
}
public void setWidth(UnitSpan oWidth) {
if (oWidth == this.moWidth) {
return;
}
this.moWidth = oWidth;
this.reflowFromHere();
}
public UnitSpan getWidth() {
return this.moWidth;
}
public void setHeight(UnitSpan oHeight) {
if (oHeight == this.moHeight) {
return;
}
this.moHeight = oHeight;
this.reflowFromHere();
}
public UnitSpan getHeight() {
return this.moHeight;
}
public void setDimensions(UnitSpan oWidth, UnitSpan oHeight) {
if (oWidth == this.moWidth && oHeight == this.moHeight) {
return;
}
this.moWidth = oWidth;
this.moHeight = oHeight;
this.reflowFromHere();
}
public void copyFrom(TextPanel oSource) {
this.moWidth = oSource.moWidth;
this.moHeight = oSource.moHeight;
}
@Override
public UnitSpan minWidth() {
return this.moWidth;
}
@Override
public UnitSpan minHeight() {
return this.moHeight;
}
@Override
public UnitSpan maxWidth() {
return this.moWidth;
}
@Override
public UnitSpan maxHeight() {
return this.moHeight;
}
@Override
public TextFrame cloneFrame() {
return new TextPanel(this);
}
}