Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.installer / org.gvsig.installer.swing / org.gvsig.installer.swing.impl / src / main / java / org / gvsig / installer / swing / impl / creation / panel / AdvancedModeSelectionPanel.java @ 37590

History | View | Annotate | Download (2.98 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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 2
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
 */
22

    
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2010 {Prodevelop}   {Task}
26
 */
27

    
28
package org.gvsig.installer.swing.impl.creation.panel;
29

    
30
import java.awt.BorderLayout;
31

    
32
import javax.swing.BorderFactory;
33
import javax.swing.JCheckBox;
34
import javax.swing.JPanel;
35
import javax.swing.JScrollPane;
36
import javax.swing.JTextArea;
37

    
38
import org.gvsig.installer.swing.api.SwingInstallerLocator;
39
import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
40

    
41
/**
42
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
43
 */
44
public class AdvancedModeSelectionPanel extends JPanel {
45

    
46
        /**
47
     * 
48
     */
49
        private static final long serialVersionUID = -4336979089415520761L;
50
        protected DefaultSwingInstallerManager swingInstallerManager = null;
51
        private JCheckBox advancedModeCheckBox;
52

    
53
        private JScrollPane advancedModeScrollPane;
54
        private JTextArea advancedModeTextArea;
55

    
56
        public AdvancedModeSelectionPanel() {
57
                super();
58
                swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
59
                                .getSwingInstallerManager();
60
                initComponents();
61
                initLabels();
62
        }
63

    
64
        private void initLabels() {
65
                advancedModeTextArea.setText(swingInstallerManager
66
                                .getText("advanced_mode"));
67
        }
68

    
69
        private void initComponents() {
70
                advancedModeCheckBox = new JCheckBox();
71
                advancedModeScrollPane = new JScrollPane();
72
                advancedModeTextArea = new JTextArea();
73

    
74
                setLayout(new java.awt.BorderLayout());
75

    
76
                advancedModeCheckBox.setText(swingInstallerManager
77
                                .getText("enable_advanced_mode"));
78
                add(advancedModeCheckBox, BorderLayout.NORTH);
79

    
80
                advancedModeScrollPane.setBorder(BorderFactory.createEmptyBorder(5, 5,
81
                                5, 5));
82

    
83
                advancedModeTextArea.setBackground(this.getBackground());
84
                advancedModeTextArea.setColumns(20);
85
                advancedModeTextArea.setLineWrap(true);
86
                advancedModeTextArea.setRows(5);
87
                advancedModeTextArea.setBorder(BorderFactory.createEmptyBorder(1, 1, 1,
88
                                1));
89
                advancedModeScrollPane.setViewportView(advancedModeTextArea);
90

    
91
                add(advancedModeScrollPane, BorderLayout.CENTER);
92
        }
93

    
94
        /**
95
         * @return the advancedMode
96
         */
97
        public boolean isAdvancedModeSelected() {
98
                return advancedModeCheckBox.isSelected();
99
        }
100
}