MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / Main

Method Main

desktop/src/main/java/org/microemu/app/Main.java:123–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 };
122
123 public Main() {
124 setTitle("BombusMod");
125
126 addWindowListener(windowListener);
127
128 getContentPane().add(createContents(getContentPane()), "Center");
129
130 StaticData.getInstance().setAssetsLoader(new AssetsLoader() {
131 @Override
132 public InputStream getResourceAsStream(String resource) {
133 return Thread.currentThread().getContextClassLoader().getResourceAsStream(resource.substring(1));
134 }
135 });
136 StaticData.getInstance().setVersionInfo(new VersionInfo() {
137 @Override
138 public String getVersionNumber() {
139 return "X";
140 }
141 });
142 this.common = new Common(emulatorContext);
143 common.setRecordStoreManager(new FileRecordStoreManager());
144 J2SEDevice device = new J2SEDevice(emulatorContext);
145 common.setDevice(device);
146 J2SEDeviceDisplay deviceDisplay = (J2SEDeviceDisplay)emulatorContext.getDeviceDisplay();
147 deviceDisplay.setBackgroundColor(new Color(0x000000));
148 deviceDisplay.setForegroundColor(new Color(0xffffff));
149 deviceDisplay.setResizable(true);
150 setDeviceSize(deviceDisplay, 640, 480);
151 MIDlet midlet = common.initMIDlet(false);
152 SwingUtilities.invokeLater(new Runnable() {
153 public void run() {
154 MIDletAccess ma = MIDletBridge.getMIDletAccess(midlet);
155 if (ma != null) {
156 try {
157 ma.startApp();
158 } catch (MIDletStateChangeException e) {
159 e.printStackTrace();
160 }
161 }
162 }
163 });
164
165 updateDevice();
166 }
167
168 protected Component createContents(Container parent) {
169 devicePanel = new SwingDeviceComponent();

Callers

nothing calls this directly

Calls 15

createContentsMethod · 0.95
getInstanceMethod · 0.95
setBackgroundColorMethod · 0.95
setForegroundColorMethod · 0.95
setResizableMethod · 0.95
setDeviceSizeMethod · 0.95
updateDeviceMethod · 0.95
setAssetsLoaderMethod · 0.80
setVersionInfoMethod · 0.80
setRecordStoreManagerMethod · 0.80
initMIDletMethod · 0.80
getDeviceDisplayMethod · 0.65

Tested by

no test coverage detected