Revision 17732 trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/georeferencing/view/ViewPanel.java
ViewPanel.java | ||
---|---|---|
18 | 18 |
*/ |
19 | 19 |
package org.gvsig.rastertools.georeferencing.view; |
20 | 20 |
|
21 |
import java.awt.BorderLayout; |
|
22 |
import java.awt.geom.Point2D; |
|
23 |
import java.awt.geom.Rectangle2D; |
|
24 |
import java.awt.image.BufferedImage; |
|
25 |
|
|
21 | 26 |
import javax.swing.JPanel; |
22 | 27 |
|
28 |
import org.gvsig.rastertools.georeferencing.ui.zoom.ZoomControl; |
|
29 |
|
|
23 | 30 |
import com.iver.andami.PluginServices; |
24 | 31 |
import com.iver.andami.ui.mdiManager.IWindow; |
25 | 32 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
... | ... | |
32 | 39 |
*/ |
33 | 40 |
public class ViewPanel extends JPanel implements IWindow { |
34 | 41 |
private static final long serialVersionUID = 1L; |
42 |
private ZoomControl zoomPixelControl = null; |
|
35 | 43 |
|
36 | 44 |
private int w = 640; |
37 | 45 |
private int h = 100; |
... | ... | |
72 | 80 |
* Inicializaci?n de los componentes gr?ficos |
73 | 81 |
*/ |
74 | 82 |
private void init() { |
83 |
setLayout(new BorderLayout()); |
|
84 |
add(getZoomPixelControl(), BorderLayout.CENTER); |
|
85 |
} |
|
75 | 86 |
|
87 |
/** |
|
88 |
* Asigna los par?metros de dibujado para el raster |
|
89 |
* @param img Buffer con un ?rea de datos |
|
90 |
* @param ext Rectangle2D del ?rea de datos dada |
|
91 |
* @param pixelSize Tama?o de pixel |
|
92 |
* @param center Punto del ?rea de datos donde se quiere centrar el dibujado del buffer |
|
93 |
*/ |
|
94 |
public void setPixelDrawParams(BufferedImage img, Rectangle2D ext, double pixelSize, Point2D center) { |
|
95 |
getZoomPixelControl().setDrawParams(img, ext, pixelSize, center) ; |
|
76 | 96 |
} |
77 | 97 |
|
98 |
/** |
|
99 |
* Obtiene el panel de control de zoom de coordenadas pixel |
|
100 |
* @return |
|
101 |
*/ |
|
102 |
public ZoomControl getZoomPixelControl() { |
|
103 |
if(zoomPixelControl == null) |
|
104 |
zoomPixelControl = new ZoomControl(ZoomControl.NOCONTROL); |
|
105 |
return zoomPixelControl; |
|
106 |
} |
|
107 |
|
|
78 | 108 |
/* |
79 | 109 |
* (non-Javadoc) |
80 | 110 |
* @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo() |
Also available in: Unified diff