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