TextSelection.java
1.92 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.text;
import com.adobe.xfa.gfx.GFXColour;
import com.adobe.xfa.text.TextRange;
import com.adobe.xfa.text.TextStream;
public class TextSelection
extends TextRange {
private GFXColour moColour;
private GFXColour moColourBg;
public TextSelection() {
this.moColour = GFXColour.WHITE;
this.moColourBg = GFXColour.BLACK;
}
public TextSelection(TextSelection oSource) {
super(oSource);
this.moColour = oSource.moColour;
this.moColourBg = oSource.moColourBg;
}
public TextSelection(GFXColour oColour, GFXColour oColourBg, TextStream poStream) {
super(poStream);
this.moColour = oColour;
this.moColourBg = oColourBg;
}
public GFXColour colour() {
return this.moColour;
}
public void colour(GFXColour oNewColour) {
this.moColour = oNewColour;
}
public GFXColour colourBg() {
return this.moColourBg;
}
public void colourBg(GFXColour oNewColourBg) {
this.moColourBg = oNewColourBg;
}
public void copyFrom(TextSelection oSource) {
super.copyFrom(oSource);
this.moColour = oSource.moColour;
this.moColourBg = oSource.moColourBg;
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!super.equals(object)) {
return false;
}
if (!(object instanceof TextSelection)) {
return false;
}
TextSelection other = (TextSelection)object;
return this.moColour.equals(other.moColour) && this.moColourBg.equals(other.moColourBg);
}
@Override
public int hashCode() {
int hash = 83;
hash = hash * 31 ^ super.hashCode();
hash = hash * 31 ^ this.moColour.hashCode();
hash = hash * 31 ^ this.moColourBg.hashCode();
return hash;
}
}