summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/SetStringAction.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/SetStringAction.java
downloadworlds.jar-main.tar.xz
worlds.jar-main.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/SetStringAction.java')
-rw-r--r--NET/worlds/scape/SetStringAction.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/NET/worlds/scape/SetStringAction.java b/NET/worlds/scape/SetStringAction.java
new file mode 100644
index 0000000..3a6d416
--- /dev/null
+++ b/NET/worlds/scape/SetStringAction.java
@@ -0,0 +1,74 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import java.io.IOException;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class SetStringAction
+/* */ extends SetPropertyAction
+/* */ {
+/* */ private String _value;
+/* */
+/* */ public Persister trigger(Event e, Persister seqID)
+/* */ {
+/* 21 */ if (useParam())
+/* 22 */ this._value = param();
+/* 23 */ set(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 = StringPropertyEditor.make(new Property(this, index,
+/* 35 */ "Set To"));
+/* 36 */ } else if (mode == 1) {
+/* 37 */ ret = this._value;
+/* 38 */ } else if (mode == 2)
+/* 39 */ this._value = ((String)value);
+/* 40 */ break;
+/* */ default:
+/* 42 */ ret = super.properties(index, offset + 1, mode, value);
+/* */ }
+/* 44 */ return ret;
+/* */ }
+/* */
+/* 47 */ private static Object classCookie = new Object();
+/* */
+/* */ public void saveState(Saver s) throws IOException
+/* */ {
+/* 51 */ s.saveVersion(1, classCookie);
+/* 52 */ super.saveState(s);
+/* 53 */ s.saveString(this._value);
+/* */ }
+/* */
+/* */ public void restoreState(Restorer r) throws IOException, TooNewException
+/* */ {
+/* 58 */ switch (r.restoreVersion(classCookie)) {
+/* */ case 1:
+/* 60 */ super.restoreState(r);
+/* 61 */ this._value = r.restoreString();
+/* 62 */ break;
+/* */
+/* */ default:
+/* 65 */ throw new TooNewException();
+/* */ }
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetStringAction.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file