diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/SavedAvMenuItem.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/console/SavedAvMenuItem.java')
| -rw-r--r-- | NET/worlds/console/SavedAvMenuItem.java | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/NET/worlds/console/SavedAvMenuItem.java b/NET/worlds/console/SavedAvMenuItem.java new file mode 100644 index 0000000..4e1bbf2 --- /dev/null +++ b/NET/worlds/console/SavedAvMenuItem.java @@ -0,0 +1,68 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import NET.worlds.scape.Persister; +/* */ import NET.worlds.scape.Restorer; +/* */ import NET.worlds.scape.Saver; +/* */ import NET.worlds.scape.TooNewException; +/* */ import java.awt.CheckboxMenuItem; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SavedAvMenuItem +/* */ extends CheckboxMenuItem +/* */ implements Persister +/* */ { +/* */ private static final long serialVersionUID = 4876455058245955809L; +/* */ private String avatar; +/* */ +/* */ public SavedAvMenuItem(String name, String avatar) +/* */ { +/* 27 */ super(name); +/* 28 */ this.avatar = avatar; +/* */ } +/* */ +/* */ public SavedAvMenuItem() {} +/* */ +/* */ public String getAvatar() +/* */ { +/* 35 */ return this.avatar; +/* */ } +/* */ +/* */ public void setAvatar(String av) { +/* 39 */ this.avatar = av; +/* */ } +/* */ +/* 42 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 45 */ s.saveVersion(1, classCookie); +/* 46 */ s.saveString(getLabel()); +/* 47 */ s.saveString(this.avatar); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 51 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 53 */ setLabel(r.restoreString()); +/* 54 */ this.avatar = r.restoreString(); +/* 55 */ break; +/* */ default: +/* 57 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\SavedAvMenuItem.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |