Revision 31496 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/extension/FFrameViewExtension.java
FFrameViewExtension.java | ||
---|---|---|
47 | 47 |
import org.gvsig.app.project.documents.layout.fframes.FFrameOverView; |
48 | 48 |
import org.gvsig.app.project.documents.layout.fframes.FFrameView; |
49 | 49 |
import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
50 |
import org.gvsig.app.project.documents.layout.gui.Layout; |
|
50 |
import org.gvsig.app.project.documents.layout.gui.LayoutPanel;
|
|
51 | 51 |
import org.gvsig.fmap.dal.exception.ReadException; |
52 | 52 |
|
53 | 53 |
|
... | ... | |
60 | 60 |
* @author Vicente Caballero Navarro |
61 | 61 |
*/ |
62 | 62 |
public class FFrameViewExtension extends Extension { |
63 |
private Layout layout = null; |
|
63 |
private LayoutPanel layout = null;
|
|
64 | 64 |
|
65 | 65 |
/** |
66 | 66 |
* @see org.gvsig.andami.plugins.IExtension#initialize() |
... | ... | |
92 | 92 |
* @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String) |
93 | 93 |
*/ |
94 | 94 |
public void execute(String s) { |
95 |
layout = (Layout) PluginServices.getMDIManager().getActiveWindow(); |
|
95 |
layout = (LayoutPanel) PluginServices.getMDIManager().getActiveWindow();
|
|
96 | 96 |
|
97 | 97 |
if (s.compareTo("VIEW_ZOOMIN") == 0) { |
98 | 98 |
layout.getLayoutControl().setTool("layoutviewzoomin"); |
... | ... | |
114 | 114 |
* @see org.gvsig.andami.plugins.IExtension#isEnabled() |
115 | 115 |
*/ |
116 | 116 |
public boolean isEnabled() { |
117 |
Layout l = (Layout)PluginServices.getMDIManager().getActiveWindow();
|
|
117 |
LayoutPanel l = (LayoutPanel)PluginServices.getMDIManager().getActiveWindow();
|
|
118 | 118 |
IFFrame[] fframes = l.getLayoutContext().getFFrameSelected(); |
119 | 119 |
if (!l.getLayoutContext().isEditable()) { |
120 | 120 |
return false; |
... | ... | |
140 | 140 |
return false; |
141 | 141 |
} |
142 | 142 |
|
143 |
if (f instanceof Layout) { |
|
143 |
if (f instanceof LayoutPanel) {
|
|
144 | 144 |
// Layout layout = (Layout) f; |
145 | 145 |
|
146 | 146 |
return true; //layout.m_Display.getMapControl().getMapContext().getLayers().layerCount() > 0; |
Also available in: Unified diff