blob: f5c3fe4ad3396a079569818a6f50a753a2699f34 (
plain) (
blame)
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
|
/* */ package NET.worlds.scape;
/* */
/* */ import java.awt.Color;
/* */ import java.io.IOException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class StringTexture
/* */ extends Texture
/* */ implements Persister
/* */ {
/* */ private String _text;
/* */ private String _font;
/* */ private int _size;
/* */ private Color _fore;
/* */ private Color _back;
/* */ private char[] _array;
/* */ private int _length;
/* */
/* */ static {}
/* */
/* */ public StringTexture(String text, String font, int size, Color fore, Color back)
/* */ {
/* 36 */ this._text = text;
/* 37 */ this._font = font;
/* 38 */ this._size = size;
/* 39 */ this._fore = fore;
/* 40 */ this._back = back;
/* 41 */ this._array = text.toCharArray();
/* 42 */ this._length = text.length();
/* 43 */ makeStringTexture();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ protected StringTexture() {}
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static native void nativeInit();
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 68 */ private static Object classCookie = new Object();
/* */
/* */ private native void makeStringTexture();
/* */
/* 72 */ public void saveState(Saver s) throws IOException { s.saveVersion(0, classCookie);
/* 73 */ super.saveState(s);
/* 74 */ s.saveString(this._text);
/* 75 */ s.saveString(this._font);
/* 76 */ s.saveInt(this._size);
/* 77 */ s.saveInt(this._fore.getRGB());
/* 78 */ s.saveInt(this._back.getRGB());
/* */ }
/* */
/* */ public void restoreState(Restorer r) throws IOException, TooNewException
/* */ {
/* 83 */ switch (r.restoreVersion(classCookie)) {
/* */ case 0:
/* 85 */ super.restoreState(r);
/* 86 */ this._text = r.restoreString();
/* 87 */ this._array = this._text.toCharArray();
/* 88 */ this._length = this._text.length();
/* 89 */ this._font = r.restoreString();
/* 90 */ this._size = r.restoreInt();
/* 91 */ this._fore = new Color(r.restoreInt());
/* 92 */ this._back = new Color(r.restoreInt());
/* 93 */ makeStringTexture();
/* 94 */ break;
/* */ default:
/* 96 */ throw new TooNewException();
/* */ }
/* */ }
/* */
/* 100 */ public String getText() { return this._text; }
/* 101 */ public String getFont() { return this._font; }
/* 102 */ public int getSize() { return this._size; }
/* 103 */ public Color getForegroundColor() { return this._fore; }
/* 104 */ public Color getBackgroundColor() { return this._back; }
/* */
/* */ public String toString() {
/* 107 */ return
/* */
/* */
/* */
/* 111 */ super.toString() + "[" + this._text + ", Font " + this._font + ", Size " + this._size + ", Forground " + this._fore + ", Background " + this._back + "]";
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StringTexture.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|