svn-gvsig-desktop / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / gui / listeners / AttributesLayerWindowListener.java @ 10626
History | View | Annotate | Download (2.87 KB)
1 |
package com.iver.cit.gvsig.publish.gui.listeners; |
---|---|
2 |
|
3 |
import java.awt.event.ActionEvent; |
4 |
import java.awt.event.ActionListener; |
5 |
|
6 |
import com.iver.andami.PluginServices; |
7 |
import com.iver.andami.ui.mdiManager.IWindow; |
8 |
import com.iver.cit.gvsig.publish.gui.panelServices.LayersWindow; |
9 |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
11 |
*
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
13 |
*
|
14 |
* This program is free software; you can redistribute it and/or
|
15 |
* modify it under the terms of the GNU General Public License
|
16 |
* as published by the Free Software Foundation; either version 2
|
17 |
* of the License, or (at your option) any later version.
|
18 |
*
|
19 |
* This program is distributed in the hope that it will be useful,
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
* GNU General Public License for more details.
|
23 |
*
|
24 |
* You should have received a copy of the GNU General Public License
|
25 |
* along with this program; if not, write to the Free Software
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
27 |
*
|
28 |
* For more information, contact:
|
29 |
*
|
30 |
* Generalitat Valenciana
|
31 |
* Conselleria d'Infraestructures i Transport
|
32 |
* Av. Blasco Ib??ez, 50
|
33 |
* 46010 VALENCIA
|
34 |
* SPAIN
|
35 |
*
|
36 |
* +34 963862235
|
37 |
* gvsig@gva.es
|
38 |
* www.gvsig.gva.es
|
39 |
*
|
40 |
* or
|
41 |
*
|
42 |
* IVER T.I. S.A
|
43 |
* Salamanca 50
|
44 |
* 46005 Valencia
|
45 |
* Spain
|
46 |
*
|
47 |
* +34 963163400
|
48 |
* dac@iver.es
|
49 |
*/
|
50 |
/* CVS MESSAGES:
|
51 |
*
|
52 |
* $Id: AttributesLayerWindowListener.java 10626 2007-03-06 16:55:54Z caballero $
|
53 |
* $Log$
|
54 |
* Revision 1.5 2007-03-06 16:50:30 caballero
|
55 |
* Exceptions
|
56 |
*
|
57 |
* Revision 1.4 2006/11/22 19:31:43 jorpiell
|
58 |
* Cambiados las aperturas de las ventanas
|
59 |
*
|
60 |
* Revision 1.3 2006/11/22 15:57:03 jorpiell
|
61 |
* Se ha ajustado el interfaz de usuario
|
62 |
*
|
63 |
* Revision 1.2 2006/11/22 12:48:21 jorpiell
|
64 |
* Subidos algunos cambios para ver las capas en forma de ?rbol
|
65 |
*
|
66 |
* Revision 1.1 2006/11/17 13:43:45 jorpiell
|
67 |
* A?adido el nuevo panel donde se muestran las capas
|
68 |
*
|
69 |
*
|
70 |
*/
|
71 |
/**
|
72 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
73 |
*/
|
74 |
public class AttributesLayerWindowListener implements ActionListener{ |
75 |
private IWindow lastWindow = null; |
76 |
private IWindow nextWindow = null; |
77 |
private IWindow currentWindow = null; |
78 |
|
79 |
public AttributesLayerWindowListener(IWindow lastWindow, IWindow nextWindow, IWindow currentWindow) {
|
80 |
super();
|
81 |
this.lastWindow = lastWindow;
|
82 |
this.nextWindow = nextWindow;
|
83 |
this.currentWindow = currentWindow;
|
84 |
} |
85 |
|
86 |
public void actionPerformed(ActionEvent e) { |
87 |
if (e.getActionCommand().equals("previous")){ |
88 |
PluginServices.getMDIManager().addCentredWindow(lastWindow); |
89 |
PluginServices.getMDIManager().closeWindow(currentWindow); |
90 |
}else if(e.getActionCommand().equals("accept")){ |
91 |
((LayersWindow)currentWindow).restoreLayers(); |
92 |
((LayersWindow)currentWindow).getPublishControler().writeFile(); |
93 |
PluginServices.getMDIManager().closeWindow(currentWindow); |
94 |
} |
95 |
} |
96 |
|
97 |
|
98 |
} |