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 package com.barteo.emulator;
26
27 import java.io.InputStream;
28
29 import org.microemu.DisplayComponent;
30 import org.microemu.MIDletBridge;
31 import org.microemu.app.ui.Message;
32 import org.microemu.device.DeviceDisplay;
33 import org.microemu.device.FontManager;
34 import org.microemu.device.InputMethod;
35
36
37
38
39 public class EmulatorContext implements org.microemu.EmulatorContext {
40
41 private org.microemu.EmulatorContext context;
42
43 public EmulatorContext(org.microemu.EmulatorContext context) {
44 this.context = context;
45 }
46
47 public DeviceDisplay getDeviceDisplay() {
48 return context.getDeviceDisplay();
49 }
50
51 public FontManager getDeviceFontManager() {
52 return context.getDeviceFontManager();
53 }
54
55 public InputMethod getDeviceInputMethod() {
56 return context.getDeviceInputMethod();
57 }
58
59 public DisplayComponent getDisplayComponent() {
60 return context.getDisplayComponent();
61 }
62
63 public InputStream getResourceAsStream(String name) {
64 return MIDletBridge.getCurrentMIDlet().getClass().getResourceAsStream(name);
65 }
66
67 public boolean platformRequest(final String URL) {
68 new Thread(new Runnable() {
69 public void run() {
70 Message.info("MIDlet requests that the device handle the following URL: " + URL);
71 }
72 }).start();
73
74 return false;
75 }
76 }