Package com.sun.dtv.lwuit.animations

Examples of com.sun.dtv.lwuit.animations.Animation


            int topX = getWidth();
            int topY = getHeight();
            int bottomX = 0;
            int bottomY = 0;
            for (int iter = 0; iter < size; iter++) {
                Animation ani = paintQueueTemp[iter];
                paintQueueTemp[iter] = null;
                wrapper.translate(-wrapper.getTranslateX(), -wrapper.getTranslateY());
                wrapper.setClip(0, 0, getWidth(), getHeight());
                if (ani instanceof Component) {
                    Component cmp = (Component) ani;
                    System.out.println(cmp.getUIID() + " <- imprimido");
                    Rectangle dirty = cmp.getDirtyRegion();
                    //Rectangle dirty = new Rectangle(0, 0, cmp.getPreferredSize()) ;
                    if (dirty != null) {
                        System.out.println(cmp.getUIID() + " <- sujo");
                        wrapper.setClip(dirty.getX(), dirty.getY(), dirty.getSize().getWidth(), dirty.getSize().getHeight());
                        cmp.setDirtyRegion(null);
                    }

                    cmp.paintComponent(wrapper);
                    int cmpAbsX = cmp.getAbsoluteX() + cmp.getScrollX();
                    topX = Math.min(cmpAbsX, topX);
                    bottomX = Math.max(cmpAbsX + cmp.getWidth(), bottomX);
                    int cmpAbsY = cmp.getAbsoluteY() + cmp.getScrollY();
                    topY = Math.min(cmpAbsY, topY);
                    bottomY = Math.max(cmpAbsY + cmp.getHeight(), bottomY);
                } else {
                    bottomX = getWidth();
                    bottomY = getHeight();
                    topX = 0;
                    topY = 0;
                    ani.paint(wrapper);
                }
            }

            // disable flush graphics bug when media is playing to prevent the
            // double buffer
View Full Code Here


        }
    }

    private void paintTransitionAnimation() {
        Vector animationQueue = Display.getInstance().getAnimationQueue();
        Animation ani = (Animation) animationQueue.elementAt(0);
        if (!ani.animate()) {
            animationQueue.removeElementAt(0);
            if (ani instanceof Transition) {
                Form current = Display.getInstance().getCurrentInternal();
                Form source = (Form) ((Transition) ani).getSource();
                restoreMenu(source);
                Form f = (Form) ((Transition) ani).getDestination();
                restoreMenu(f);
                if (source == null || source == current || source == Display.getInstance().getCurrent()) {
                    Display.getInstance().setCurrentForm(f);
                }
                ((Transition) ani).cleanup();
                if (animationQueue.size() > 0) {
                    ani = (Animation) animationQueue.elementAt(0);
                    if (ani instanceof Transition) {
                        ((Transition) ani).initTransition();
                    }
                }
                return;
            }
        }
        ani.paint(wrapper);
        flushGraphics();

        if (transitionDelay > 0) {
            // yield for a fraction, some devices don't "properly" implement
            // flush and so require the painting thread to get CPU too.
View Full Code Here

        next.setParent(this);
        if (next instanceof Container) {
            ((Container) next).layoutContainer();
        }

        Animation anim = new Anim(this, current, next, t);

        // block events as long as the transition is animating
        Display.getInstance().blockEvents(true);

        // register the transition animation
View Full Code Here

        // prevent animations from playing with a popup
        if (animatableComponents != null) {
            // we don't save size() in a varible since the animate method may deregister
            // the animation thus invalidating the size
            for (int iter = 0; iter < animatableComponents.size(); iter++) {
                Animation c = (Animation) animatableComponents.elementAt(iter);
                if (c.animate()) {
                    if (c instanceof Component) {
                        Rectangle rect = ((Component) c).getDirtyRegion();
                        if (rect != null) {
                            ((Component) c).repaint(rect.getX(), rect.getY(), rect.getSize().getWidth(), rect.getSize().getHeight());
                        } else {
View Full Code Here

TOP

Related Classes of com.sun.dtv.lwuit.animations.Animation

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.