/* */ 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 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 */