summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/SetBooleanAction.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/SetBooleanAction.java
downloadworlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz
worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/SetBooleanAction.java')
-rw-r--r--NET/worlds/scape/SetBooleanAction.java75
1 files changed, 75 insertions, 0 deletions
diff --git a/NET/worlds/scape/SetBooleanAction.java b/NET/worlds/scape/SetBooleanAction.java
new file mode 100644
index 0000000..f9e2fe6
--- /dev/null
+++ b/NET/worlds/scape/SetBooleanAction.java
@@ -0,0 +1,75 @@
+/* */ 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
+ */ \ No newline at end of file