Statistics
| Revision:

gvsig-raster / org.gvsig.raster.app / trunk / org.gvsig.raster.app / org.gvsig.raster.app.wmtsclient / src / main / java / org / gvsig / raster / app / extension / wmtsclient / gui / panel / main / NextPrevPanel.java @ 218

History | View | Annotate | Download (3.87 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
package org.gvsig.raster.app.extension.wmtsclient.gui.panel.main;
23

    
24
import java.awt.GridBagConstraints;
25
import java.awt.GridBagLayout;
26

    
27
import javax.swing.JButton;
28
import javax.swing.JLabel;
29
import javax.swing.JPanel;
30

    
31
import org.gvsig.andami.PluginServices;
32

    
33
/**
34
 * Panel with the next and previous buttons
35
 * @author Nacho Brodin (nachobrodin@gmail.com)
36
 */
37
public class NextPrevPanel extends JPanel {
38
        private static final long             serialVersionUID   = 1L;
39
        private JButton                       btnSiguiente       = null;
40
        private JButton                       btnAnterior        = null;
41
        protected JLabel                      lblServerType      = null;
42
        protected JLabel                      lblServerTypeValue = null;
43
        
44
        public NextPrevPanel() {
45
                init();
46
        }
47
        
48
        public void init() {
49
                setLayout(new GridBagLayout());
50
                
51
                GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
52
                gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
53
                gridBagConstraints1.anchor = GridBagConstraints.WEST;
54
                gridBagConstraints1.gridx = 0;
55
                gridBagConstraints1.gridy = 0;
56
                gridBagConstraints1.weightx = 1.0;
57
                gridBagConstraints1.insets = new java.awt.Insets(2,2,2,2);
58
                add(getJLabelServerType(), gridBagConstraints1);
59
                
60
                gridBagConstraints1.gridx = 1;
61
                add(getJLabelServerTypeValue(), gridBagConstraints1);
62
                
63
                gridBagConstraints1.gridx = 2;
64
                gridBagConstraints1.anchor = GridBagConstraints.EAST;
65
                add(getBtnPrev(), gridBagConstraints1);
66
                
67
                gridBagConstraints1.gridx = 3;
68
                gridBagConstraints1.anchor = GridBagConstraints.EAST;
69
                add(getBtnNext(), gridBagConstraints1);
70
        }
71
        
72
        /**
73
         * This method initializes btnSiguiente
74
         *
75
         * @return javax.swing.JButton
76
         */
77
        public javax.swing.JButton getBtnNext() {
78
                if (btnSiguiente == null) {
79
                        btnSiguiente = new JButton();
80
                        btnSiguiente.setPreferredSize(new java.awt.Dimension(45, 20));
81
                        btnSiguiente.setText(PluginServices.getText(this, "siguiente"));
82
                }
83
                return btnSiguiente;
84
        }
85

    
86
        /**
87
         * This method initializes btnAnterior
88
         *
89
         * @return javax.swing.JButton
90
         */
91
        public javax.swing.JButton getBtnPrev() {
92
                if (btnAnterior == null) {
93
                        btnAnterior = new JButton();
94
                        btnAnterior.setPreferredSize(new java.awt.Dimension(45, 20));
95
                        btnAnterior.setText(PluginServices.getText(this, "anterior"));
96
                }
97
                return btnAnterior;
98
        }
99
        
100
        /**
101
         * This method initializes jLabelName
102
         *
103
         * @return javax.swing.JLabel
104
         */
105
        private javax.swing.JLabel getJLabelServerType() {
106
                if (lblServerType == null) {
107
                        lblServerType = new JLabel();
108
                        lblServerType.setFont(new java.awt.Font("Arial", java.awt.Font.PLAIN, 11));
109
                        lblServerType.setText(PluginServices.getText(this, "server_type")+":");
110
                }
111

    
112
                return lblServerType;
113
        }
114
        
115
        /**
116
         * This method initializes jLabelName
117
         *
118
         * @return javax.swing.JLabel
119
         */
120
        public javax.swing.JLabel getJLabelServerTypeValue() {
121
                if (lblServerTypeValue == null) {
122
                        lblServerTypeValue = new JLabel();
123
                        lblServerTypeValue.setFont(new java.awt.Font("Arial", java.awt.Font.BOLD, 11));
124
                        lblServerTypeValue.setText("-");
125
                }
126

    
127
                return lblServerTypeValue;
128
        }
129
        
130
}