/* */ package NET.worlds.scape; /* */ /* */ import java.io.IOException; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class SetBooleanAction /* */ extends SetPropertyAction /* */ { /* */ private boolean _value; /* */ /* */ public Persister trigger(Event e, Persister seqID) /* */ { /* 21 */ if (useParam()) /* 22 */ this._value = Boolean.valueOf(param()).booleanValue(); /* 23 */ set(new Boolean(this._value)); /* 24 */ return null; /* */ } /* */ /* */ public Object properties(int index, int offset, int mode, Object value) /* */ throws NoSuchPropertyException /* */ { /* 30 */ Object ret = null; /* 31 */ switch (index - offset) { /* */ case 0: /* 33 */ if (mode == 0) { /* 34 */ ret = BooleanPropertyEditor.make( /* 35 */ new Property(this, index, "Set To"), /* 36 */ "False", "True"); /* 37 */ } else if (mode == 1) { /* 38 */ ret = new Boolean(this._value); /* 39 */ } else if (mode == 2) /* 40 */ this._value = ((Boolean)value).booleanValue(); /* 41 */ break; /* */ default: /* 43 */ ret = super.properties(index, offset + 1, mode, value); /* */ } /* 45 */ return ret; /* */ } /* */ /* 48 */ private static Object classCookie = new Object(); /* */ /* */ public void saveState(Saver s) throws IOException /* */ { /* 52 */ s.saveVersion(1, classCookie); /* 53 */ super.saveState(s); /* 54 */ s.saveBoolean(this._value); /* */ } /* */ /* */ public void restoreState(Restorer r) throws IOException, TooNewException /* */ { /* 59 */ switch (r.restoreVersion(classCookie)) { /* */ case 1: /* 61 */ super.restoreState(r); /* 62 */ this._value = r.restoreBoolean(); /* 63 */ break; /* */ /* */ default: /* 66 */ throw new TooNewException(); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetBooleanAction.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */