Package org.apache.pivot.wtk.media

Examples of org.apache.pivot.wtk.media.Movie


        super.install(component);

        MovieView movieView = (MovieView)component;
        movieView.getMovieViewListeners().add(this);

        Movie movie = movieView.getMovie();
        if (movie != null) {
            movie.getMovieListeners().add(movieListener);
        }
    }
View Full Code Here


    }

    @Override
    public void uninstall() {
        MovieView movieView = (MovieView)getComponent();
        Movie movie = movieView.getMovie();
        if (movie != null) {
            movie.getMovieListeners().remove(movieListener);
        }

        movieView.getMovieViewListeners().remove(this);

        super.uninstall();
View Full Code Here

    }

    @Override
    public int getPreferredWidth(int height) {
        MovieView movieView = (MovieView)getComponent();
        Movie movie = movieView.getMovie();

        return (movie == null) ? 0 : Math.round(movie.getWidth() * scale);
    }
View Full Code Here

    }

    @Override
    public int getPreferredHeight(int width) {
        MovieView movieView = (MovieView)getComponent();
        Movie movie = movieView.getMovie();

        return (movie == null) ? 0 : Math.round(movie.getHeight() * scale);
    }
View Full Code Here

    }

    @Override
    public Dimensions getPreferredSize() {
        MovieView movieView = (MovieView)getComponent();
        Movie movie = movieView.getMovie();

        return (movie == null) ? new Dimensions(0, 0) :
            new Dimensions(Math.round(movie.getWidth() * scale),
            Math.round(movie.getHeight() * scale));
    }
View Full Code Here

    }

    @Override
    public void layout() {
        MovieView movieView = (MovieView)getComponent();
        Movie movie = movieView.getMovie();

        if (movie != null) {
            int width = getWidth();
            int height = getHeight();

            int movieWidth = movie.getWidth();
            int movieHeight = movie.getHeight();

            switch (horizontalAlignment) {
            case CENTER:
                movieX = (width - movieWidth) / 2;
                break;
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.media.Movie

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.