Revision 6977

View differences:

trunk/extensions/extPublish/src-test/com/iver/cit/gvsig/publish/gui/OptionsServerPanelMapserverTest.java
1
package com.iver.cit.gvsig.publish.gui;
2

  
3
import javax.swing.JFrame;
4

  
5
import com.iver.cit.gvsig.publish.servers.mapserver.ServiceWMSPanel;
6

  
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id$
50
 * $Log$
51
 * Revision 1.1  2006-09-01 13:40:59  jorpiell
52
 * Primer gran commit de la extension
53
 *
54
 *
55
 */
56
/**
57
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
58
 */
59
public class OptionsServerPanelMapserverTest {
60
	
61
	public static void main(String[] args) {
62
		JFrame f = new JFrame();
63
		f.getContentPane().add(new OptionsServerControlsPanel(ServiceWMSPanel.class));	    
64
		f.setBounds(100,100,515,225);
65
		f.setVisible(true);
66
	}
67
}
0 68

  
trunk/extensions/extPublish/config/text.properties
1 1
publish_layer_wms=Publicar vista en Servidor WMS
2 2
url=URL
3
serverName=Servidor
3
serverBrand=Servidor
4 4
serverType=Tipo servicio
5 5
server_path=Path
6
select_publish_server=Selecciona el tipo de servidor
6
accept=Aceptar
7
select_server_type=Selecciona el tipo de servidor
8
select_server_options=Selecciona las opciones del servidor
9
onlineResource=Onlineresource
10
shapePath=ShapePath
11
fonts=Fonts
12
symbols=Symbols
13
mapFile=MapFile
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/listeners/OptionsServerListener.java
1
package com.iver.cit.gvsig.publish.gui.listeners;
2

  
3
import java.awt.event.ActionEvent;
4
import java.awt.event.ActionListener;
5

  
6
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
7
 *
8
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
9
 *
10
 * This program is free software; you can redistribute it and/or
11
 * modify it under the terms of the GNU General Public License
12
 * as published by the Free Software Foundation; either version 2
