/* */ package NET.worlds.console; /* */ /* */ import java.awt.Dimension; /* */ import java.awt.Frame; /* */ import java.awt.Toolkit; /* */ import java.awt.Window; /* */ import java.io.PrintStream; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class SplashScreen /* */ extends Window /* */ { /* */ private static final long serialVersionUID = 4848128412139723543L; /* 32 */ private SplashCanvas sc = null; /* */ /* */ public SplashScreen(String appname, String imagename) { /* 35 */ super(new Frame(appname)); /* 36 */ this.sc = new SplashCanvas(imagename); /* 37 */ add(this.sc); /* */ /* 39 */ pack(); /* 40 */ center(); /* */ } /* */ /* */ public void setImageName(String imagename) { /* 44 */ this.sc.setImage(imagename); /* 45 */ pack(); /* 46 */ center(); /* */ /* 48 */ this.sc.repaint(); /* */ } /* */ /* */ public void addOverlay(String name, int x, int y) { /* 52 */ this.sc.addOverlay(name, x, y); /* 53 */ center(); /* */ } /* */ /* */ public void removeOverlay(String name, int x, int y) { /* 57 */ this.sc.removeOverlay(name, x, y); /* */ } /* */ /* */ public void center() /* */ { /* 62 */ Dimension dim = getSize(); /* 63 */ Dimension scrdim = Toolkit.getDefaultToolkit().getScreenSize(); /* 64 */ int x = scrdim.width >= dim.width ? (scrdim.width - dim.width) / 2 : /* 65 */ 0; /* 66 */ int y = scrdim.height >= dim.height ? (scrdim.height - dim.height) / 2 : /* 67 */ 0; /* 68 */ setLocation(x, y); /* */ } /* */ /* */ public void dispose() /* */ { /* 73 */ super.dispose(); /* */ try { /* 75 */ this.sc.flush(); /* */ } catch (NullPointerException e) { /* 77 */ System.out.println("Flushing went bad!"); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\SplashScreen.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */