Revision 21743 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toolListeners/MapOverviewListener.java

View differences:

MapOverviewListener.java
50 50

  
51 51
import javax.swing.ImageIcon;
52 52

  
53
import org.gvsig.fmap.geom.primitive.DefaultEnvelope;
53 54
import org.gvsig.fmap.mapcontext.ViewPort;
54 55
import org.gvsig.fmap.mapcontrol.MapControl;
55 56
import org.gvsig.fmap.mapcontrol.tools.BehaviorException;
......
63 64
/**
64 65
 * <p>Listener for changes of the zoom caused by selecting a point on the associated {@link MapOverview MapOverview} object
65 66
 *  by a single click of the button 1 of the mouse.</p>
66
 * 
67
 *
67 68
 * <p>Updates the extent of its <code>ViewPort</code> with a <i>zoom out</i> operation, and enables/disables controls for
68 69
 *  managing the data.</p>
69 70
 *
70 71
 * @see ViewPort
71
 * 
72
 *
72 73
 * @author Vicente Caballero Navarro
73 74
 */
74 75
public class MapOverviewListener implements PointListener {
......
79 80

  
80 81
	/**
81 82
	 * The cursor used to work with this tool listener.
82
	 * 
83
	 *
83 84
	 * @see #getCursor()
84 85
	 */
85 86
	private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(izoomout,
......
93 94
	/**
94 95
 	 * <p>Creates a new listener for zooming out the extent of the associated {@link MapOverview MapOverview} object.</p>
95 96
	 *
96
	 * @param mapControl the <code>MapControl</code> object which represents the <code>MapOverview</code>  
97
	 * @param mapControl the <code>MapControl</code> object which represents the <code>MapOverview</code>
97 98
	 */
98 99
	public MapOverviewListener(MapOverview mapControl) {
99 100
		this.mapControl = mapControl;
......
117 118

  
118 119
			if (event.getEvent().getButton()!=MouseEvent.BUTTON1) {
119 120
				((MapOverview) this.mapControl).getAssociatedMapContext()
120
					.getViewPort().setEnvelope(r);
121
					.getViewPort().setEnvelope(new DefaultEnvelope(2,new double[]{r.getX(),r.getY()},new double[]{r.getMaxX(),r.getMaxY()}));
121 122
				PluginServices.getMainFrame().enableControls();
122 123
			}
123 124
		}

Also available in: Unified diff