Codota Logo
MIDletBridge
Code IndexAdd Codota to your IDE (free)

How to use
MIDletBridge
in
org.microemu

Best Java code snippets using org.microemu.MIDletBridge (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.microemu/microemu-javase-swing

  public void windowDeiconified(WindowEvent ev) {
    try {
      MIDletBridge.getMIDletAccess(MIDletBridge.getCurrentMIDlet()).startApp();
    } catch (MIDletStateChangeException ex) {
      System.err.println(ex);
    }
  }
};
origin: org.microemu/microemu-javase-swt

  public void handleEvent(Event e)
  {
    if (selectDeviceDialog.open() == SwtDialog.OK) {
      if (selectDeviceDialog.getSelectedDeviceEntry().equals(getDevice())) {
        return;
      }
      if (MIDletBridge.getCurrentMIDlet() != getLauncher()) {
        if (!SwtMessageDialog.openQuestion(shell,
            "Question?", "Changing device needs MIDlet to be restarted. All MIDlet data will be lost. Are you sure?")) { 
          return;
        }
      }
      setDevice(selectDeviceDialog.getSelectedDeviceEntry());
      if (MIDletBridge.getCurrentMIDlet() != getLauncher()) {
        try {
          startMidlet(MIDletBridge.getCurrentMIDlet().getClass(), MIDletBridge.getMIDletAccess());
        } catch (Exception ex) {
          System.err.println(ex);
        }
      } else {
        startLauncher(MIDletBridge.getMIDletContext());
      }
    }
  }    
};
origin: org.microemu/microemu-javase-swing

  public void run() {
    try {
      MIDletBridge.getMIDletAccess(midlet).startApp();
    } catch (MIDletStateChangeException ex) {
      System.err.println(ex);
    }
  }
}.start();
origin: org.microemu/microemu-javase

public InputStream getResourceAsStream(String name) {
  return MIDletBridge.getCurrentMIDlet().getClass().getResourceAsStream(name);
}
origin: org.microemu/microemu-javase

