]> git.sesse.net Git - vlc/blob - bindings/java/org/videolan/jvlc/JVLCPanel.java
Copyright year moved from 2004 to 2006
[vlc] / bindings / java / org / videolan / jvlc / JVLCPanel.java
1 /*****************************************************************************
2  * JVLCPanel.java: Java Swing JPanel embedding VLC Video Output
3  *****************************************************************************
4  * Copyright (C) 1998-2006 the VideoLAN team
5  *
6  * $Id$
7  *
8  * Authors: Filippo Carone <filippo@carone.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 package org.videolan.jvlc;
26
27 import javax.swing.JPanel;
28
29 public class JVLCPanel extends JPanel {
30
31     private final JVLCCanvas jvcc;
32     
33     /**
34      * Default constructor. The initial size is 200x200
35      */
36     public JVLCPanel() {
37         jvcc = new JVLCCanvas();
38         add(jvcc);        
39     }
40     
41     /**
42      * @param width The width of the panel
43      * @param height The height of the panel
44      */
45     public JVLCPanel(int width, int height) {
46         jvcc = new JVLCCanvas(width, height);
47         add(jvcc);        
48     }
49     
50
51     public JVLC getJVLCObject() {
52         return jvcc.getJVLC();
53     }
54     
55     public void setSize(int width, int height) {
56         super.setSize(width, height);
57         jvcc.setSize(width, height);
58     }
59
60 }