diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/SetZoomMode.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/scape/SetZoomMode.java')
| -rw-r--r-- | NET/worlds/scape/SetZoomMode.java | 94 |
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 |