Revision 1219 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ZoomPrev.java

View differences:

ZoomPrev.java
42 42

  
43 43
import com.iver.andami.PluginServices;
44 44
import com.iver.andami.plugins.Extension;
45

  
45 46
import com.iver.cit.gvsig.fmap.FMap;
46 47
import com.iver.cit.gvsig.fmap.ViewPort;
47 48
import com.iver.cit.gvsig.gui.View;
48 49

  
49 50

  
51
/**
52
 * Extensi?n que cambia el extent de la vista al extent anterior.
53
 *
54
 * @author Vicente Caballero Navarro
55
 */
50 56
public class ZoomPrev implements Extension {
51

  
52 57
	/**
53 58
	 * @see com.iver.mdiApp.plugins.Extension#isEnabled()
54 59
	 */
55 60
	public boolean isEnabled() {
56 61
		View vista = (View) PluginServices.getMDIManager().getActiveView();
57 62
		ViewPort vp = vista.getModel().getMapContext().getViewPort();
63

  
58 64
		return vp.getExtents().hasPrevious();
59 65
	}
60 66

  
......
62 68
	 * @see com.iver.mdiApp.plugins.Extension#isVisible()
63 69
	 */
64 70
	public boolean isVisible() {
65
		com.iver.andami.ui.mdiManager.View f = PluginServices.getMDIManager().getActiveView();
71
		com.iver.andami.ui.mdiManager.View f = PluginServices.getMDIManager()
72
															 .getActiveView();
66 73

  
67 74
		if (f == null) {
68 75
			return false;
......
72 79
			View v = (View) f;
73 80

  
74 81
			FMap mapa = v.getModel().getMapContext();
82

  
75 83
			return mapa.getLayers().getLayersCount() > 0;
76 84
		} else {
77 85
			return false;
......
92 100
	 */
93 101
	public void inicializar() {
94 102
	}
95

  
96 103
}

Also available in: Unified diff