Package java.awt

Examples of java.awt.Canvas


            instance = libvlc.libvlc_new(1, new String[] {"--vout=macosx"});
        }

        mediaPlayer = libvlc.libvlc_media_player_new(instance);

        Canvas canvas = new Canvas();
        canvas.setBackground(Color.black);

        f = new JFrame("Bare Bones Test");
        f.setLayout(new BorderLayout());
        f.add(canvas, BorderLayout.CENTER);
        f.addWindowListener(new WindowAdapter() {
View Full Code Here


    private final Canvas videoSurface;

    public PlayerInstance(EmbeddedMediaPlayer mediaPlayer) {
        this.mediaPlayer = mediaPlayer;
        this.videoSurface = new Canvas();
        this.videoSurface.setBackground(Color.black);

        mediaPlayer.addMediaPlayerEventListener(this);
    }
View Full Code Here

        System.out.println("Streaming '" + media + "' to '" + options + "'");

        MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory(args);
        EmbeddedMediaPlayer mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();

        Canvas canvas = new Canvas();
        canvas.setBackground(Color.black);
        CanvasVideoSurface videoSurface = mediaPlayerFactory.newVideoSurface(canvas);
        mediaPlayer.setVideoSurface(videoSurface);

        JFrame f = new JFrame("vlcj duplicate output test");
        f.setIconImage(new ImageIcon(StreamRtpDuplicate.class.getResource("/icons/vlcj-logo.png")).getImage());
View Full Code Here

public class TestMediaListEmbeddedPlayer extends VlcjTest {

    public static void main(String[] args) throws Exception {
        MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory();

        Canvas canvas = new Canvas();
        canvas.setBackground(Color.black);
        CanvasVideoSurface videoSurface = mediaPlayerFactory.newVideoSurface(canvas);

        EmbeddedMediaPlayer mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
        mediaPlayer.setVideoSurface(videoSurface);
View Full Code Here

            }
        });
    }

    public FullScreenTest(String[] args) {
        Canvas c = new Canvas();
        c.setBackground(Color.black);

        JPanel p = new JPanel();
        p.setLayout(new BorderLayout());
        p.add(c, BorderLayout.CENTER);
View Full Code Here

        Panel p = new Panel();
        p.setBackground(Color.orange); // The label "transparent" background will actually get this
                                       // background colour
        p.setLayout(null);

        c = new Canvas();
        c.setBackground(Color.black);
        c.setBounds(0, 0, 1000, 900);

        o1 = new Canvas();
        o1.setBackground(Color.green);
        o1.setBounds(100, 60, 200, 300);

        o2 = new Canvas();
        o2.setBackground(Color.red);
        o2.setBounds(400, 200, 150, 150);

        o3 = new Canvas();
        o3.setBackground(Color.blue);
        o3.setBounds(50, 500, 200, 200);

        o4 = new Label("I am a label");
        o4.setForeground(Color.red);
View Full Code Here

     * The default implementation simply returns an ordinary Canvas with a black background.
     *
     * @return video surface component
     */
    protected Canvas onGetCanvas() {
        Canvas canvas = new Canvas();
        canvas.setBackground(Color.black);
        return canvas;
    }
View Full Code Here

        });
    }

    @SuppressWarnings("serial")
    public ExclusiveFullScreenTest(String[] args) {
        Canvas c = new Canvas();
        c.setBackground(Color.red);

        JPanel p = new JPanel();
        p.setLayout(new BorderLayout());
        p.add(c, BorderLayout.CENTER);
View Full Code Here

        mediaPlayerFactory = new MediaPlayerFactory();
        mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
        mediaPlayer.setPlaySubItems(true);

        canvas = new Canvas();
        canvas.setBackground(Color.black);

        videoSurface = mediaPlayerFactory.newVideoSurface(canvas);
        mediaPlayer.setVideoSurface(videoSurface);
View Full Code Here

        this.mrl = mrl;

        factory = new MediaPlayerFactory();
        mediaPlayer = factory.newEmbeddedMediaPlayer();

        canvas = new Canvas();
        canvas.setBackground(Color.black);

        controlsPane = new JPanel();
        controlsPane.setBorder(new EmptyBorder(8, 8, 8, 8));
        controlsPane.setLayout(new BoxLayout(controlsPane, BoxLayout.X_AXIS));
View Full Code Here

TOP

Related Classes of java.awt.Canvas

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.