Revision 1313 org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/geolocation/GeoLocationTocMenuEntry.java
GeoLocationTocMenuEntry.java | ||
---|---|---|
40 | 40 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.Behavior; |
41 | 41 |
import org.gvsig.fmap.mapcontrol.tools.Behavior.MouseMovementBehavior; |
42 | 42 |
import org.gvsig.raster.fmap.layers.FLyrRaster; |
43 |
import org.gvsig.raster.fmap.layers.ILayerState; |
|
43 | 44 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
44 | 45 |
import org.gvsig.raster.tools.app.basic.RasterToolsUtil; |
45 | 46 |
import org.gvsig.raster.tools.app.basic.raster.gui.IGenericToolBarMenuItem; |
... | ... | |
112 | 113 |
* @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#isEnabled(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[]) |
113 | 114 |
*/ |
114 | 115 |
public boolean isEnabled(ITocItem item, FLayer[] selectedItems) { |
116 |
if ((selectedItems == null) || (selectedItems.length != 1)) |
|
117 |
return false; |
|
118 |
|
|
119 |
if (!(selectedItems[0] instanceof ILayerState)) |
|
120 |
return false; |
|
121 |
|
|
122 |
if (!((ILayerState) selectedItems[0]).isOpen()) |
|
123 |
return false; |
|
115 | 124 |
return true; |
116 | 125 |
} |
117 | 126 |
|
Also available in: Unified diff