summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/SetZoomMode.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/scape/SetZoomMode.java')
-rw-r--r--NET/worlds/scape/SetZoomMode.java94
1 files changed, 94 insertions, 0 deletions
diff --git a/NET/worlds/scape/SetZoomMode.java b/NET/worlds/scape/SetZoomMode.java
new file mode 100644
index 0000000..f5b6e0e
--- /dev/null
+++ b/NET/worlds/scape/SetZoomMode.java
@@ -0,0 +1,94 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import NET.worlds.console.Window;
+/* */ import java.io.IOException;
+/* */ import java.util.Enumeration;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class SetZoomMode
+/* */ extends Action
+/* */ implements MomentumBehavior
+/* */ {
+/* */ private boolean zoomMode;
+/* */
+/* */ public SetZoomMode(boolean on)
+/* */ {
+/* 28 */ this.zoomMode = on;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public SetZoomMode() {}
+/* */
+/* */
+/* */
+/* */
+/* */ public Persister trigger(Event e, Persister seqID)
+/* */ {
+/* 41 */ SuperRoot owner = getOwner();
+/* 42 */ if ((owner == null) ||
+/* 43 */ (!(owner instanceof Pilot)) || (!((Pilot)owner).isActive())) {
+/* 44 */ return null;
+/* */ }
+/* 46 */ Window w = Window.getMainWindow();
+/* 47 */ if (w == null) {
+/* 48 */ return null;
+/* */ }
+/* 50 */ w.setDeltaMode(this.zoomMode);
+/* 51 */ return null;
+/* */ }
+/* */
+/* 54 */ private static Object classCookie = new Object();
+/* */
+/* */ public void saveState(Saver s) throws IOException
+/* */ {
+/* 58 */ s.saveVersion(0, classCookie);
+/* 59 */ super.saveState(s);
+/* */ }
+/* */
+/* */
+/* */ public void restoreState(Restorer r)
+/* */ throws IOException, TooNewException
+/* */ {
+/* 66 */ switch (r.restoreVersion(classCookie)) {
+/* */ case 0:
+/* 68 */ super.restoreState(r);
+/* */
+/* */
+/* 71 */ break;
+/* */ default:
+/* 73 */ throw new TooNewException();
+/* */ }
+/* */
+/* */ }
+/* */
+/* */ public void transferFrom(Enumeration<Object> oldMBs)
+/* */ {
+/* 80 */ while (oldMBs.hasMoreElements()) {
+/* 81 */ SuperRoot sr = (SuperRoot)oldMBs.nextElement();
+/* 82 */ if ((sr instanceof SetZoomMode)) {
+/* 83 */ this.zoomMode = ((SetZoomMode)sr).zoomMode;
+/* 84 */ break;
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetZoomMode.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file