diff options
Diffstat (limited to 'NET/worlds/scape/PlaybackRecordingAction.java')
| -rw-r--r-- | NET/worlds/scape/PlaybackRecordingAction.java | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/NET/worlds/scape/PlaybackRecordingAction.java b/NET/worlds/scape/PlaybackRecordingAction.java new file mode 100644 index 0000000..7038fde --- /dev/null +++ b/NET/worlds/scape/PlaybackRecordingAction.java @@ -0,0 +1,80 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BlackBox; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PlaybackRecordingAction +/* */ extends Action +/* */ { +/* 14 */ private String filename = "home:record.rec"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setFilename(String m) +/* */ { +/* 22 */ this.filename = m; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqId) +/* */ { +/* 27 */ BlackBox.getInstance().play(URL.make(this.filename)); +/* 28 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 37 */ Object ret = null; +/* 38 */ switch (index - offset) { +/* */ case 0: +/* 40 */ if (mode == 0) { +/* 41 */ ret = StringPropertyEditor.make( +/* 42 */ new Property(this, index, "Filename")); +/* 43 */ } else if (mode == 1) { +/* 44 */ ret = new String(this.filename); +/* 45 */ } else if (mode == 2) +/* 46 */ this.filename = ((String)value); +/* 47 */ break; +/* */ default: +/* 49 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 51 */ return ret; +/* */ } +/* */ +/* 54 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 58 */ s.saveVersion(1, classCookie); +/* 59 */ super.saveState(s); +/* 60 */ s.saveString(this.filename); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 65 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 67 */ super.restoreState(r); +/* 68 */ this.filename = r.restoreString(); +/* 69 */ break; +/* */ default: +/* 71 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PlaybackRecordingAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |