CSS20FontDescription.java
3.67 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.fontengine.inlineformatting.css20;
import com.adobe.fontengine.font.FontDescription;
import com.adobe.fontengine.inlineformatting.css20.CSS20Attribute;
public final class CSS20FontDescription
extends FontDescription {
static final long serialVersionUID = 1;
private final String familyName;
private final CSS20Attribute.CSSStyleValue style;
private final CSS20Attribute.CSSVariantValue variant;
private final CSS20Attribute.CSSStretchValue stretch;
private final int weight;
private final double lowPointSize;
private final double highPointSize;
public CSS20FontDescription(String familyName, CSS20Attribute.CSSStyleValue style, CSS20Attribute.CSSVariantValue variant, CSS20Attribute.CSSStretchValue stretch, int weight, double lowPointSize, double highPointSize) {
this.familyName = familyName;
this.style = style;
this.variant = variant;
this.stretch = stretch;
this.weight = weight;
this.lowPointSize = lowPointSize;
this.highPointSize = highPointSize;
}
public String getFamilyName() {
return this.familyName;
}
public CSS20Attribute.CSSStyleValue getStyle() {
return this.style;
}
public CSS20Attribute.CSSVariantValue getVariant() {
return this.variant;
}
public int getWeight() {
return this.weight;
}
public CSS20Attribute.CSSStretchValue getStretch() {
return this.stretch;
}
public double getLowPointSize() {
return this.lowPointSize;
}
public double getHighPointSize() {
return this.highPointSize;
}
public int hashCode() {
int hash = this.familyName.hashCode() ^ this.style.hashCode() ^ this.variant.hashCode() ^ this.stretch.hashCode() ^ this.weight ^ (int)(this.lowPointSize * 100.0) ^ (int)(this.highPointSize * 100.0);
return hash;
}
public boolean equals(Object obj) {
if (obj != null) {
if (this == obj) {
return true;
}
if (obj instanceof CSS20FontDescription && this.familyName.equals(((CSS20FontDescription)obj).familyName) && this.style.equals(((CSS20FontDescription)obj).style) && this.variant.equals(((CSS20FontDescription)obj).variant) && this.stretch.equals(((CSS20FontDescription)obj).stretch) && this.weight == ((CSS20FontDescription)obj).weight && this.lowPointSize == ((CSS20FontDescription)obj).lowPointSize && this.highPointSize == ((CSS20FontDescription)obj).highPointSize) {
return true;
}
}
return false;
}
public String toString() {
StringBuffer description = new StringBuffer();
description.append("{familyName = " + this.familyName + ", ");
if (this.style == CSS20Attribute.CSSStyleValue.NORMAL) {
description.append("stl = NORMAL, ");
} else if (this.style == CSS20Attribute.CSSStyleValue.ITALIC) {
description.append("stl = ITALIC, ");
} else if (this.style == CSS20Attribute.CSSStyleValue.OBLIQUE) {
description.append("stl = OBLIQUE, ");
}
if (this.variant == CSS20Attribute.CSSVariantValue.NORMAL) {
description.append("var = NORMAL, ");
} else if (this.variant == CSS20Attribute.CSSVariantValue.SMALL_CAPS) {
description.append("var = SMALL-CAPS, ");
}
description.append("wt = " + this.weight + ", ");
description.append("str = " + this.stretch.toString() + ", ");
description.append("lowPt = " + this.lowPointSize + ", ");
description.append("highPt = " + this.highPointSize + "}");
return description.toString();
}
}