13
 * of the License, or (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
23
 *
24
 * For more information, contact:
25
 *
26
 *  Generalitat Valenciana
27
 *   Conselleria d'Infraestructures i Transport
28
 *   Av. Blasco Ib??ez, 50
29
 *   46010 VALENCIA
30
 *   SPAIN
31
 *
32
 *      +34 963862235
33
 *   gvsig@gva.es
34
 *      www.gvsig.gva.es
35
 *
36
 *    or
37
 *
38
 *   IVER T.I. S.A
39
 *   Salamanca 50
40
 *   46005 Valencia
41
 *   Spain
42
 *
43
 *   +34 963163400
44
 *   dac@iver.es
45
 */
46
/* CVS MESSAGES:
47
 *
48
 * $Id$
49
 * $Log$
50
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
51
 * *** empty log message ***
52
 *
53
 *
54
 */
55
/**
56
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
57
 */
58
public class OptionsServerListener implements ActionListener{
59

  
60
	/*
61
	 *  (non-Javadoc)
62
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
63
	 */
64
	public void actionPerformed(ActionEvent e) {
65
		// TODO Auto-generated method stub
66
		
67
	}
68

  
69
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/listeners/OptionsServerWindowListener.java
1
package com.iver.cit.gvsig.publish.gui.listeners;
2

  
3
import java.awt.event.ActionEvent;
4
import java.awt.event.ActionListener;
5
import java.util.Properties;
6

  
7
import com.iver.andami.PluginServices;
8
import com.iver.andami.persistence.serverData.ServerDataPersistence;
9
import com.iver.cit.gvsig.publish.gui.OptionsServerWindow;
10
import com.iver.cit.gvsig.publish.gui.SelectServerWindow;
11
import com.iver.cit.gvsig.publish.servers.GenericServer;
12
import com.iver.utiles.swing.jcomboServer.ServerData;
13

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

  
79

  
80
	/*
81
	 *  (non-Javadoc)
82
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
83
	 */
84
	public void actionPerformed(ActionEvent e) {		
85
		if (e.getActionCommand().equals("last")){
86
			PluginServices.getMDIManager().addCentredWindow(selectServerWindow);
87
			PluginServices.getMDIManager().closeWindow(optionsServerWindow);
88
		}else if(e.getActionCommand().equals("accept")){
89
			PluginServices.getMDIManager().closeWindow(optionsServerWindow);
90
			saveServerOptions();
91
		}
92
	}
93
	
94
	/**
95
	 * Saves the current server and its potions in the
96
	 * plugins-persistence file
97
	 */
98
	private void saveServerOptions(){
99
		String url = selectServerWindow.getServerURL();
100
		String brand = selectServerWindow.getSelectedBrand();
101
		String type = selectServerWindow.getSelectedType();
102
		String serverPath = selectServerWindow.getServerPath();
103
		Properties props = optionsServerWindow.getServerProperties();
104
		props.put(GenericServer.GENERIC_SERVER_BRAND,brand);
105
		props.put(GenericServer.GENERIC_SERVER_PATH,serverPath);
106
		
107
		ServerData serverData = new ServerData(url,type);
108
		serverData.setProperies(props);
109
		ServerDataPersistence persistence = new ServerDataPersistence(this,ServerData.SERVER_TYPE_MULTIPLE);
110
		persistence.addServerData(serverData);
111
		persistence.setPersistent();
112
	}
113

  
114
}
0 115

  
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/listeners/SelectServerWindowListener.java
53 53
 *
54 54
 * $Id$
55 55
 * $Log$
56
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
56
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
57
 * Primer gran commit de la extension
58
 *
59
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
57 60
 * *** empty log message ***
58 61
 *
59 62
 *
......
75 78
	 */
76 79
	public void actionPerformed(ActionEvent e) {
77 80
		if (e.getActionCommand().equals("next")){
78
			PluginServices.getMDIManager().addCentredWindow(new OptionsServerWindow(mainWindow));
81
			Class clazz = mainWindow.getNextPanel();
82
			PluginServices.getMDIManager().addCentredWindow(new OptionsServerWindow(mainWindow,clazz));
79 83
			PluginServices.getMDIManager().closeWindow(mainWindow);
80 84
		}
81 85
	}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/OptionsServerWindow.java
1 1
package com.iver.cit.gvsig.publish.gui;
2 2

  
3
import java.awt.Dimension;
4

  
5
import javax.swing.JPanel;
6

  
3 7
import com.iver.andami.ui.mdiManager.IWindow;
4 8
import com.iver.andami.ui.mdiManager.WindowInfo;
5 9
import com.iver.cit.gvsig.fmap.core.gt2.factory.OptionalFactory;
10
import com.iver.cit.gvsig.publish.gui.listeners.OptionsServerWindowListener;
6 11

  
7 12
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8 13
 *
......
48 53
 *
49 54
 * $Id$
50 55
 * $Log$
51
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
56
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
57
 * Primer gran commit de la extension
58
 *
59
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
52 60
 * *** empty log message ***
53 61
 *
54 62
 *
......
60 68
	WindowInfo mWindowInfo = null;
61 69
	SelectServerWindow selectServerWindow = null;
62 70
	
63
	public OptionsServerWindow(SelectServerWindow selectServerWindow) {
71
	public OptionsServerWindow(SelectServerWindow selectServerWindow,Class controlsPanel) {
72
		super(controlsPanel);
64 73
		this.selectServerWindow = selectServerWindow;
65
		
74
		addButtonsListener(new OptionsServerWindowListener(selectServerWindow,this));
66 75
	}
67 76

  
68 77
	/*
......
72 81
	public WindowInfo getWindowInfo() {
73 82
		if (mWindowInfo == null){
74 83
			mWindowInfo=new WindowInfo(WindowInfo.MODELESSDIALOG);
75
			mWindowInfo.setTitle("select_publish_server");
76
			mWindowInfo.setHeight(117);
77
			mWindowInfo.setWidth(410);
78
        }
84
			mWindowInfo.setTitle("select_server_options");			
85
			Dimension dimension = getPreferredSize();
86
			mWindowInfo.setHeight(new Double(dimension.getHeight()).intValue());
87
			mWindowInfo.setWidth(new Double(dimension.getWidth()).intValue());
88
		}
79 89
        return mWindowInfo;
80
	}
90
	}	
81 91

  
92

  
82 93
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/SelectServerControlsPanel.java
2 2

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

  
7 8
import javax.swing.JPanel;
......
9 10
import org.gvsig.gui.beans.swing.JButton;
10 11

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

  
14 16
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
15 17
 *
......
55 57
 *
56 58
 * $Id$
57 59
 * $Log$
58
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
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
59 64
 * *** empty log message ***
60 65
 *
61 66
 *
......
83 88
	 */
84 89
	private void initialize() {
85 90
        this.setLayout(new FlowLayout());
86
        this.setSize(new java.awt.Dimension(405,136));
91
        this.setSize(new java.awt.Dimension(500,136));
87 92
        this.add(getControlsPanel(), null);
88 93
        this.add(getButtonsPanel(), null);
89 94
			
......
111 116
			FlowLayout flowLayout = new FlowLayout();
112 117
			flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
113 118
			buttonsPanel = new JPanel();
114
			buttonsPanel.setPreferredSize(new java.awt.Dimension(400,30));
119
			buttonsPanel.setPreferredSize(new java.awt.Dimension(500,30));
115 120
			buttonsPanel.setLayout(flowLayout);
116 121
			buttonsPanel.add(getNextButton(), null);
117 122
		}
......
131 136
			nextButton.setActionCommand("next");
132 137
		}
133 138
		return nextButton;
134
	}
139
	}	
135 140
	
136
	public void setServerBrands(String[] brands){
137
		for (int i=0 ; i<brands.length ; i++){
138
			getControlsPanel().getCmbServerName().addItem(brands[i]);
139
		}	
141
	public void setServers(Servers servers){
142
		getControlsPanel().setServers(servers);	
140 143
	}
141 144
	
142
	public void setServerTypes(String[] types){
143
		for (int i=0 ; i<types.length ; i++){
144
			getControlsPanel().getCmbServerType().addItem(types[i]);
145
		}	
146
	}
147
	
148 145
	public void setServersList(ServerData[] servers){
149
		getControlsPanel().getServerCombo().setServerList(servers);
146
		getControlsPanel().setServersList(servers);
150 147
	}
151 148
	
152 149
	public void addButtonsListener(ActionListener listener){
153 150
		getNextButton().addActionListener(listener);
151
	}	
152
	
153
	public String getSelectedBrand(){
154
		return getControlsPanel().getServerBrand();
154 155
	}
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
	
156 169

  
157 170
}  //  @jve:decl-index=0:visual-constraint="10,10"
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/SelectServerWindow.java
1 1
package com.iver.cit.gvsig.publish.gui;
2 2

  
3
import javax.swing.JPanel;
4

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

  
13 15
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14 16
 *
