Revision 20
org.gvsig.hyperlink.app/trunk/org.gvsig.hyperlink.app/org.gvsig.hyperlink.app.extension/src/main/java/org/gvsig/hyperlink/app/extension/HyperlinkExtension.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import org.slf4j.Logger; |
27 | 27 |
import org.slf4j.LoggerFactory; |
28 |
|
|
29 | 28 |
import org.gvsig.andami.IconThemeHelper; |
30 | 29 |
import org.gvsig.andami.PluginServices; |
31 | 30 |
import org.gvsig.andami.plugins.Extension; |
... | ... | |
35 | 34 |
import org.gvsig.app.project.documents.view.legend.gui.ThemeManagerWindow; |
36 | 35 |
import org.gvsig.fmap.mapcontext.MapContext; |
37 | 36 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
37 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
38 | 38 |
import org.gvsig.fmap.mapcontext.layers.LayersIterator; |
39 | 39 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
40 | 40 |
import org.gvsig.fmap.mapcontrol.MapControl; |
... | ... | |
209 | 209 |
|
210 | 210 |
if (viewDocument != null |
211 | 211 |
&& viewDocument.getMapContext() != null |
212 |
&& viewDocument.getMapContext().getLayers().getVisibles().length > 0) |
|
213 |
return true; |
|
214 |
else |
|
215 |
return false; |
|
216 |
|
|
212 |
&& viewDocument.getMapContext().getLayers().getVisibles().length > 0) { |
|
213 |
FLayers lyrs = viewDocument.getMapContext().getLayers(); |
|
214 |
FLayer[] lyrsSelected = lyrs.getActives(); |
|
215 |
for (int i = 0; i < lyrsSelected.length; i++) { |
|
216 |
Object obj = lyrsSelected[i].getProperty(HyperlinkExtension.LAYERPROPERTYNAME); |
|
217 |
if(obj != null) |
|
218 |
return true; |
|
219 |
} |
|
220 |
} |
|
217 | 221 |
} |
218 |
return true;
|
|
222 |
return false;
|
|
219 | 223 |
} |
220 | 224 |
|
221 | 225 |
public void postInitialize() { |
Also available in: Unified diff