blob: 9b13f1d9e4fcdff8ed17b9fd45783eeac80d137a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/* */ 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
*/
|