Statistics
| Revision:

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

History | View | Annotate | Download (4.1 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 6977 2006-09-01 13:40:59Z jorpiell $
59
 * $Log$
60
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
61
 * Primer gran commit de la extension
62
 *
63
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
64
 * *** empty log message ***
65
 *
66
 *
67
 */
68
/**
69
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
70
 */
71
public class SelectServerControlsPanel extends JPanel {
72

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

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

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

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

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

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