Revision 24529
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/Project.java | ||
---|---|---|
1772 | 1772 |
documents.add(doc); |
1773 | 1773 |
doc.addPropertyChangeListener(this); |
1774 | 1774 |
//modified = true; |
1775 |
change.firePropertyChange("", "", null);
|
|
1775 |
change.firePropertyChange("addDocument", "", doc);
|
|
1776 | 1776 |
doc.setProject(this, 0); |
1777 | 1777 |
doc.afterAdd(); |
1778 |
|
|
1779 | 1778 |
} |
1780 | 1779 |
|
1781 | 1780 |
/** |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/ProjectMap.java | ||
---|---|---|
168 | 168 |
l.getLayoutControl().fullRect(); |
169 | 169 |
l.getWindowInfo().setTitle(PluginServices.getText(this, |
170 | 170 |
"Mapa") + " : " +l.getName()); |
171 |
callCreateWindow(l); |
|
171 | 172 |
return l; |
172 | 173 |
} |
173 | 174 |
public IWindow getProperties() { |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/ProjectDocument.java | ||
---|---|---|
44 | 44 |
import java.beans.PropertyChangeSupport; |
45 | 45 |
import java.io.Serializable; |
46 | 46 |
import java.text.DateFormat; |
47 |
import java.util.ArrayList; |
|
47 | 48 |
import java.util.Date; |
48 | 49 |
import java.util.HashMap; |
49 | 50 |
import java.util.Iterator; |
... | ... | |
83 | 84 |
protected WindowData windowData = null; |
84 | 85 |
private boolean isModified=false; |
85 | 86 |
private ProjectDocumentFactory projectDocumentFactory; |
87 |
|
|
88 |
private ArrayList<ProjectDocumentListener> projectDocListener = new ArrayList<ProjectDocumentListener>(); |
|
89 |
|
|
86 | 90 |
/** |
87 | 91 |
* Creates a new ProjectElement object. |
88 | 92 |
*/ |
... | ... | |
364 | 368 |
return locked; |
365 | 369 |
} |
366 | 370 |
|
371 |
/** |
|
372 |
* Register a ProjectViewListener. |
|
373 |
* @param listener |
|
374 |
* ProjectViewListener |
|
375 |
*/ |
|
376 |
public void addProjectViewListener(ProjectDocumentListener listener) { |
|
377 |
if(this.projectDocListener.indexOf(listener) == -1) |
|
378 |
this.projectDocListener.add(listener); |
|
379 |
} |
|
380 |
|
|
381 |
/** |
|
382 |
* Throw this event when a new window is created |
|
383 |
* @param window |
|
384 |
* IWindow created |
|
385 |
*/ |
|
386 |
protected void callCreateWindow(IWindow window) { |
|
387 |
for (int i = 0; i < projectDocListener.size(); i++) |
|
388 |
projectDocListener.get(i).windowCreated(window); |
|
389 |
} |
|
390 |
|
|
367 | 391 |
public abstract IWindow createWindow(); |
368 | 392 |
public abstract IWindow getProperties(); |
369 | 393 |
public abstract void afterRemove(); |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/table/ProjectTable.java | ||
---|---|---|
814 | 814 |
return null; |
815 | 815 |
com.iver.cit.gvsig.project.documents.table.gui.Table table = new com.iver.cit.gvsig.project.documents.table.gui.Table(); |
816 | 816 |
table.setModel(this); |
817 |
callCreateWindow(table); |
|
817 | 818 |
return table; |
818 | 819 |
} |
819 | 820 |
public IWindow getProperties() { |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toc/actions/LayersUngroupTocMenuEntry.java | ||
---|---|---|
121 | 121 |
getMapContext().beginAtomicEvent(); |
122 | 122 |
while (agrupa.getLayersCount() > 0){ |
123 | 123 |
FLayer layer = agrupa.getLayer(0); |
124 |
agrupa.removeLayer(layer); |
|
124 | 125 |
parent.addLayer(layer); |
125 |
agrupa.removeLayer(layer); |
|
126 | 126 |
} |
127 | 127 |
parent.removeLayer(agrupa); |
128 | 128 |
getMapContext().endAtomicEvent(); |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/ProjectViewBase.java | ||
---|---|---|
40 | 40 |
protected String m_selectedField = null; |
41 | 41 |
|
42 | 42 |
// OVERRIDE THESE |
43 |
public IWindow createWindow() { return null;} |
|
44 | 43 |
public IWindow getProperties() { return null;} |
45 | 44 |
|
46 | 45 |
/** |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/ProjectView.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
package com.iver.cit.gvsig.project.documents.view; |
42 | 42 |
|
43 |
import java.util.ArrayList; |
|
43 | 44 |
import java.util.Comparator; |
44 | 45 |
import java.util.HashMap; |
45 | 46 |
import java.util.Iterator; |
... | ... | |
79 | 80 |
//public static int KILOMETROS = 1; |
80 | 81 |
//public static int[] unidades = new int[] { METROS, KILOMETROS }; |
81 | 82 |
///private Color backgroundColor = new Color(255, 255, 255); |
83 |
|
|
84 |
|
|
82 | 85 |
|
83 | 86 |
/** |
84 | 87 |
* DOCUMENT ME! |
... | ... | |
208 | 211 |
view.setWindowData(windowData); |
209 | 212 |
view.initialize(); |
210 | 213 |
view.setModel(this); |
214 |
callCreateWindow(view); |
|
211 | 215 |
return view; |
212 | 216 |
} |
213 | 217 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/ProjectDocumentListener.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib��ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package com.iver.cit.gvsig.project.documents; |
|
42 |
|
|
43 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
44 |
|
|
45 |
/** |
|
46 |
* Listener para notificaci�n en los cambios de las vistas de un proyecto. |
|
47 |
* |
|
48 |
* @author Nacho Brodin (nachobrodin@gmail.com) |
|
49 |
* |
|
50 |
*/ |
|
51 |
public interface ProjectDocumentListener { |
|
52 |
|
|
53 |
/** |
|
54 |
* Evento lanzado cuando se crea una ventana de proyecto |
|
55 |
* @param view |
|
56 |
* Ventana creada |
|
57 |
*/ |
|
58 |
public void windowCreated(IWindow window); |
|
59 |
|
|
60 |
} |
Also available in: Unified diff