summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/PrintAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/scape/PrintAction.java')
-rw-r--r--NET/worlds/scape/PrintAction.java116
1 files changed, 116 insertions, 0 deletions
diff --git a/NET/worlds/scape/PrintAction.java b/NET/worlds/scape/PrintAction.java
new file mode 100644
index 0000000..e35e842
--- /dev/null
+++ b/NET/worlds/scape/PrintAction.java
@@ -0,0 +1,116 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import NET.worlds.console.Console;
+/* */ import java.io.IOException;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class PrintAction
+/* */ extends Action
+/* */ {
+/* 21 */ String txt = null;
+/* */
+/* */
+/* */
+/* */
+/* */ public PrintAction() {}
+/* */
+/* */
+/* */
+/* */ public PrintAction(String text)
+/* */ {
+/* 32 */ this.txt = text;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public Persister trigger(Event arg, Persister seqID)
+/* */ {
+/* 41 */ String msg = this.txt;
+/* */
+/* 43 */ if (msg == null) {
+/* 44 */ msg = getName() + "Has-no-text";
+/* */ }
+/* 46 */ Console.println(msg);
+/* */
+/* 48 */ return null;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public Object properties(int index, int offset, int mode, Object value)
+/* */ throws NoSuchPropertyException
+/* */ {
+/* 59 */ Object ret = null;
+/* 60 */ switch (index - offset) {
+/* */ case 0:
+/* 62 */ if (mode == 0) {
+/* 63 */ ret = StringPropertyEditor.make(new Property(this, index,
+/* 64 */ "Text Out"));
+/* 65 */ } else if (mode == 1) {
+/* 66 */ ret = this.txt;
+/* 67 */ } else if (mode == 2)
+/* 68 */ this.txt = ((String)value);
+/* 69 */ break;
+/* */ default:
+/* 71 */ ret = super.properties(index, offset + 1, mode, value);
+/* */ }
+/* 73 */ return ret;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* 80 */ private static Object classCookie = new Object();
+/* */
+/* */ public void saveState(Saver s) throws IOException
+/* */ {
+/* 84 */ s.saveVersion(0, classCookie);
+/* 85 */ super.saveState(s);
+/* 86 */ s.saveString(this.txt);
+/* */ }
+/* */
+/* */ public void restoreState(Restorer r)
+/* */ throws IOException, TooNewException
+/* */ {
+/* 92 */ switch (r.restoreVersion(classCookie)) {
+/* */ case 0:
+/* 94 */ super.restoreState(r);
+/* 95 */ this.txt = r.restoreString();
+/* 96 */ break;
+/* */ default:
+/* 98 */ throw new TooNewException();
+/* */ }
+/* */
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public String toString()
+/* */ {
+/* 108 */ return super.toString() + "[" + this.txt + "]";
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PrintAction.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file