root / tags / v1_0_2_Build_916 / extensions / extGeoreferencing / src / org / gvsig / georeferencing / GeoreferencingModule.java @ 12327
History | View | Annotate | Download (2.45 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2006 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 |
package org.gvsig.georeferencing; |
20 |
|
21 |
import org.gvsig.georeferencing.toc.GeoRasterTocMenuEntry; |
22 |
import org.gvsig.georeferencing.wizards.GeoRasterWizard; |
23 |
|
24 |
import com.iver.andami.PluginServices; |
25 |
import com.iver.andami.plugins.Extension; |
26 |
import com.iver.cit.gvsig.AddLayer; |
27 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
28 |
import com.iver.cit.gvsig.project.documents.view.toc.gui.FPopupMenu; |
29 |
|
30 |
|
31 |
/**
|
32 |
* Extensi?n que carga el modulo de georeferenciaci?n
|
33 |
*
|
34 |
* @author Nacho Brodin (brodin_ign@gva.es)
|
35 |
*/
|
36 |
public class GeoreferencingModule extends Extension{ |
37 |
|
38 |
/**
|
39 |
* @see com.iver.andami.plugins.IExtension#initialize()
|
40 |
*/
|
41 |
public void initialize() { |
42 |
AddLayer.addWizard(GeoRasterWizard.class); |
43 |
FPopupMenu.addEntry(new GeoRasterTocMenuEntry());
|
44 |
} |
45 |
|
46 |
/**
|
47 |
* El control est? activo siempre que haya una vista abierta
|
48 |
*/
|
49 |
public boolean isEnabled() { |
50 |
com.iver.andami.ui.mdiManager.IWindow f = null;
|
51 |
try{
|
52 |
f = PluginServices.getMDIManager().getActiveWindow(); |
53 |
}catch(ClassCastException exc){ |
54 |
return false; |
55 |
} |
56 |
|
57 |
if (f == null) { |
58 |
return false; |
59 |
} |
60 |
|
61 |
return (f.getClass() == View.class); |
62 |
} |
63 |
|
64 |
/**
|
65 |
* El control es visible siempre que haya una vista abierta
|
66 |
*/
|
67 |
public boolean isVisible() { |
68 |
com.iver.andami.ui.mdiManager.IWindow f = null;
|
69 |
try{
|
70 |
f = PluginServices.getMDIManager().getActiveWindow(); |
71 |
}catch(ClassCastException exc){ |
72 |
return false; |
73 |
} |
74 |
|
75 |
if (f == null) { |
76 |
return false; |
77 |
} |
78 |
|
79 |
return (f.getClass() == View.class); |
80 |
} |
81 |
|
82 |
/**
|
83 |
* Cuando ejecutamos el control de georeferenciaci?n se activan las heramientas
|
84 |
* de georeferenciaci?n y se carga el wizard.
|
85 |
*/
|
86 |
public void execute(String s) { |
87 |
|
88 |
} |
89 |
} |