Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / gui / SelectServerWindow.java @ 7170

History | View | Annotate | Download (3.46 KB)

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

    
3
import javax.swing.JPanel;
4

    
5
import com.iver.andami.PluginServices;
6
import com.iver.andami.persistence.serverData.ServerDataPersistence;
7
import com.iver.andami.ui.mdiManager.IWindow;
8
import com.iver.andami.ui.mdiManager.WindowInfo;
9
import com.iver.cit.gvsig.publish.Servers;
10
import com.iver.cit.gvsig.publish.gui.listeners.SelectServerWindowListener;
11
import com.iver.utiles.NotExistInXMLEntity;
12
import com.iver.utiles.XMLEntity;
13
import com.iver.utiles.swing.jcomboServer.ServerData;
14

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

    
95
        
96
        /**
97
         * Load the servers saved in plugins-persistence
98
         */
99
        private void loadServers(){
100
                ServerDataPersistence persistence = new ServerDataPersistence(this,ServerData.SERVER_TYPE_WMS);
101
                ServerData[] servers = persistence.getArrayOfServerData();
102
                if (servers.length > 0){
103
                        setServersList(servers);
104
                }
105
        }
106
        
107
        /*
108
         *  (non-Javadoc)
109
         * @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo()
110
         */
111
        public WindowInfo getWindowInfo() {
112
                if (mWindowInfo == null){
113
                        mWindowInfo=new WindowInfo(WindowInfo.MODELESSDIALOG);
114
                        mWindowInfo.setTitle(PluginServices.getText(this,"select_server_type"));
115
                        mWindowInfo.setHeight(180);
116
                        mWindowInfo.setWidth(510);
117
        }
118
        return mWindowInfo;
119
        }
120

    
121
        /**
122
         * @return Returns the servers.
123
         */
124
        public Class getNextPanel() {
125
                return servers.getGenericServer(getSelectedBrand()).
126
                        getJPanel(getSelectedType());
127
        }
128

    
129
}