Statistics
| Revision:

root / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / gui / SelectServerControlsPanel.java @ 6980

History | View | Annotate | Download (4.39 KB)

1
package com.iver.cit.gvsig.publish.gui;
2

    
3
import java.awt.Dimension;
4
import java.awt.FlowLayout;
5
import java.awt.event.ActionEvent;
6
import java.awt.event.ActionListener;
7

    
8
import javax.swing.JPanel;
9

    
10
import org.gvsig.gui.beans.swing.JButton;
11

    
12
import com.iver.andami.PluginServices;
13
import com.iver.cit.gvsig.publish.Servers;
14
import com.iver.utiles.swing.jcomboServer.ServerData;
15

    
16
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
17
 *
18
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
19
 *
20
 * This program is free software; you can redistribute it and/or
21
 * modify it under the terms of the GNU General Public License
22
 * as published by the Free Software Foundation; either version 2
23
 * of the License, or (at your option) any later version.
24
 *
25
 * This program is distributed in the hope that it will be useful,
26
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
 * GNU General Public License for more details.
29
 *
30
 * You should have received a copy of the GNU General Public License
31
 * along with this program; if not, write to the Free Software
32
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
33
 *
34
 * For more information, contact:
35
 *
36
 *  Generalitat Valenciana
37
 *   Conselleria d'Infraestructures i Transport
38
 *   Av. Blasco Ib??ez, 50
39
 *   46010 VALENCIA
40
 *   SPAIN
41
 *
42
 *      +34 963862235
43
 *   gvsig@gva.es
44
 *      www.gvsig.gva.es
45
 *
46
 *    or
47
 *
48
 *   IVER T.I. S.A
49
 *   Salamanca 50
50
 *   46005 Valencia
51
 *   Spain
52
 *
53
 *   +34 963163400
54
 *   dac@iver.es
55
 */
56
/* CVS MESSAGES:
57
 *
58
 * $Id: SelectServerControlsPanel.java 6980 2006-09-03 14:31:00Z jorpiell $
59
 * $Log$
60
 * Revision 1.3  2006-09-03 14:31:00  jorpiell
61
 * Ahora se cargan todos los datos desde el fichero de configuraci?n. Se han a?adido algunos comentarios
62
 *
63
 * Revision 1.2  2006/09/01 13:40:59  jorpiell
64
 * Primer gran commit de la extension
65
 *
66
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
67
 * *** empty log message ***
68
 *
69
 *
70
 */
71
/**
72
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
73
 */
74
public class SelectServerControlsPanel extends JPanel {
75

    
76
        private SelectServerPanel controlsPanel = null;
77
        private JPanel buttonsPanel = null;
78
        private JButton nextButton = null;
79
        /**
80
         * This method initializes 
81
         * 
82
         */
83
        public SelectServerControlsPanel() {
84
                super();
85
                initialize();
86
        }
87

    
88
        /**
89
         * This method initializes this
90
         * 
91
         */
92
        private void initialize() {
93
        this.setLayout(new FlowLayout());
94
        this.setSize(new java.awt.Dimension(500,136));
95
        this.add(getControlsPanel(), null);
96
        this.add(getButtonsPanel(), null);
97
                        
98
        }
99

    
100
        /**
101
         * This method initializes controlsPanel        
102
         *         
103
         * @return javax.swing.JPanel        
104
         */
105
        private SelectServerPanel getControlsPanel() {
106
                if (controlsPanel == null) {
107
                        controlsPanel = new SelectServerPanel();
108
                }
109
                return controlsPanel;
110
        }
111

    
112
        /**
113
         * This method initializes buttonsPanel        
114
         *         
115
         * @return javax.swing.JPanel        
116
         */
117
        private JPanel getButtonsPanel() {
118
                if (buttonsPanel == null) {
119
                        FlowLayout flowLayout = new FlowLayout();
120
                        flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
121
                        buttonsPanel = new JPanel();
122
                        buttonsPanel.setPreferredSize(new java.awt.Dimension(500,30));
123
                        buttonsPanel.setLayout(flowLayout);
124
                        buttonsPanel.add(getNextButton(), null);
125
                }
126
                return buttonsPanel;
127
        }
128

    
129
        /**
130
         * This method initializes nextButton        
131
         *         
132
         * @return javax.swing.JButton        
133
         */
134
        private JButton getNextButton() {
135
                if (nextButton == null) {
136
                        nextButton = new JButton();
137
                        nextButton.setText(PluginServices.getText(this, "next"));
138
                        nextButton.setPreferredSize(new Dimension(100,20));
139
                        nextButton.setActionCommand("next");
140
                }
141
                return nextButton;
142
        }        
143
        
144
        public void setServers(Servers servers){
145
                getControlsPanel().setServers(servers);        
146
        }
147
        
148
        public void setServersList(ServerData[] servers){
149
                getControlsPanel().setServersList(servers);
150
        }
151
        
152
        public void addButtonsListener(ActionListener listener){
153
                getNextButton().addActionListener(listener);
154
        }        
155
        
156
        public String getSelectedBrand(){
157
                return getControlsPanel().getServerBrand();
158
        }
159
        
160
        public String getSelectedType(){
161
                return getControlsPanel().getServerType();
162
        }
163
        
164
        public String getServerURL(){
165
                return getControlsPanel().getServerURL();
166
        }
167
        
168
        public String getServerPath(){
169
                return getControlsPanel().getServerPath();
170
        }
171
        
172
        /**
173
         * @return Returns the currentServer.
174
         */
175
        public ServerData getCurrentServer() {
176
                return getControlsPanel().getCurrentServer();
177
        }
178

    
179
}  //  @jve:decl-index=0:visual-constraint="10,10"