Statistics
| Revision:

gvsig-projects-pool / org.gvsig.winmgr / trunk / org.gvsig.winmgr.app / org.gvsig.winmgr.app.mainplugin / src / main / java / org / gvsig / coreplugin / mdiManager / ComplexDesktopPane.java @ 682

History | View | Annotate | Download (2.49 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.coreplugin.mdiManager;
25

    
26
import javax.swing.JPanel;
27

    
28

    
29
import javax.swing.JSplitPane;
30
import java.awt.BorderLayout;
31
import javax.swing.JDesktopPane;
32

    
33
import org.gvsig.utils.console.JConsole;
34
public class ComplexDesktopPane extends JPanel {
35

    
36
        private JSplitPane jSplitPane = null;
37
        private JDesktopPane jDesktopPane = null;
38
        private JConsole jConsole = null;
39
        /**
40
         * This is the default constructor
41
         */
42
        public ComplexDesktopPane() {
43
                super();
44
                initialize();
45
        }
46
        /**
47
         * This method initializes this
48
         * 
49
         * @return void
50
         */
51
        private  void initialize() {
52
                this.setLayout(new BorderLayout());
53
                this.setSize(300,200);
54
                this.add(getJSplitPane(), java.awt.BorderLayout.CENTER);
55
        }
56
        /**
57
         * This method initializes jSplitPane        
58
         *         
59
         * @return javax.swing.JSplitPane        
60
         */    
61
        private JSplitPane getJSplitPane() {
62
                if (jSplitPane == null) {
63
                        jSplitPane = new JSplitPane();
64
                        jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
65
                        jSplitPane.setResizeWeight(0.8);
66
                        jSplitPane.setTopComponent(getDesktopPane());
67
                        jSplitPane.setBottomComponent(getJConsole());
68
                }
69
                return jSplitPane;
70
        }
71
        /**
72
         * This method initializes jDesktopPane        
73
         *         
74
         * @return javax.swing.JDesktopPane        
75
         */    
76
        public JDesktopPane getDesktopPane() {
77
                if (jDesktopPane == null) {
78
                        jDesktopPane = new JDesktopPane();
79
                }
80
                return jDesktopPane;
81
        }
82
        /**
83
         * This method initializes jConsole        
84
         *         
85
         * @return com.iver.utiles.console.JConsole        
86
         */    
87
        private JConsole getJConsole() {
88
                if (jConsole == null) {
89
                        jConsole = new JConsole();
90
                }
91
                return jConsole;
92
        }
93
   }