1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.inigma.iniglet;
18
19 import java.io.IOException;
20 import java.util.Properties;
21
22 import org.eclipse.swt.events.PaintEvent;
23 import org.eclipse.swt.events.PaintListener;
24 import org.eclipse.swt.graphics.Color;
25 import org.eclipse.swt.graphics.Image;
26 import org.eclipse.swt.widgets.Display;
27
28 class LogoImage implements PaintListener {
29 private Color white;
30 private Image image;
31
32 public LogoImage() {
33 Display display = Display.getDefault();
34 white = new Color(display, 255, 255, 255);
35 image = new Image(display, getClass().getResourceAsStream("/images/inigma-logo.png"));
36 }
37
38 public void paintControl(PaintEvent e) {
39 Properties config = new Properties();
40 try {
41 config.load(Splash.class.getResourceAsStream("/config.properties"));
42 } catch (IOException ignore) {
43 }
44 e.gc.drawImage(image, 0, 0);
45
46 e.gc.setForeground(white);
47
48 String version = config.getProperty("version", "");
49 e.gc.drawText(version, 15, 155, true);
50
51
52
53 }
54 }