protected void openMIDletUrl(String urlString) throws IOException { midletClassOrUrl = urlString; if (!autoTests) { openMIDletUrl(urlString, createMIDletClassLoader(true)); } else { runAutoTests(urlString, false); } }
public static File getConfigPath() { if (meHome == null) { meHome = initMEHomePath(); } return meHome; }
public static void main(String[] args) { org.microemu.app.Main.main(args); }
public void actionPerformed(ActionEvent e) { if (recordStoreManagerDialog == null) { recordStoreManagerDialog = new RecordStoreManagerDialog(Main.this, common); recordStoreManagerDialog.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { menuRecordStoreManager.setState(false); } }); recordStoreManagerDialog.pack(); Rectangle window = Config.getWindow("recordStoreManager", new Rectangle(0, 0, 640, 320)); recordStoreManagerDialog.setBounds(window.x, window.y, window.width, window.height); } recordStoreManagerDialog.setVisible(!recordStoreManagerDialog.isVisible()); } };
public SwtSelectDeviceDialog(Shell parent, EmulatorContext emulatorContext) { super(parent); this.emulatorContext = emulatorContext; Vector devs = Config.getDeviceEntries(); for (int i = 0; i < devs.size(); i++) { DeviceEntry entry = (DeviceEntry) devs.elementAt(i); if (entry.isDefaultDevice()) { selectedEntry = entry; } } }
/** * TODO add proper Error handling and display in this function. */ public static void openMIDletUrlSafe(String urlString) { try { getInstance().openMIDletUrl(urlString); } catch (IOException e) { Message.error("Unable to open jad " + urlString, e); } }
public void handleEvent(Event ev) { // TODO change to JadUrlPanel SwtInputDialog inputDialog = new SwtInputDialog(shell, "Open...", "Enter JAD URL:"); if (inputDialog.open() == SwtDialog.OK) { try { openJadUrl(inputDialog.getValue()); } catch (IOException ex) { System.err.println("Cannot load " + inputDialog.getValue()); } } } };
protected Component createContents(Container parent) { devicePanel = new SwingDeviceComponent(); devicePanel.addKeyListener(devicePanel); addKeyListener(devicePanel); return devicePanel; }
public static ClassLoader createExtensionsClassLoader(final URL[] urls) { return new ExtensionsClassLoader(urls, getExtensionsClassLoader()); }
public void notifyDestroyed(MIDletContext midletContext) { Logger.debug("notifyDestroyed"); notifyImplementationMIDletDestroyed(); startLauncher(midletContext); }
protected void showNotify() { if (common.getRecordStoreManager() instanceof FileRecordStoreManager) { selectStoreCombo.setSelectedIndex(0); } else { selectStoreCombo.setSelectedIndex(1); } }
public void loadImplementationsFromConfig() { Map extensions = Config.getExtensions(); for (Iterator iterator = extensions.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); registerImplementation((String) entry.getKey(), (Map) entry.getValue(), false); } }
public void actionPerformed(ActionEvent e) { common.startLauncher(MIDletBridge.getMIDletContext()); } };
public static void setRecordStoreManagerClassName(String className) { XMLElement recordStoreManagerXml = configXml.getChildOrNew("recordStoreManager"); recordStoreManagerXml.setAttribute("class", className); saveConfig(); }
public void addAppClass(String className) throws ConfigurationException { if (this.delegationType == DELEGATION_SYSTEM) { throw new ConfigurationException("Can't extend system CLASSPATH"); } appclasses.add(className); }
public Headless() { emulator = new Common(context); }
public void actionPerformed(ActionEvent e) { Logger.setLocationEnabled(menuRecordLocation.getState()); Config.setLogConsoleLocationEnabled(menuRecordLocation.getState()); } });
public static void setRecentDirectory(String key, String recentJadDirectory) { XMLElement filesXml = configXml.getChildOrNew("files"); XMLElement recentJadDirectoryXml = filesXml.getChildOrNew(key); recentJadDirectoryXml.setContent(recentJadDirectory); saveConfig(); }
public void addAppClassPath(String path) throws ConfigurationException { if (this.delegationType == DELEGATION_SYSTEM) { throw new ConfigurationException("Can't extend system CLASSPATH"); } appclasspath.add(path); }
public static void setLogConsoleLocationEnabled(boolean state) { XMLElement logConsoleXml = configXml.getChildOrNew("logConsole"); if (state) { logConsoleXml.setAttribute("locationEnabled", "true"); } else { logConsoleXml.setAttribute("locationEnabled", "false"); } saveConfig(); }