/* */ package NET.worlds.scape; /* */ /* */ import NET.worlds.core.IniFile; /* */ import java.util.Vector; /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ProgressiveAdder /* */ implements FrameHandler /* */ { /* */ Vector addList; /* 15 */ static ProgressiveAdder theProgressiveAdder = null; /* */ /* */ public static ProgressiveAdder get() /* */ { /* 19 */ if (theProgressiveAdder == null) { /* 20 */ theProgressiveAdder = new ProgressiveAdder(); /* */ } /* 22 */ return theProgressiveAdder; /* */ } /* */ /* */ ProgressiveAdder() /* */ { /* 27 */ this.addList = new Vector(); /* */ } /* */ /* */ public boolean enabled() /* */ { /* 32 */ return IniFile.gamma().getIniInt("ProgressiveAvLoading", 0) == /* 33 */ 1; /* */ } /* */ /* */ void scheduleForAdd(WObject parent, WObject child) /* */ { /* 38 */ synchronized (this.addList) /* */ { /* 40 */ WObject[] objs = new WObject[2]; /* 41 */ objs[0] = parent; /* 42 */ objs[1] = child; /* */ /* 44 */ this.addList.addElement(objs); /* */ } /* */ } /* */ /* */ public boolean handle(FrameEvent fe) /* */ { /* 50 */ synchronized (this.addList) /* */ { /* 52 */ if (this.addList.size() > 0) /* */ { /* 54 */ WObject[] objs = (WObject[])this.addList.elementAt(0); /* 55 */ WObject parent = objs[0]; /* 56 */ WObject child = objs[1]; /* 57 */ if ((!parent.discarded) && (!child.discarded)) /* */ { /* */ /* 60 */ parent.add(child); /* */ } /* */ /* */ /* 64 */ this.addList.removeElementAt(0); /* */ } /* */ } /* */ /* 68 */ return true; /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ProgressiveAdder.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */