Revision 19621 trunk/extensions/extGeoreferencing/src/org/gvsig/georeferencing/ui/launcher/FileSelectionPanel.java

View differences:

FileSelectionPanel.java
30 30
import javax.swing.JTextField;
31 31

  
32 32
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
33
import org.gvsig.gui.beans.datainput.DataInputContainer;
33 34
import org.gvsig.raster.dataset.RasterDataset;
34 35
import org.gvsig.raster.util.ExtendedFileFilter;
35 36
import org.gvsig.raster.util.RasterToolsUtil;
......
45 46
 * @author Nacho Brodin (nachobrodin@gmail.com)
46 47
 */
47 48
public class FileSelectionPanel extends JPanel implements ActionListener {
48
	private static final long    serialVersionUID = 1L;
49
	private static final long     serialVersionUID    = 1L;
49 50
	
50
	private JTextField           fileName = null;
51
	private JButton              bSelection = null;
52
	private FLyrRasterSE         layer = null;
51
	private JTextField            fileName            = null;
52
	private JButton               bSelection          = null;
53
	private FLyrRasterSE          layer               = null;
54
	private DataInputContainer    yCellSize           = null;
55
	private DataInputContainer    xCellSize           = null;
53 56

  
54 57
	/**
55 58
	 * Constructor. Asigna la lista de nombres de vistas para el selector. 
56 59
	 * @param viewList
57 60
	 */
58
	public FileSelectionPanel() {
61
	public FileSelectionPanel(DataInputContainer xCellSize, DataInputContainer yCellSize) {
62
		this.xCellSize = xCellSize;
63
		this.yCellSize = yCellSize;
59 64
		init();
60 65
	}
61 66
	
......
96 101
		return bSelection;
97 102
	}
98 103

  
104
	/**
105
	 * Gestiona el evento del bot?n de apertura de capa
106
	 */
99 107
	public void actionPerformed(ActionEvent e) {
100 108
		if(e.getSource() == getSelectFileButton()) {
101 109
			loadRasterLayer();
110
			if(getLayer() != null && xCellSize != null && yCellSize != null) {
111
				xCellSize.setValue(getLayer().getDataSource().getCellSize() + "");
112
				yCellSize.setValue(getLayer().getDataSource().getCellSize() + "");
113
			}
102 114
		}
103 115
	}
104 116
	

Also available in: Unified diff