Statistics
| Revision:

root / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / gui / SelectServerWindow.java @ 8969

History | View | Annotate | Download (3.66 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 8969 2006-11-22 15:57:03Z jorpiell $
58
 * $Log$
59
 * Revision 1.6  2006-11-22 15:57:03  jorpiell
60
 * Se ha ajustado el interfaz de usuario
61
 *
62
 * Revision 1.5  2006/11/17 13:43:45  jorpiell
63
 * A?adido el nuevo panel donde se muestran las capas
64
 *
65
 * Revision 1.4  2006/09/11 07:57:29  jorpiell
66
 * Las ventanas ten?an los nombres incorrectos
67
 *
68
 * Revision 1.3  2006/09/03 14:31:00  jorpiell
69
 * Ahora se cargan todos los datos desde el fichero de configuraci?n. Se han a?adido algunos comentarios
70
 *
71
 * Revision 1.2  2006/09/01 13:40:59  jorpiell
72
 * Primer gran commit de la extension
73
 *
74
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
75
 * *** empty log message ***
76
 *
77
 *
78
 */
79
/**
80
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
81
 */
82
public class SelectServerWindow extends SelectServerControlsPanel implements IWindow {
83
        WindowInfo mWindowInfo = null;
84
        Servers servers = null;
85
        
86
        public SelectServerWindow(){
87
                super();
88
                this.servers = new Servers();
89
                addButtonsListener(new SelectServerWindowListener(null,null,this));
90
                initialize();
91
        }
92
        
93
        /**
94
         * Initializes the panel
95
         */
96
        private void initialize(){
97
                setServers(servers);
98
                loadServers();
99
        }
100

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

    
127
        /**
128
         * @return Returns the servers.
129
         */
130
        public Class getNextPanel() {
131
                return servers.getGenericServer(getSelectedBrand()).
132
                        getJPanel(getSelectedType());
133
        }
134

    
135
}