Package net.rim.device.api.ui

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


        // 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];
   
View Full Code Here


            if( transitionContext != null ) {
                transitionContext.setIntAttribute( TransitionContext.ATTR_DURATION, _widgetConfigImpl.getTransitionDuration() );
                transitionContext.setIntAttribute( TransitionContext.ATTR_DIRECTION, _widgetConfigImpl.getTransitionDirection() );

                UiEngineInstance engine = Ui.getUiEngineInstance();
                engine
                        .setTransition( _screenBrowserField, _screenLoadingScreen, UiEngineInstance.TRIGGER_PUSH,
                                transitionContext );
            }
        }
    }
View Full Code Here

         */
        void push(final int type) {
            TransitionScreen screen = null;
            TransitionContext transitionContextIn;
            TransitionContext transitionContextOut;
            final UiEngineInstance engine = Ui.getUiEngineInstance();
            switch (type) {
            case SLIDE:
                screen = new TransitionScreen("Slider", Color.BEIGE);

                transitionContextIn =
                        new TransitionContext(
                                TransitionContext.TRANSITION_SLIDE);
                transitionContextIn.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);
                transitionContextIn.setIntAttribute(
                        TransitionContext.ATTR_DIRECTION,
                        TransitionContext.DIRECTION_UP);

                transitionContextOut =
                        new TransitionContext(
                                TransitionContext.TRANSITION_SLIDE);
                transitionContextOut.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);
                transitionContextOut.setIntAttribute(
                        TransitionContext.ATTR_DIRECTION,
                        TransitionContext.DIRECTION_DOWN);
                transitionContextOut
                        .setIntAttribute(TransitionContext.ATTR_KIND,
                                TransitionContext.KIND_OUT);

                engine.setTransition(null, screen,
                        UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
                engine.setTransition(screen, null,
                        UiEngineInstance.TRIGGER_POP, transitionContextOut);
                break;
            case FADE:
                screen = new TransitionScreen("Fade", Color.TEAL);

                transitionContextIn =
                        new TransitionContext(TransitionContext.TRANSITION_FADE);
                transitionContextIn.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);

                transitionContextOut =
                        new TransitionContext(TransitionContext.TRANSITION_FADE);
                transitionContextOut.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);
                transitionContextOut
                        .setIntAttribute(TransitionContext.ATTR_KIND,
                                TransitionContext.KIND_OUT);

                engine.setTransition(null, screen,
                        UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
                engine.setTransition(screen, null,
                        UiEngineInstance.TRIGGER_POP, transitionContextOut);
                break;
            case WIPE:
                screen = new TransitionScreen("Wipe", Color.LIGHTBLUE);

                transitionContextIn =
                        new TransitionContext(TransitionContext.TRANSITION_WIPE);
                transitionContextIn.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);
                transitionContextIn.setIntAttribute(
                        TransitionContext.ATTR_DIRECTION,
                        TransitionContext.DIRECTION_LEFT);

                transitionContextOut =
                        new TransitionContext(TransitionContext.TRANSITION_WIPE);
                transitionContextOut.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);
                transitionContextOut.setIntAttribute(
                        TransitionContext.ATTR_DIRECTION,
                        TransitionContext.DIRECTION_RIGHT);
                transitionContextOut
                        .setIntAttribute(TransitionContext.ATTR_KIND,
                                TransitionContext.KIND_OUT);

                engine.setTransition(null, screen,
                        UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
                engine.setTransition(screen, null,
                        UiEngineInstance.TRIGGER_POP, transitionContextOut);
                break;
            case ZOOM:
                screen = new TransitionScreen("Zoom", Color.LIGHTGREEN);

                transitionContextIn =
                        new TransitionContext(TransitionContext.TRANSITION_ZOOM);
                transitionContextIn.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);

                transitionContextOut =
                        new TransitionContext(TransitionContext.TRANSITION_ZOOM);
                transitionContextOut.setIntAttribute(
                        TransitionContext.ATTR_DURATION, 1000);
                transitionContextOut
                        .setIntAttribute(TransitionContext.ATTR_KIND,
                                TransitionContext.KIND_OUT);

                engine.setTransition(null, screen,
                        UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
                engine.setTransition(screen, null,
                        UiEngineInstance.TRIGGER_POP, transitionContextOut);
                break;
            }

            synchronized (Application.getEventLock()) {
View Full Code Here

                checkboxField.setChecked(true);
                Dialog.alert("Please allow at least one direction");
            } else {
                // Set the acceptable directions and then force the app to check
                // if the screen requires a rotation.
                final UiEngineInstance ui = Ui.getUiEngineInstance();
                ui.setAcceptableDirections(acceptableDirections);
            }
        } else {
            if (field == _keyboardButton) {

                // Get this screen's instance of the virtual keyboard
View Full Code Here

TOP

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

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.