Statistics
| Revision:

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

History | View | Annotate | Download (3.19 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 6977 2006-09-01 13:40:59Z jorpiell $
58
 * $Log$
59
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
60
 * Primer gran commit de la extension
61
 *
62
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
63
 * *** empty log message ***
64
 *
65
 *
66
 */
67
/**
68
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
69
 */
70
public class SelectServerWindow extends SelectServerControlsPanel implements IWindow {
71
        WindowInfo mWindowInfo = null;
72
        Servers servers = null;
73
        
74
        public SelectServerWindow(){
75
                super();
76
                this.servers = new Servers();
77
                addButtonsListener(new SelectServerWindowListener(this));
78
                initialize();
79
        }
80
        
81
        /**
82
         * Initializes the panel
83
         */
84
        private void initialize(){
85
                setServers(servers);
86
                loadServers();
87
        }
88

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

    
115
        /**
116
         * @return Returns the servers.
117
         */
118
        public Class getNextPanel() {
119
                return servers.getGenericServer(getSelectedBrand()).
120
                        getJPanel(getSelectedType());
121
        }
122

    
123
}