source: extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/MyCollapsiblePanel.java @ 9896

Last change on this file since 9896 was 9896, checked in by mlg, 13 years ago

Code cleaning + comments.

File size: 3.3 KB
Line 
1package fr.mael.jiwigo.ui;
2
3/*
4  * $Id: CollapsiblePaneDemo.java 1164 2009-11-03 04:22:00Z kschaefe $
5  *
6  * Copyright 2009 Sun Microsystems, Inc., 4150 Network Circle,
7  * Santa Clara, California 95054, U.S.A. All rights reserved.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22  */
23
24import java.awt.BorderLayout;
25
26import javax.swing.JPanel;
27import javax.swing.JSplitPane;
28import javax.swing.JTabbedPane;
29
30import fr.mael.jiwigo.ui.browser.BrowserPanel;
31
32/**
33   Copyright (c) 2010, Mael
34   All rights reserved.
35
36   Redistribution and use in source and binary forms, with or without
37   modification, are permitted provided that the following conditions are met:
38    * Redistributions of source code must retain the above copyright
39      notice, this list of conditions and the following disclaimer.
40    * Redistributions in binary form must reproduce the above copyright
41      notice, this list of conditions and the following disclaimer in the
42      documentation and/or other materials provided with the distribution.
43    * Neither the name of jiwigo nor the
44      names of its contributors may be used to endorse or promote products
45      derived from this software without specific prior written permission.
46
47   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
48   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
49   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
50   DISCLAIMED. IN NO EVENT SHALL Mael BE LIABLE FOR ANY
51   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
52   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
53   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
54   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
56   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57 *
58 * @author Karl George Schaefer
59 */
60@SuppressWarnings("serial")
61public class MyCollapsiblePanel extends JPanel {
62    private BrowserPanel browserFrame = BrowserPanel.getInstance();
63    private JSplitPane splitPane;
64
65    public MyCollapsiblePanel(JTabbedPane tabbedPane) {
66        setLayout(new BorderLayout());
67        splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
68        splitPane.setTopComponent(browserFrame);
69        splitPane.setBottomComponent(tabbedPane);
70        splitPane.setContinuousLayout(true);
71        splitPane.setResizeWeight(0.5);
72        add(splitPane, BorderLayout.CENTER);
73
74    }
75
76    @Override
77    public void revalidate() {
78        super.revalidate();
79    }
80
81}
Note: See TracBrowser for help on using the repository browser.