Package net.rim.device.api.ui

Examples of net.rim.device.api.ui.UiApplication.invokeLater()


     
      // Now get the callback method to fire
      _callback = (ScriptableFunction)args[1];
     
      final UiApplication uiApp = UiApplication.getUiApplication();
      uiApp.invokeLater (new SpinnerRunnable(_callback, selectedIndex, rowHeight, visibleRows, title, choices))
    }
    return UNDEFINED;   
    }

  /**
 
View Full Code Here


  private void invokeLater(Runnable runnable) {
    if (_app != null) {
      UiApplication app = (UiApplication) _app.get();
      System.out.println(app.toString());
      if (app != null) {
        app.invokeLater(runnable);
      }
    }
  }

  public void callAdded(int arg0) {
View Full Code Here

         * @param time
         *            The time (in millisecons) delay before showing this screen
         */
        public void show(final int time) {
            final UiApplication app = UiApplication.getUiApplication();
            app.invokeLater(_popupPopper, time, false);
            app.pushModalScreen(this);
        }
    }

    /**
 
View Full Code Here

     * @param linkableContact
     *            The contact for which to fire an event
     */
    public static void fireEvent(final LinkableContact linkableContact) {
        final UiApplication app = UiApplication.getUiApplication();
        app.invokeLater(new Runnable() {
            public void run() {
                app.pushGlobalScreen(
                        new EventScreen(linkableContact, getTime()), 0,
                        UiEngine.GLOBAL_MODAL);
            }
View Full Code Here

        // Update the user interface
        final MediaPlayerDemoScreen screen = _screen;
        if (screen != null) {
            final UiApplication app = getApplication();
            if (app != null) {
                app.invokeLater(new Runnable() {
                    public void run() {
                        screen.setVolume(newVolume);
                    }
                });
            }
View Full Code Here

        app.addKeyListener(new MyMediaKeyListener());

        // Push the main screen onto the display stack
        final MediaPlayerDemoScreen screen = _screen;
        if (screen != null) {
            app.invokeLater(new Runnable() {
                public void run() {
                    app.pushScreen(screen);
                }
            });
        }
View Full Code Here

        // Load the playlist, copying the files into the filesystem if they do
        // not exist
        final StatusScreen statusScreen =
                new StatusScreen("Initializing media");
        app.invokeLater(new Runnable() {
            public void run() {
                app.pushScreen(statusScreen);
            }
        });
View Full Code Here

            playlist = PlayList.getPlaylistEntries();
        } catch (final IOException e) {
            MediaPlayerDemo.errorDialog("ERROR: " + e.getMessage());
            playlist = null;
        } finally {
            app.invokeLater(new Runnable() {
                public void run() {
                    app.popScreen(statusScreen);
                }
            });
        }
View Full Code Here

        }

        final MediaPlayerDemoScreen screen = _handler.getScreen();
        if (screen != null) {
            final UiApplication app = UiApplication.getUiApplication();
            app.invokeLater(new Runnable() {
                public void run() {
                    screen.setMuted(mute);
                }
            });
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.