......
54 56
 *
55 57
 * $Id$
56 58
 * $Log$
57
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
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
58 63
 * *** empty log message ***
59 64
 *
60 65
 *
......
64 69
 */
65 70
public class SelectServerWindow extends SelectServerControlsPanel implements IWindow {
66 71
	WindowInfo mWindowInfo = null;
72
	Servers servers = null;
67 73
	
68 74
	public SelectServerWindow(){
69 75
		super();
76
		this.servers = new Servers();
70 77
		addButtonsListener(new SelectServerWindowListener(this));
71 78
		initialize();
72 79
	}
......
75 82
	 * Initializes the panel
76 83
	 */
77 84
	private void initialize(){
78
		fillCombos();
85
		setServers(servers);
79 86
		loadServers();
80 87
	}
88

  
81 89
	
82 90
	/**
83
	 * Fills all the static combos
84
	 *
85
	 */
86
	private void fillCombos(){
87
		String[] brands = Servers.getServerNames();
88
		setServerBrands(brands);
89
		String[] types = Servers.getServerTypes();
90
		setServerTypes(types);
91
		
92
	}
93
	
94
	/**
95 91
	 * Load the servers saved in plugins-persistence
96 92
	 */
97 93
	private void loadServers(){
98 94
		ServerDataPersistence persistence = new ServerDataPersistence(this,ServerData.SERVER_TYPE_WMS);
99
		ServerData[] servers = persistence.getArrayOfServerData_();
95
		ServerData[] servers = persistence.getArrayOfServerData();
100 96
		if (servers.length > 0){
101 97
			setServersList(servers);
102 98
		}
......
109 105
	public WindowInfo getWindowInfo() {
110 106
		if (mWindowInfo == null){
111 107
			mWindowInfo=new WindowInfo(WindowInfo.MODELESSDIALOG);
112
			mWindowInfo.setTitle("select_publish_server");
108
			mWindowInfo.setTitle("select_server_type");
113 109
			mWindowInfo.setHeight(117);
114
			mWindowInfo.setWidth(410);
110
			mWindowInfo.setWidth(510);
115 111
        }
116 112
        return mWindowInfo;
117 113
	}
118 114

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

  
119 123
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/OptionsServerControlsPanel.java
1 1
package com.iver.cit.gvsig.publish.gui;
2 2

  
3
import java.awt.Dimension;
3 4
import java.awt.FlowLayout;
5
import java.awt.event.ActionListener;
6
import java.lang.reflect.InvocationTargetException;
7
import java.util.Properties;
4 8

  
9
import javax.swing.JButton;
5 10
import javax.swing.JPanel;
6
import java.awt.CardLayout;
7
import java.awt.Dimension;
8
import java.awt.GridBagLayout;
9
import java.awt.GridBagConstraints;
10
import javax.swing.JButton;
11 11

  
12 12
import com.iver.andami.PluginServices;
13
import com.iver.cit.gvsig.publish.servers.ServicePanel;
14
import com.iver.cit.gvsig.publish.servers.mapserver.ServiceWMSPanel;
13 15

  
14 16
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
15 17
 *
......
55 57
 *
56 58
 * $Id$
57 59
 * $Log$
58
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
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
59 64
 * *** empty log message ***
60 65
 *
61 66
 *
......
64 69
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
65 70
 */
66 71
public class OptionsServerControlsPanel extends JPanel{
67

  
68
	private JPanel serverOptionsPanel = null;
72
	private ServicePanel serverOptionsPanel = null;
69 73
	private JPanel buttonsPanel = null;
70 74
	private JButton lastButton = null;
71 75
	private JButton acceptButton = null;
......
74 78
	 * This method initializes 
75 79
	 * 
76 80
	 */
77
	public OptionsServerControlsPanel() {
78
		super();
81
	public OptionsServerControlsPanel(Class controlsPanel) {
82
		super();	
83
		serverOptionsPanel = createControlsPanel(controlsPanel);
79 84
		initialize();
80 85
	}
86
	
87
	private ServicePanel createControlsPanel(Class clazz){
88
		Class [] args = {};
89
		Object [] params = {};
90
		try {
91
			ServicePanel panel = (ServicePanel)clazz.getConstructor(args).newInstance(params);
92
			panel.setPreferredSize(panel.getPreferredSize());
93
			panel.setSize(panel.getSize());
94
			return panel;
95
		} catch (IllegalArgumentException e) {
96
			// TODO Auto-generated catch block
97
			e.printStackTrace();
98
		} catch (SecurityException e) {
99
			// TODO Auto-generated catch block
100
			e.printStackTrace();
101
		} catch (InstantiationException e) {
102
			// TODO Auto-generated catch block
103
			e.printStackTrace();
104
		} catch (IllegalAccessException e) {
105
			// TODO Auto-generated catch block
106
			e.printStackTrace();
107
		} catch (InvocationTargetException e) {
108
			// TODO Auto-generated catch block
109
			e.printStackTrace();
110
		} catch (NoSuchMethodException e) {
111
			// TODO Auto-generated catch block
112
			e.printStackTrace();
113
		}
114
		return null;
115
	}
81 116

  
82 117
	/**
83 118
	 * This method initializes this
84 119
	 * 
85 120
	 */
86 121
	private void initialize() {
87
        this.setLayout(new FlowLayout());
122
        this.setLayout(new FlowLayout()); 
123
        this.setPreferredSize(calculateDimension());
88 124
        this.add(getServerOptionsPanel(), null);
89 125
        this.add(getButtonsPanel(), null);
90
			
91 126
	}
127
	
128
	private Dimension calculateDimension(){
129
		Dimension dimension = new Dimension();
130
		double width = getServerOptionsPanel().getPreferredSize().getWidth() + 20;
131
		double height = getServerOptionsPanel().getPreferredSize().getHeight() + 30;
132
		dimension.setSize(width,height);
133
		return dimension;
134
	}
92 135

  
93 136
	/**
94 137
	 * This method initializes serverOptionsPanel	
95 138
	 * 	
96 139
	 * @return javax.swing.JPanel	
97 140
	 */
98
	private JPanel getServerOptionsPanel() {
141
	private ServicePanel getServerOptionsPanel() {
99 142
		if (serverOptionsPanel == null) {
100
			serverOptionsPanel = new JPanel();
101
			serverOptionsPanel.setName("serverOptionsPanel");
143
			serverOptionsPanel = new ServiceWMSPanel();
144
			serverOptionsPanel.setPreferredSize(new Dimension(500,20));
145
			serverOptionsPanel.setName("serverOptionsPanel");			
102 146
		}
103 147
		return serverOptionsPanel;
104 148
	}
......
113 157
			FlowLayout flowLayout = new FlowLayout();
114 158
			flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
115 159
			buttonsPanel = new JPanel();
116
			buttonsPanel.setPreferredSize(new java.awt.Dimension(400,30));
160
			buttonsPanel.setPreferredSize(new java.awt.Dimension(500,30));
117 161
			buttonsPanel.setName("buttonsPanel");
118 162
			buttonsPanel.setLayout(flowLayout);			
119 163
			buttonsPanel.add(getLastButton(), null);
......
151 195
		}
152 196
		return acceptButton;
153 197
	}
198
	
199
	public void addButtonsListener(ActionListener listener){
200
		getLastButton().addActionListener(listener);
201
		getAcceptButton().addActionListener(listener);
202
	}	
203
	
204
	public Properties getServerProperties(){
205
		return serverOptionsPanel.getProperties();
206
	}
154 207

  
155 208
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/gui/SelectServerPanel.java
10 10

  
11 11
import com.iver.andami.PluginServices;
12 12
import com.iver.andami.persistence.serverData.ServerDataPersistence;
13
import com.iver.cit.gvsig.publish.Servers;
14
import com.iver.cit.gvsig.publish.servers.GenericServer;
13 15
import com.iver.utiles.NotExistInXMLEntity;
14 16
import com.iver.utiles.XMLEntity;
15 17
import com.iver.utiles.swing.jcomboServer.JComboServer;
16 18
import com.iver.utiles.swing.jcomboServer.ServerData;
19
import com.sun.corba.se.ActivationIDL.Server;
20

  
17 21
import javax.swing.JLabel;
18 22
import javax.swing.JTextField;
19 23
import java.awt.FlowLayout;
24
import java.awt.event.ActionEvent;
25
import java.awt.event.ActionListener;
26
import java.util.Iterator;
27
import java.util.Set;
20 28

  
21 29
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
22 30
 *
......
62 70
 *
63 71
 * $Id$
64 72
 * $Log$
65
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
73
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
74
 * Primer gran commit de la extension
75
 *
76
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
66 77
 * *** empty log message ***
67 78
 *
68 79
 *
......
75 86
	private JPanel serverNamePanel = null;
76 87
	private JPanel serverOptionsPanel = null;
77 88
	private JComboServer cmbServer = null;
78
	private JComboBox cmbServerName = null;
89
	private JComboBox cmbServerBrand = null;
79 90
	private JComboBox cmbServerType = null;
80 91
	private JLabel lbUrl = null;
81
	private JLabel lbServerName = null;
92
	private JLabel lbServerBrand = null;
82 93
	private JLabel lbServerType = null;
83 94
	private JPanel serverPathPanel = null;
84 95
	private JLabel lbPath = null;
85 96
	private JTextField tbPath = null;
97
	private Servers servers = null;
86 98

  
87 99
	/**
88 100
	 * This method initializes 
......
99 111
	 */
100 112
	private void initialize() {
101 113
        this.setLayout(new FlowLayout());
102
        this.setPreferredSize(new java.awt.Dimension(400,90));
103
        this.setSize(new java.awt.Dimension(400,90));
114
        this.setPreferredSize(new java.awt.Dimension(500,90));
115
        this.setSize(new java.awt.Dimension(500,82));
104 116
        this.add(getServerNamePanel(), null);
105 117
        this.add(getServerOptionsPanel(), null);
106 118
        this.add(getServerPathPanel(), null);
......
128 140
			lbUrl.setText(PluginServices.getText(this, "url"));
129 141
			serverNamePanel = new JPanel();
130 142
			serverNamePanel.setLayout(new GridBagLayout());
131
			serverNamePanel.setPreferredSize(new java.awt.Dimension(400,22));
132
			serverNamePanel.setSize(new java.awt.Dimension(400,22));
143
			serverNamePanel.setPreferredSize(new java.awt.Dimension(500,22));
144
			serverNamePanel.setSize(new java.awt.Dimension(500,22));
133 145
			serverNamePanel.add(lbUrl, gridBagConstraints2);
134 146
			serverNamePanel.add(getServerCombo(), gridBagConstraints3);
135 147
		}
......
144 156
	private JPanel getServerOptionsPanel() {
145 157
		if (serverOptionsPanel == null) {
146 158
			lbServerType = new JLabel();
147
			lbServerType.setText(PluginServices.getText(this, "serverName"));
159
			lbServerType.setText(PluginServices.getText(this, "serverType"));
148 160
			lbServerType.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
149
			lbServerName = new JLabel();
150
			lbServerName.setText(PluginServices.getText(this, "serverType"));
151
			lbServerName.setPreferredSize(new java.awt.Dimension(45,16));
161
			lbServerBrand = new JLabel();
162
			lbServerBrand.setText(PluginServices.getText(this, "serverBrand"));
163
			lbServerBrand.setPreferredSize(new java.awt.Dimension(45,16));
152 164
			GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
153 165
			gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL;
154 166
			gridBagConstraints7.gridx = 3;
......
159 171
			gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL;
160 172
			gridBagConstraints6.gridx = 2;
161 173
			gridBagConstraints6.gridy = 0;
162
			gridBagConstraints6.weightx = 1.0;
174
			gridBagConstraints6.weightx = 0.5;
163 175
			gridBagConstraints6.insets = new java.awt.Insets(5,5,5,5);
164 176
			GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
165 177
			gridBagConstraints5.fill = java.awt.GridBagConstraints.HORIZONTAL;
166 178
			gridBagConstraints5.gridx = 1;
167 179
			gridBagConstraints5.gridy = 0;
168 180
			gridBagConstraints5.insets = new java.awt.Insets(5,5,5,5);
169
			gridBagConstraints5.weightx = 1.0;			
181
			gridBagConstraints5.weightx = 3;			
170 182
			GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
171 183
			gridBagConstraints4.fill = java.awt.GridBagConstraints.HORIZONTAL;
172 184
			gridBagConstraints4.gridx = 0;
......
175 187
			gridBagConstraints4.weightx = 0.5;				
176 188
			serverOptionsPanel = new JPanel();
177 189
			serverOptionsPanel.setLayout(new GridBagLayout());
178
			serverOptionsPanel.setPreferredSize(new java.awt.Dimension(400,22));
179
			serverOptionsPanel.setSize(new java.awt.Dimension(400,22));
180
			serverOptionsPanel.add(lbServerName, gridBagConstraints4);
190
			serverOptionsPanel.setPreferredSize(new java.awt.Dimension(500,22));
191
			serverOptionsPanel.setSize(new java.awt.Dimension(500,22));
192
			serverOptionsPanel.add(lbServerBrand, gridBagConstraints4);
181 193
			serverOptionsPanel.add(getCmbServerName(), gridBagConstraints5);
182 194
			serverOptionsPanel.add(lbServerType, gridBagConstraints6);
183 195
			serverOptionsPanel.add(getCmbServerType(), gridBagConstraints7);
......
190 202
	 * 	
191 203
	 * @return javax.swing.JComboBox	
192 204
	 */
193
	protected JComboServer getServerCombo() {
205
	private JComboServer getServerCombo() {
194 206
		if (cmbServer == null) {
195 207
			cmbServer = new JComboServer();
196 208
			cmbServer.setModel(new DefaultComboBoxModel());
......
205 217
	 * 	
206 218
	 * @return javax.swing.JComboBox	
207 219
	 */
208
	protected JComboBox getCmbServerName() {
209
		if (cmbServerName == null) {
210
			cmbServerName = new JComboBox();
211
			cmbServerName.setModel(new DefaultComboBoxModel());
212
			cmbServerName.setPreferredSize(new java.awt.Dimension(295, 20));
220
	private JComboBox getCmbServerName() {
221
		if (cmbServerBrand == null) {
222
			cmbServerBrand = new JComboBox();
223
			cmbServerBrand.setModel(new DefaultComboBoxModel());
224
			cmbServerBrand.setPreferredSize(new java.awt.Dimension(295, 20));
225
			cmbServerBrand.addActionListener(new serverBrandChangeListener());
213 226
		}
214
		return cmbServerName;
227
		return cmbServerBrand;
215 228
	}
216 229

  
217 230
	/**
......
219 232
	 * 	
220 233
	 * @return javax.swing.JComboBox	
221 234
	 */
222
	protected JComboBox getCmbServerType() {
235
	private JComboBox getCmbServerType() {
223 236
		if (cmbServerType == null) {
224 237
			cmbServerType = new JComboBox();
225 238
			cmbServerType.setModel(new DefaultComboBoxModel());
......
249 262
			lbPath.setText(PluginServices.getText(this, "server_path"));
250 263
			serverPathPanel = new JPanel();
251 264
			serverPathPanel.setLayout(new GridBagLayout());
252
			serverPathPanel.setPreferredSize(new java.awt.Dimension(400,22));
265
			serverPathPanel.setPreferredSize(new java.awt.Dimension(500,22));
253 266
			serverPathPanel.add(lbPath, gridBagConstraints9);
254 267
			serverPathPanel.add(getTbPath(), gridBagConstraints10);
255 268
		}
......
268 281
		return tbPath;
269 282
	}
270 283
	
284
	/**
285
	 * Fills the combos
286
	 * @param servers
287
	 */
288
	public void setServers(Servers servers){
289
		this.servers = servers;
290
		Set brands = servers.getBrands();
291
		Iterator it = brands.iterator();
292
	    while (it.hasNext()) {
293
	    	getCmbServerName().addItem(it.next());
294
	    }		    
295
	}
296
	
297
	public String getServerBrand(){
298
		return (String)getCmbServerName().getSelectedItem();
299
	}
300
	
301
	public String getServerType(){
302
		return (String)getCmbServerType().getSelectedItem();
303
	}
304
	
305
	public String getServerURL(){
306
		return getServerCombo().getSelectedItem().toString();
307
	}
308
	
309
	public String getServerPath(){
310
		return getTbPath().getText();
311
	}
312
	
313
	public void setServersList(ServerData[] servers){
314
		getServerCombo().setServerList(servers);
315
		cmbServer.addActionListener(new serverUrlChangeListener());
316
	}
317
	
318
	private class serverBrandChangeListener implements ActionListener{
319
		public void actionPerformed(ActionEvent e) {
320
			getCmbServerType().removeAllItems();
321
			if (getCmbServerName().getModel().getSize() > 0){
322
		    	String genericServer = (String)getCmbServerName().
323
		    		getModel().getSelectedItem();
324
		    	Set services = servers.getGenericServer(genericServer).getServices();
325
		    	Iterator it = services.iterator();
326
			    while (it.hasNext()) {
327
			    	getCmbServerType().addItem(it.next());
328
			    }
329
		    }
330
		
331
		}
332
	}
333
	
334
	private class serverUrlChangeListener implements ActionListener{
335
		public void actionPerformed(ActionEvent e) {
336
			ServerData server = getServerCombo().getSelectedServer();
337
			if (server != null){
338
				if (servers.getGenericServer(server.getProperty(GenericServer.GENERIC_SERVER_BRAND)) != null){
339
					getCmbServerName().setSelectedItem(server.getProperty(GenericServer.GENERIC_SERVER_BRAND));
340
					if (servers.getGenericServer(server.getProperty(GenericServer.GENERIC_SERVER_BRAND))
341
							.getJPanel(server.getServiceType()) != null){
342
						getCmbServerType().setSelectedItem(server.getServiceType());
343
					}
344
				}				
345
				getTbPath().setText(server.getProperty(GenericServer.GENERIC_SERVER_PATH));
346
			}			
347
		}
348
	}
349
	
271 350
}  //  @jve:decl-index=0:visual-constraint="10,10"
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/Servers.java
1 1
package com.iver.cit.gvsig.publish;
2

  
3
import java.util.Set;
4
import java.util.TreeMap;
5

  
6
import com.iver.cit.gvsig.publish.servers.GenericServer;
7
import com.iver.cit.gvsig.publish.servers.geoserver.Geoserver;
8
import com.iver.cit.gvsig.publish.servers.mapserver.MapServer;
9
import com.iver.cit.gvsig.publish.servers.mapserver.ServiceWMSPanel;
10

  
2 11
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3 12
 *
4 13
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
......
43 52
 *
44 53
 * $Id$
45 54
 * $Log$
46
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
55
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
56
 * Primer gran commit de la extension
57
 *
58
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
47 59
 * *** empty log message ***
48 60
 *
49 61
 *
......
53 65
 */
54 66
public class Servers {
55 67
	public static final String SERVER_NAME_MAPSERVER = "Mapserver";
56
	public static final String SERVER_NAME_GEOSERVER = "Geserver";
68
	public static final String SERVER_NAME_GEOSERVER = "Geoserver";
57 69
	
58
	public static final String SERVER_TYPE_WFS = "WMS";
59
	public static final String SERVER_TYPE_WMS = "WFS";
70
	public static final String SERVER_TYPE_WFS = "WFS";
71
	public static final String SERVER_TYPE_WMS = "WMS";
60 72
	
61
	public static String[] getServerNames(){
62
		String[] names = new String[2];
63
		names[0] = SERVER_NAME_MAPSERVER;
64
		names[1] = SERVER_NAME_GEOSERVER;
65
		return names;
73
	public Servers(){
74
		addGenericServer(SERVER_NAME_MAPSERVER,new MapServer());
75
		addGenericServer(SERVER_NAME_GEOSERVER,new Geoserver());
66 76
	}
67 77
	
68
	public static String[] getServerTypes(){
69
		String[] types = new String[2];
70
		types[0] = SERVER_TYPE_WFS;
71
		types[1] = SERVER_TYPE_WMS;
72
		return types;
78
	private TreeMap genericServers = new TreeMap();
79
	
80
	public Set getBrands() {
81
		return genericServers.keySet();
73 82
	}
83
	/**
84
	 * Gets a specific JPanel for each server brand
85
	 * @return
86
	 */
87
	public GenericServer getGenericServer(String brand) {
88
		return (GenericServer) genericServers.get(brand);
89
	}
74 90
	
91
	protected void addGenericServer(String brand, GenericServer genericServer) {
92
		genericServers.put(brand, genericServer);
93
	}	
75 94
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/ServicePanel.java
1
package com.iver.cit.gvsig.publish.servers;
2

  
3
import java.util.Properties;
4

  
5
import javax.swing.JPanel;
6

  
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id$
50
 * $Log$
51
 * Revision 1.1  2006-09-01 13:40:59  jorpiell
52
 * Primer gran commit de la extension
53
 *
54
 *
55
 */
56
/**
57
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
58
 */
59
public abstract class ServicePanel extends JPanel {
60
	/**
61
	 * Gets the properties that will be written in the
62
	 * plugin-persistence file
63
	 * @return
64
	 */
65
	public abstract Properties getProperties();
66
}
0 67

  
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/geoserver/ServiceWFSPanel.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.2  2006-09-01 06:59:00  luisw2
46
 * Revision 1.3  2006-09-01 13:40:59  jorpiell
47
 * Primer gran commit de la extension
48
 *
49
 * Revision 1.2  2006/09/01 06:59:00  luisw2
47 50
 * Headers mofification
48 51
 *
49 52
 */
53
import java.util.Properties;
54

  
50 55
import javax.swing.JPanel;
51 56

  
52
public class ServiceWFSPanel extends JPanel {
57
import com.iver.cit.gvsig.publish.servers.ServicePanel;
53 58

  
59
public class ServiceWFSPanel extends ServicePanel {
60

  
61
	public Properties getProperties() {
62
		// TODO Auto-generated method stub
63
		return null;
64
	}
65

  
54 66
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/geoserver/Geoserver.java
1
package com.iver.cit.gvsig.publish.servers.geoserver;
2

  
3
import com.iver.cit.gvsig.publish.Servers;
4
import com.iver.cit.gvsig.publish.servers.GenericServer;
5
import com.iver.cit.gvsig.publish.servers.mapserver.ServiceWFSPanel;
6
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
7
 *
8
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
9
 *
10
 * This program is free software; you can redistribute it and/or
11
 * modify it under the terms of the GNU General Public License
12
 * as published by the Free Software Foundation; either version 2
13
 * of the License, or (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
23
 *
24
 * For more information, contact:
25
 *
26
 *  Generalitat Valenciana
27
 *   Conselleria d'Infraestructures i Transport
28
 *   Av. Blasco Ib??ez, 50
29
 *   46010 VALENCIA
30
 *   SPAIN
31
 *
32
 *      +34 963862235
33
 *   gvsig@gva.es
34
 *      www.gvsig.gva.es
35
 *
36
 *    or
37
 *
38
 *   IVER T.I. S.A
39
 *   Salamanca 50
40
 *   46005 Valencia
41
 *   Spain
42
 *
43
 *   +34 963163400
44
 *   dac@iver.es
45
 */
46
/* CVS MESSAGES:
47
 *
48
 * $Id$
49
 * $Log$
50
 * Revision 1.1  2006-09-01 13:40:59  jorpiell
51
 * Primer gran commit de la extension
52
 *
53
 *
54
 */
55
/**
56
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
57
 */
58
public class Geoserver extends GenericServer {
59
	public Geoserver() {
60
		addJPanel(Servers.SERVER_TYPE_WFS, ServiceWFSPanel.class);		
61
	}
62
	
63
	
64
}
0 65

  
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/GenericServer.java
49 49
 *
50 50
 * $Id$
51 51
 * $Log$
52
 * Revision 1.1  2006-08-31 19:19:04  jorpiell
52
 * Revision 1.2  2006-09-01 13:40:59  jorpiell
53
 * Primer gran commit de la extension
54
 *
55
 * Revision 1.1  2006/08/31 19:19:04  jorpiell
53 56
 * *** empty log message ***
54 57
 *
55 58
 *
......
57 60
/**
58 61
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
59 62
 */
60
public class GenericServer {
63
public abstract class GenericServer {
64
	public static final String GENERIC_SERVER_PATH = "serverPath";
65
	public static final String GENERIC_SERVER_BRAND = "brand";
66
	
61 67
	private TreeMap servicePanels = new TreeMap();
68
	
62 69
	public Set getServices() {
63 70
		return servicePanels.keySet();
64 71
	}
72
	
65 73
	/**
66 74
	 * Gets a specific JPanel for each server brand
67 75
	 * @return
68 76
	 */
69
	public JPanel getJPanel(String service) {
70
		return (JPanel) servicePanels.get(service);
77
	public Class getJPanel(String service) {
78
		return (Class) servicePanels.get(service);
71 79
	}
72 80
	
73
	protected void addJPanel(String service, JPanel panel) {
81
	protected void addJPanel(String service, Class panel) {
74 82
		servicePanels.put(service, panel);
75 83
	}
76 84
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/mapserver/ServiceWFSPanel.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.2  2006-09-01 06:59:00  luisw2
46
 * Revision 1.3  2006-09-01 13:40:59  jorpiell
47
 * Primer gran commit de la extension
48
 *
49
 * Revision 1.2  2006/09/01 06:59:00  luisw2
47 50
 * Headers mofification
48 51
 *
49 52
 */
53
import java.util.Properties;
54

  
50 55
import javax.swing.JPanel;
51 56

  
52
public class ServiceWFSPanel extends JPanel {
57
import com.iver.cit.gvsig.publish.servers.ServicePanel;
53 58

  
59
public class ServiceWFSPanel extends ServicePanel {
60
	
61
	/*
62
	 *  (non-Javadoc)
63
	 * @see com.iver.cit.gvsig.publish.servers.ServicePanel#getProperties()
64
	 */
65
	public Properties getProperties() {
66
		// TODO Auto-generated method stub
67
		return null;
68
	}
69

  
54 70
}
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/mapserver/MapServer.java
1
package com.iver.cit.gvsig.publish.servers.mapserver;
2

  
3
import java.util.ArrayList;
4

  
5
import javax.swing.JPanel;
6

  
7
import com.iver.cit.gvsig.publish.Servers;
8
import com.iver.cit.gvsig.publish.servers.GenericServer;
9
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
10
 *
11
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
12
 *
13
 * This program is free software; you can redistribute it and/or
14
 * modify it under the terms of the GNU General Public License
15
 * as published by the Free Software Foundation; either version 2
16
 * of the License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
26
 *
27
 * For more information, contact:
28
 *
29
 *  Generalitat Valenciana
30
 *   Conselleria d'Infraestructures i Transport
31
 *   Av. Blasco Ib??ez, 50
32
 *   46010 VALENCIA
33
 *   SPAIN
34
 *
35
 *      +34 963862235
36
 *   gvsig@gva.es
37
 *      www.gvsig.gva.es
38
 *
39
 *    or
40
 *
41
 *   IVER T.I. S.A
42
 *   Salamanca 50
43
 *   46005 Valencia
44
 *   Spain
45
 *
46
 *   +34 963163400
47
 *   dac@iver.es
48
 */
49
/* CVS MESSAGES:
50
 *
51
 * $Id$
52
 * $Log$
53
 * Revision 1.1  2006-09-01 13:40:59  jorpiell
54
 * Primer gran commit de la extension
55
 *
56
 *
57
 */
58
/**
59
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
60
 */
61
public class MapServer extends GenericServer {
62
	public static final String WMS_MAPFILE = "mapFile";
63
	public static final String WMS_SYMBOLS = "symbols";
64
	public static final String WMS_FONTS = "fonts";
65
	public static final String WMS_SHAPEPATH = "shapePath";
66
	public static final String WMS_ONLINERESOURCE = "onlineResource";
67
	
68
	public MapServer() {
69
		addJPanel(Servers.SERVER_TYPE_WMS, ServiceWMSPanel.class);
70
		addJPanel(Servers.SERVER_TYPE_WFS, ServiceWFSPanel.class);
71
	}
72

  
73

  
74
}
0 75

  
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/mapserver/ServiceWMSPanel.java
1 1
package com.iver.cit.gvsig.publish.servers.mapserver;
2

  
3
import javax.swing.JPanel;
4

  
5
import java.awt.Dimension;
6
import java.awt.GridBagLayout;
7
import java.awt.GridBagConstraints;
8
import javax.swing.JLabel;
9
import javax.swing.JTextField;
10

  
11
import com.iver.andami.PluginServices;
12
import com.iver.cit.gvsig.publish.servers.ServicePanel;
13

  
14
import java.awt.FlowLayout;
15
import java.util.Properties;
16

  
2 17
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3 18
 *
4
 * Copyright (C) 2004-2006 IVER T.I. and Generalitat Valenciana.
19
 * Copyright (C) tbHEIGHT04 IVER T.I. and Generalitat Valenciana.
5 20
 *
6 21
 * This program is free software; you can redistribute it and/or
7 22
 * modify it under the terms of the GNU General Public License
......
19 34
 *
20 35
 * For more information, contact:
21 36
 *
22
 *   Generalitat Valenciana
37
 *  Generalitat Valenciana
23 38
 *   Conselleria d'Infraestructures i Transport
24 39
 *   Av. Blasco Ib??ez, 50
25 40
 *   46010 VALENCIA
26 41
 *   SPAIN
27 42
 *
28
 *   +34 963862235
43
 *      +34 963862235
29 44
 *   gvsig@gva.es
30
 *   www.gvsig.gva.es
45
 *      www.gvsig.gva.es
31 46
 *
32 47
 *    or
33 48
 *
......
43 58
 *
44 59
 * $Id$
45 60
 * $Log$
46
 * Revision 1.2  2006-09-01 06:59:00  luisw2
47
 * Headers mofification
61
 * Revision 1.3  2006-09-01 13:40:49  jorpiell
62
 * Primer gran commit de la extension
48 63
 *
64
 *
49 65
 */
50
import javax.swing.JPanel;
66
/**
67
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
68
 */
69
public class ServiceWMSPanel extends ServicePanel{
70
	private static final int tbWIDTH = 375;
71
	private static final int tbHEIGHT = 20;
72
	private static final int lbWIDTH = 125;
73
	private static final int lbHEIGHT = 20;
74
	
75
	private JPanel labelsPanel = null;
76
	private JPanel textsPanel = null;
77
	private JPanel mapFileLabelPanel = null;
78
	private JPanel symbolsLabelPanel = null;
79
	private JPanel fontsLabelPanel = null;
80
	private JPanel shapePathLabelPanel = null;
81
	private JPanel onlineResourceLabelPanel = null;
82
	private JPanel mapFileTextPanel = null;
83
	private JPanel symbolsTextPanel = null;
84
	private JPanel fontsTextPanel = null;
85
	private JPanel shapePathTextPanel = null;
86
	private JPanel onlineResourceTextPanel = null;
87
	private JLabel lbMapFile = null;
88
	private JLabel lbSymbols = null;
89
	private JLabel lbFonts = null;
90
	private JLabel lbShapePath = null;
91
	private JLabel lbOnlineResource = null;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff