svn-gvsig-desktop / tmp / trunk / cliente / WorkSpace_WPSClient / extWPSCallejero / src / es / logex / gvsig / wps / WPSCallejeroClientExtension.java @ 26497
History | View | Annotate | Download (2.68 KB)
1 |
package es.logex.gvsig.wps; |
---|---|
2 |
|
3 |
import java.util.ArrayList; |
4 |
import java.util.List; |
5 |
|
6 |
import org.apache.log4j.Logger; |
7 |
|
8 |
import com.iver.andami.PluginServices; |
9 |
import com.iver.andami.plugins.Extension; |
10 |
import com.iver.andami.ui.mdiManager.IWindow; |
11 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
12 |
import com.iver.cit.gvsig.AddLayer; |
13 |
import com.iver.cit.gvsig.fmap.MapControl; |
14 |
import com.iver.cit.gvsig.fmap.tools.Behavior.PointBehavior; |
15 |
import com.iver.cit.gvsig.project.documents.view.gui.BaseView; |
16 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
17 |
import com.iver.cit.gvsig.project.documents.view.toc.gui.FPopupMenu; |
18 |
import com.iver.cit.gvsig.project.documents.view.toolListeners.ZoomOutListener; |
19 |
import com.iver.utiles.extensionPoints.ExtensionPoints; |
20 |
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
21 |
|
22 |
import es.logex.gvsig.fmap.layers.FLyrWPS; |
23 |
|
24 |
import es.logex.gvsig.gui.dialogs.StreetsMapDialog; |
25 |
import es.logex.gvsig.streetsmap.core.*; |
26 |
public class WPSCallejeroClientExtension extends Extension { |
27 |
|
28 |
private List<StreetsMapExtensionManager> listManagers = new ArrayList<StreetsMapExtensionManager>(); |
29 |
|
30 |
private static Logger logger = Logger |
31 |
.getLogger(WPSCallejeroClientExtension.class.getName()); |
32 |
|
33 |
public void initialize() { |
34 |
/*
|
35 |
* logger.info("AƱado Wizard StreetsMap.");
|
36 |
*
|
37 |
* FPopupMenu.addEntry(new WPSPropsTocMenuEntry());
|
38 |
* //FPopupMenu.addEntry(new WPSVectorialPropsTocMenuEntry()); // Adds a
|
39 |
* new tab to the "add layer" wizard for WFS layer creation
|
40 |
* AddLayer.addWizard(StreetsMapWizard.class); ExtensionPoints
|
41 |
* extensionPoints = ExtensionPointsSingleton.getInstance();
|
42 |
* extensionPoints.add("CatalogLayers","OGC:WPS",FLyrWPS.class);
|
43 |
*/
|
44 |
|
45 |
} |
46 |
|
47 |
public void execute(String actionCommand) { |
48 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices |
49 |
.getMDIManager().getActiveWindow(); |
50 |
|
51 |
boolean found = false; |
52 |
|
53 |
for (StreetsMapExtensionManager em : listManagers) {
|
54 |
if (em.getBaseView() == f) {
|
55 |
found = true;
|
56 |
PluginServices.getMDIManager().addWindow(em.getStreetsMapDialog()); |
57 |
break;
|
58 |
} |
59 |
} |
60 |
if (!found) {
|
61 |
StreetsMapExtensionManager em = new StreetsMapExtensionManager((BaseView)f);
|
62 |
listManagers.add(em); |
63 |
PluginServices.getMDIManager().addWindow(em.getStreetsMapDialog()); |
64 |
} |
65 |
} |
66 |
|
67 |
public void terminate() { |
68 |
// TODO: dessubscribirse del redraw del viewport.
|
69 |
|
70 |
} |
71 |
|
72 |
public boolean isEnabled() { |
73 |
return true; |
74 |
} |
75 |
|
76 |
public boolean isVisible() { |
77 |
com.iver.andami.ui.mdiManager.IWindow f = PluginServices |
78 |
.getMDIManager().getActiveWindow(); |
79 |
|
80 |
if (f == null) { |
81 |
return false; |
82 |
} |
83 |
|
84 |
return (f instanceof BaseView); |
85 |
} |
86 |
} |
87 |
|
88 |
final class StreetsMapView extends BaseView { |
89 |
public StreetsMapView() {
|
90 |
super();
|
91 |
} |
92 |
|
93 |
public void windowClosed() { |
94 |
|
95 |
} |
96 |
} |