Revision 9532 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ThemeToAnnotationExtension.java
ThemeToAnnotationExtension.java | ||
---|---|---|
62 | 62 |
import com.iver.cit.gvsig.gui.panels.annotation.ConfigureLabel; |
63 | 63 |
import com.iver.cit.gvsig.gui.panels.annotation.SelectAnnotationLayerNameAndField; |
64 | 64 |
import com.iver.cit.gvsig.gui.simpleWizard.SimpleWizard; |
65 |
import com.iver.cit.gvsig.project.documents.ProjectDocument; |
|
65 | 66 |
import com.iver.cit.gvsig.project.documents.view.IProjectView; |
67 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
|
66 | 68 |
|
67 | 69 |
|
68 | 70 |
/** |
... | ... | |
72 | 74 |
*/ |
73 | 75 |
public class ThemeToAnnotationExtension extends Extension { |
74 | 76 |
private MapContext map=null; |
77 |
private IWindow view=null; |
|
75 | 78 |
/** |
76 | 79 |
* @see com.iver.andami.plugins.IExtension#initialize() |
77 | 80 |
*/ |
... | ... | |
186 | 189 |
wizard.getWindowInfo().setTitle(PluginServices.getText(this,"to_annotation")); |
187 | 190 |
|
188 | 191 |
PluginServices.getMDIManager().addWindow(wizard); |
192 |
((ProjectDocument)((View)view).getModel()).setModified(true); |
|
189 | 193 |
|
190 | 194 |
|
191 |
|
|
192 | 195 |
/* |
193 | 196 |
FLyrVect lv=(FLyrVect)map.getLayers().getActives()[0]; |
194 | 197 |
FLyrAnnotation la=new FLyrAnnotation(); |
... | ... | |
242 | 245 |
* @see com.iver.andami.plugins.IExtension#isVisible() |
243 | 246 |
*/ |
244 | 247 |
public boolean isVisible() { |
245 |
IWindow v = PluginServices.getMDIManager().getActiveWindow();
|
|
248 |
view = PluginServices.getMDIManager().getActiveWindow();
|
|
246 | 249 |
|
247 |
if (v == null) { |
|
250 |
if (view == null) {
|
|
248 | 251 |
return false; |
249 |
} else if (v instanceof com.iver.cit.gvsig.project.documents.view.gui.View) { |
|
252 |
} else if (view instanceof com.iver.cit.gvsig.project.documents.view.gui.View) {
|
|
250 | 253 |
return true; |
251 | 254 |
} else { |
252 | 255 |
return false; |
Also available in: Unified diff