Revision 20038 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/geolocation/ui/GeoLocationDialog.java

View differences:

GeoLocationDialog.java
19 19
package org.gvsig.rastertools.geolocation.ui;
20 20

  
21 21
import java.awt.BorderLayout;
22
import java.awt.Dimension;
22 23
import java.awt.geom.AffineTransform;
23 24
import java.io.IOException;
24 25

  
......
36 37
import com.iver.cit.gvsig.fmap.ViewPort;
37 38
import com.iver.cit.gvsig.fmap.layers.FLayer;
38 39
import com.iver.cit.gvsig.fmap.layers.FLayers;
39
import com.iver.cit.gvsig.project.documents.view.gui.IView;
40 40

  
41 41
/**
42 42
 * Dialogo de geolocalizaci?n de raster.
......
81 81
		this.add(getGeoLocationPanel());
82 82
		getGeoLocationPanel().setParams(lyr, vp);
83 83
	}
84

  
84
	
85 85
	/**
86
	 * Calculo de la posici?n de la ventana
86
	 * Asigna la posici?n de la ventana
87
	 * @param x Posici?n en X
88
	 * @param y Posici?n en Y
87 89
	 */
88
	public void calcPosition() {
89
		IWindow[] list = PluginServices.getMDIManager().getAllWindows();
90
		for (int i = 0; i < list.length; i++) {
91
			if(list[i] instanceof IView) {
92
				WindowInfo wInfo = PluginServices.getMDIManager().getWindowInfo(list[i]);
93
				posWindowX = wInfo.getX() + (wInfo.getWidth() / 2) - (widthWindow / 2);
94
				posWindowY = wInfo.getY() + (wInfo.getHeight() / 2) - (heightWindow / 2);
95
			}	
96
		}
90
	public void setPosition(int x, int y) {
91
		this.posWindowX = x;
92
		this.posWindowY = y;
97 93
	}
98 94
	
99 95
	/**
96
	 * Obtiene el tama?o de la ventana
97
	 * @return
98
	 */
99
	public Dimension getSizeWindow() {
100
		return new Dimension(widthWindow, heightWindow);
101
	}
102
	
103
	/**
100 104
	 * Referencia la capa que est? seleccionada
101 105
	 *
102 106
	 */

Also available in: Unified diff