/* */ 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 */