Package pivot.wtk

Examples of pivot.wtk.MovieView


public class Demo implements Application {
    private Window window;
    private Clock clock = new Clock();

    public void startup(Display display, Dictionary<String, String> properties) {
        window = new Window(new MovieView(clock));
        window.setMaximized(true);
        window.open(display);
        clock.play();
    }
View Full Code Here


    };

    public void install(Component component) {
        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

            movie.getMovieListeners().add(movieListener);
        }
    }

    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

        super.uninstall();
    }

    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

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

    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

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

    @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

            new Dimensions(Math.round(movie.getWidth() * scale),
            Math.round(movie.getHeight() * scale));
    }

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

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

View Full Code Here

            }
        }
    }

    public void paint(Graphics2D graphics) {
        MovieView movieView = (MovieView)getComponent();
        Movie movie = movieView.getMovie();

        int width = getWidth();
        int height = getHeight();

        if (backgroundColor != null) {
View Full Code Here

TOP

Related Classes of pivot.wtk.MovieView

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.