Revision 2276 trunk/extensions/extDataLocator/src/com/iver/gvsig/datalocator/DataLocatorExtension.java
DataLocatorExtension.java | ||
---|---|---|
52 | 52 |
import com.iver.gvsig.datalocator.gui.DataSelectionPanel; |
53 | 53 |
|
54 | 54 |
/** |
55 |
* This Extension class allows to store a set of zooms. These zooms can be stablished
|
|
56 |
* using database values.
|
|
55 |
* The DataLocatorExtension class allows to make a quick zoom based on an
|
|
56 |
* alphanumeric attribute.
|
|
57 | 57 |
* |
58 | 58 |
* @author jmorell |
59 | 59 |
*/ |
... | ... | |
72 | 72 |
*/ |
73 | 73 |
public void execute(String actionCommand) { |
74 | 74 |
View vista = (View)PluginServices.getMDIManager().getActiveView(); |
75 |
ProjectView model = vista.getModel(); |
|
76 |
FMap mapContext = model.getMapContext(); |
|
75 |
FMap mapContext = vista.getModel().getMapContext(); |
|
77 | 76 |
DataSelectionPanel dataSelectionPanel = new DataSelectionPanel(mapContext); |
78 | 77 |
PluginServices.getMDIManager().addView(dataSelectionPanel); |
79 | 78 |
} |
... | ... | |
82 | 81 |
* @see com.iver.andami.plugins.Extension#isEnabled() |
83 | 82 |
*/ |
84 | 83 |
public boolean isEnabled() { |
85 |
// molar?a que estuviera false y que cambiara a true solo cuando hayan |
|
86 |
// temas en el TOC, pero como eso ya lo controlamos con la |
|
87 |
// visualizaci?n, pues n?. |
|
88 | 84 |
return true; |
89 | 85 |
} |
90 | 86 |
|
... | ... | |
92 | 88 |
* @see com.iver.andami.plugins.Extension#isVisible() |
93 | 89 |
*/ |
94 | 90 |
public boolean isVisible() { |
95 |
// Deber?a ser invisible cuando no hayan temas en el TOC. |
|
96 |
// C?digo sacado que controla la visualizaci?n sacado de ViewControls |
|
97 | 91 |
com.iver.andami.ui.mdiManager.View f = PluginServices.getMDIManager() |
98 | 92 |
.getActiveView(); |
99 | 93 |
if (f == null) { |
Also available in: Unified diff