Package java.awt

Examples of java.awt.Canvas$CanvasFlipBufferStrategy


    }

    private int currentIndex = 0;

    public FullScreenMultiMediaTest(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


            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        f.setLayout(new BorderLayout());
        Canvas vs = new Canvas();
        f.add(vs, BorderLayout.CENTER);
        f.setVisible(true);

        MediaPlayerFactory factory = new MediaPlayerFactory();
View Full Code Here

        ip.add(urlTextField);
        ip.add(playButton);

        cp.add(ip, BorderLayout.NORTH);

        Canvas vs = new Canvas();
        vs.setBackground(Color.black);
        cp.add(vs, BorderLayout.CENTER);

        mainFrame.add(cp, BorderLayout.CENTER);

        urlTextField.addActionListener(new ActionListener() {
View Full Code Here

        aglMediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
        nsobjectMediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
        nsviewMediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();
        xwindowMediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer();

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

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

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

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

        aglVideoSurface = new CanvasVideoSurface(aglCanvas, new VideoSurfaceAdapter() {
            @Override
            public void attach(LibVlc libvlc, MediaPlayer mediaPlayer, long componentId) {
View Full Code Here

        contentPane.add(sourceControls, BorderLayout.NORTH);

        videoPanel = new JPanel();
        videoPanel.setLayout(new GridLayout(1, 2, 16, 0));

        localCanvas = new Canvas();
        localCanvas.setBackground(Color.black);
        localCanvas.setSize(320, 180);

        localStreamControls = new JPanel();
        localStreamControls.setLayout(new BoxLayout(localStreamControls, BoxLayout.X_AXIS));

        localStreamControls.add(Box.createHorizontalStrut(4));

        streamToLabel = new JLabel("Stream To:");
        streamToLabel.setDisplayedMnemonicIndex(7);
        localStreamControls.add(streamToLabel);

        streamToTextField = new JTextField();
        streamToTextField.setFocusAccelerator('t');
        streamToTextField.setColumns(12);
        localStreamControls.add(streamToTextField);

        sendButton = new JButton("Send");
        sendButton.setMnemonic('s');
        localStreamControls.add(sendButton);

        sendSnapshotButton = new JButton("Snap");
        sendSnapshotButton.setMnemonic('n');
        localStreamControls.add(sendSnapshotButton);

        localVideoSurface = mediaPlayerFactory.newVideoSurface(localCanvas);
        localMediaPlayer.setVideoSurface(localVideoSurface);

        localPanel = new JPanel();
        localPanel.setBorder(new TitledBorder("Local"));
        localPanel.setLayout(new BorderLayout(0, 8));
        localPanel.add(localCanvas, BorderLayout.CENTER);
        localPanel.add(localStreamControls, BorderLayout.SOUTH);

        remoteCanvas = new Canvas();
        remoteCanvas.setBackground(Color.black);
        remoteCanvas.setSize(320, 180);

        remoteStreamControls = new JPanel();
        remoteStreamControls.setLayout(new BoxLayout(remoteStreamControls, BoxLayout.X_AXIS));
View Full Code Here

            }
        });
    }

    public TestPlayer(String[] args) {
        videoSurface = new Canvas();

        videoSurface.setBackground(Color.black);
        videoSurface.setSize(800, 600); // Only for initial layout

        // Since we're mixing lightweight Swing components and heavyweight AWT
View Full Code Here

            }
        });
    }

    public SwapTest() {
        previewCanvas = new Canvas();
        previewCanvas.setBackground(Color.black);
        previewCanvas.setPreferredSize(new Dimension(400, 250));

        mainCanvas = new Canvas();
        mainCanvas.setBackground(Color.black);
        mainCanvas.setPreferredSize(new Dimension(800, 500));

        showMainButton = new JButton("Main");
        showMainButton.setMnemonic('m');
View Full Code Here

        videoPane = new JPanel();
        videoPane.setBorder(new CompoundBorder(new LineBorder(Color.black, 2), new EmptyBorder(16, 16, 16, 16)));
        videoPane.setLayout(new BorderLayout());
        videoPane.setBackground(Color.white);

        videoCanvas = new Canvas();
        videoCanvas.setBackground(Color.red);
        videoCanvas.setSize(720, 350);

        videoPane.add(videoCanvas, BorderLayout.CENTER);
View Full Code Here

        videoPane = new JPanel();
        videoPane.setBorder(new CompoundBorder(new LineBorder(Color.black, 2), new EmptyBorder(16, 16, 16, 16)));
        videoPane.setLayout(new BorderLayout());
        videoPane.setBackground(Color.white);

        videoCanvas = new Canvas();
        videoCanvas.setBackground(Color.red);
        videoCanvas.setSize(720, 350);

        videoPane.add(videoCanvas, BorderLayout.CENTER);
View Full Code Here

                System.exit(0);
            }
        });

        f.setLayout(new BorderLayout());
        Canvas vs = new Canvas();
        f.add(vs, BorderLayout.CENTER);
        f.setVisible(true);

        MediaPlayerFactory factory = new MediaPlayerFactory();
View Full Code Here

TOP

Related Classes of java.awt.Canvas$CanvasFlipBufferStrategy

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.