Revision 943 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/selectionByTheme/DefaultSelectionByThemeDataSource.java
DefaultSelectionByThemeDataSource.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.gui.selectionByTheme; |
2 | 2 |
|
3 |
import com.iver.andami.PluginServices; |
|
4 |
import com.iver.andami.ui.mdiManager.View; |
|
3 | 5 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
4 | 6 |
|
5 | 7 |
|
... | ... | |
9 | 11 |
|
10 | 12 |
private FLayers layers; |
11 | 13 |
|
12 |
public DefaultSelectionByThemeDataSource(FLayers layers){ |
|
13 |
this.layers = layers; |
|
14 |
} |
|
15 |
|
|
16 | 14 |
/** |
17 | 15 |
* @see com.iver.cit.gvsig.gui.selectionByTheme.SelectionByThemeDataSource#getViews() |
18 | 16 |
*/ |
19 | 17 |
public FLayers getLayers() { |
18 |
View v = PluginServices.getMDIManager().getActiveView(); |
|
19 |
if (v instanceof com.iver.cit.gvsig.gui.View){ |
|
20 |
com.iver.cit.gvsig.gui.View vista = (com.iver.cit.gvsig.gui.View) v; |
|
21 |
|
|
22 |
return vista.getModel().getMapContext().getLayers(); |
|
23 |
} |
|
20 | 24 |
|
21 |
return layers;
|
|
25 |
return null;
|
|
22 | 26 |
} |
23 | 27 |
|
24 | 28 |
} |
Also available in: Unified diff