MIDletContext context = startMidlet(midletClass, MIDletBridge.getMIDletAccess());
if (MIDletBridge.getMIDletContext() == context) {
  synchronized (destroyNotify) {
    try {
origin: org.microemu/microemu-javase-swing

  public void actionPerformed(ActionEvent e) {
    common.startLauncher(MIDletBridge.getMIDletContext());
  }
};
origin: org.microemu/microemu-javase

MIDletBridge.setThreadMIDletContext(context);
MIDletBridge.getRecordStoreManager().init(MIDletBridge.getMicroEmulator());
try {
  MIDlet m;
  } catch (Throwable e) {
    Message.error(errorTitle, "Unable to create MIDlet, " + Message.getCauseMessage(e), e);
    MIDletBridge.destroyMIDletContext(context);
    return null;
  } catch (Throwable e) {
    Message.error(errorTitle, "Unable to start MIDlet, " + Message.getCauseMessage(e), e);
    MIDletBridge.destroyMIDletContext(context);
    return null;
  MIDletBridge.setThreadMIDletContext(null);
origin: org.microemu/microemu-javase

protected void startLauncher(MIDletContext midletContext) {
  if ((midletContext != null) && (midletContext.isLauncher())) {
    return;
  }
  if (midletContext != null) {
    try {
      MIDletAccess previousMidletAccess = midletContext.getMIDletAccess();
      if (previousMidletAccess != null) {
        previousMidletAccess.destroyApp(true);
      }
    } catch (Throwable e) {
      Logger.error("destroyApp error", e);
    }
    if (exitOnMIDletDestroy) {
      System.exit(0);
    }
  }
  try {
    launcher = new Launcher(this);
    MIDletBridge.getMIDletAccess(launcher).startApp();
    launcher.setCurrentMIDlet(launcher);
  } catch (Throwable e) {
    Message.error("Unable to start launcher MIDlet, " + Message.getCauseMessage(e), e);
    handleStartMidletException(e);
  } finally {
    MIDletBridge.setThreadMIDletContext(null);
  }
}
origin: org.microemu/microemu-javase

MIDletBridge.clear();
    Launcher.addMIDletEntry(new MIDletEntry(jadEntry.getName(), midletClass));
  startLauncher(MIDletBridge.getMIDletContext());
  setStatusBar("");
} finally {
origin: org.microemu/microemu-javase

public Common(EmulatorContext context) {
  instance = this;
  this.emulatorContext = context;
  /*
   * Initialize secutity context for implemenations, May be there are better place
   * for this call
   */
  ImplFactory.instance();
  MIDletSystemProperties.initContext();
  // TODO integrate with ImplementationInitialization
  ImplFactory.registerGCF(ImplFactory.DEFAULT, new ConnectorImpl());
  MIDletBridge.setMicroEmulator(this);
}
origin: org.microemu/microemu-javase

  launcher.setCurrentMIDlet(launcher);
} finally {
  MIDletBridge.setThreadMIDletContext(null);
origin: org.microemu/microemu-javase-swing

public void destroy() {
  try {
    MIDletBridge.getMIDletAccess(midlet).destroyApp(true);
  } catch (MIDletStateChangeException ex) {
    System.err.println(ex);
  }
}
origin: org.microemu/microemu-javase-swing

public InputStream getResourceAsStream(String name) {
  return MIDletBridge.getCurrentMIDlet().getClass().getResourceAsStream(name);
}

origin: org.microemu/microemu-javase

MIDletEntry entry = launcher.getSelectedMidletEntry();
if (startMidlet && entry != null) {
  started = (null != startMidlet(entry.getMIDletClass(), MIDletBridge.getMIDletAccess()));
started = (null != startMidlet(midletClass, MIDletBridge.getMIDletAccess()));
startLauncher(MIDletBridge.getMIDletContext());
origin: org.microemu/microemu-javase

private static void register(MIDletTimer timer) {
  if (timer.midletContext == null) {
    timer.midletContext = MIDletBridge.getMIDletContext();
  }
  if (timer.midletContext == null) {
    Logger.error("Creating Timer with no MIDlet context", new Throwable());
    return;
  }
  Map timers = (Map) midlets.get(timer.midletContext);
  if (timers == null) {
    // Can't use WeakHashMap Timers are disposed by JVM
    timers = new HashMap();
    midlets.put(timer.midletContext, timers);
  }
  // Logger.debug("Register timer created from [" + timer.name + "]");
  timers.put(timer, timer.midletContext);
}
origin: org.microemu/microemu-javase-swing

MIDletBridge.setMicroEmulator(this);
origin: org.microemu/microemu-javase-swing

public void stop() {
  MIDletBridge.getMIDletAccess(midlet).pauseApp();
}
origin: org.microemu/microemu-javase-swing

public void windowIconified(WindowEvent ev) {
  MIDletBridge.getMIDletAccess(MIDletBridge.getCurrentMIDlet()).pauseApp();
}
origin: org.microemu/microemu-javase-swing

public InputStream getResourceAsStream(String name) {
  return MIDletBridge.getCurrentMIDlet().getClass().getResourceAsStream(name);
}

origin: org.microemu/microemu-javase

private static void register(MIDletThread thread) {
  MIDletContext midletContext = MIDletBridge.getMIDletContext();
  if (midletContext == null) {
    Logger.error("Creating thread with no MIDlet context", new Throwable());
    return;
  }
  thread.callLocation  = ThreadUtils.getCallLocation(MIDletThread.class.getName());
  Map threads = (Map)midlets.get(midletContext);
  if (threads == null) {
    threads = new WeakHashMap();
    midlets.put(midletContext, threads);
  }
  threads.put(thread, midletContext);
}

org.microemuMIDletBridge

Most used methods

  • getCurrentMIDlet
  • getMIDletAccess
  • getMIDletContext
  • setMicroEmulator
  • clear
  • destroyMIDletContext
  • getMicroEmulator
  • getRecordStoreManager
  • setThreadMIDletContext

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JPanel (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now