Statistics
| Revision:

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

History | View | Annotate | Download (3.9 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.wmts.app.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
                gridBagConstraints1.weightx = 0;
66
                add(getBtnPrev(), gridBagConstraints1);
67
                
68
                gridBagConstraints1.gridx = 3;
69
                gridBagConstraints1.anchor = GridBagConstraints.EAST;
70
                add(getBtnNext(), gridBagConstraints1);
71
        }
72
        
73
        /**
74
         * This method initializes btnSiguiente
75
         *
76
         * @return javax.swing.JButton
77
         */
78
        public javax.swing.JButton getBtnNext() {
79
                if (btnSiguiente == null) {
80
                        btnSiguiente = new JButton();
81
                        btnSiguiente.setPreferredSize(new java.awt.Dimension(110, 20));
82
                        btnSiguiente.setText(PluginServices.getText(this, "siguiente"));
83
                }
84
                return btnSiguiente;
85
        }
86

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

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

    
128
                return lblServerTypeValue;
129
        }
130
        
131
}