Package net.rim.device.api.ui

Examples of net.rim.device.api.ui.UiApplication


    contextMenu.addItem(deleteItem);
  }

  void pushScreen(Screen s) {
    Screen screen = getScreen();
    UiApplication app = (UiApplication) screen.getApplication();
    app.pushScreen(s);
  }
View Full Code Here


      sInitialized = true;
    }
  }

  private static void startApplication(Uri uri) {
    UiApplication app = new AuthenticatorApplication();
    AuthenticatorScreen screen = new AuthenticatorScreen();
    app.pushScreen(screen);
    if (uri != null) {
      screen.parseSecret(uri);
      screen.refreshUserList();
    }
    app.enterEventDispatcher();
  }
View Full Code Here

    mUsers[position] = currentPin;
    return currentPin.mPin;
  }

  private void pushScreen(Screen screen) {
    UiApplication app = (UiApplication) getApplication();
    app.pushScreen(screen);
  }
View Full Code Here

    public Object invoke(Object thiz, Object[] args) throws Exception {
    if (args.length == 1) { 
      // Now get the callback method to fire
      final ScriptableFunction _callback = (ScriptableFunction)args[0];
     
      final UiApplication uiApp = UiApplication.getUiApplication()
      UiApplication.getUiApplication().invokeLater(new Runnable()
      {
        public void run()
        {
          FilePicker fp = FilePicker.getInstance();
View Full Code Here

          }
     
      // 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

            _items,
            _visibleRows,
            _rowHeight,
            _selectedIndex);
       
        final UiApplication uiApp = UiApplication.getUiApplication();
       
        // Now create the zooming transition effect to make the spinner appear
        TransitionContext transition = new TransitionContext(TransitionContext.TRANSITION_ZOOM);
        transition.setIntAttribute(TransitionContext.ATTR_DURATION, 250);
        transition.setIntAttribute(TransitionContext.ATTR_KIND, TransitionContext.KIND_IN);
       
        UiEngineInstance engine = uiApp.getUiEngineInstance();
        engine.setTransition(null, customSpinnerPopup, UiEngineInstance.TRIGGER_PUSH, transition);

        transition = new TransitionContext(TransitionContext.TRANSITION_ZOOM);
        transition.setIntAttribute(TransitionContext.ATTR_DURATION, 250);
        transition.setIntAttribute(TransitionContext.ATTR_KIND, TransitionContext.KIND_OUT);
        engine.setTransition(customSpinnerPopup, null, UiEngineInstance.TRIGGER_POP, transition);
     
        // Push the screen to the foreground
        uiApp.pushModalScreen(customSpinnerPopup);
        Object[] result = new Object[1];
   
        // Record the result that the user chose. If they didn't choose an
        // option return undefined
        if(customSpinnerPopup.isSet()) {   
View Full Code Here

   */
  public static void main(String[] args) {
    EventLogger.register(UID,
        "com.blackberry.toolkit.sample.youtube.YoutubeClient",
        EventLogger.VIEWER_STRING);
    UiApplication app = new YoutubeClient();
    app.enterEventDispatcher();
  }
View Full Code Here

    Phone.removePhoneListener(this);
  }

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

        /**
         * @see FieldChangeListener#fieldChanged(Field, int)
         */
        public void fieldChanged(final Field field, final int context) {
            final UiApplication uiApp = UiApplication.getUiApplication();

            if (field == _activityButton) {
                uiApp.pushScreen(new ActivityIndicatorScreen());

            } else if (field == _progressButton) {
                uiApp.pushScreen(new ProgressIndicatorScreen());
            }
        }
View Full Code Here

     *            Command-line arguments (not used)
     */
    public static void main(final String[] args) {
        // Create a new instance of the application and make the currently
        // running thread the application's event dispatch thread.
        final UiApplication app = new PictureScrollFieldDemo();
        app.enterEventDispatcher();
    }
View Full Code Here

TOP

Related Classes of net.rim.device.api.ui.UiApplication

Copyright © 2018 www.massapicom. 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.