Revision 12284

View differences:

trunk/libraries/libUIComponent/src/org/gvsig/gui/beans/coorddatainput/CoordDataInputContainer.java
70 70
			GridBagConstraints gridBagConstraints0 = new GridBagConstraints();
71 71
			gridBagConstraints0.gridx = 0;
72 72
			gridBagConstraints0.gridy = 0;
73
			gridBagConstraints0.insets = new java.awt.Insets(5, 5, 2, 2);
73 74
			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
74 75
			gridBagConstraints1.gridx = 0;
75 76
			gridBagConstraints1.gridy = 1;
77
			gridBagConstraints1.insets = new java.awt.Insets(2, 5, 5, 2);
76 78

  
77 79
			GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
78 80
			gridBagConstraints11.gridx = 1;
79 81
			gridBagConstraints11.gridy = 0;
80 82
			gridBagConstraints11.fill = java.awt.GridBagConstraints.HORIZONTAL;
81 83
			gridBagConstraints11.weightx = 1.0;
82
			gridBagConstraints11.insets = new java.awt.Insets(0, 5, 0, 0);
84
			gridBagConstraints11.insets = new java.awt.Insets(5, 2, 2, 2);
83 85
			GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
84 86
			gridBagConstraints12.gridx = 2;
85 87
			gridBagConstraints12.gridy = 0;
86 88
			gridBagConstraints12.fill = java.awt.GridBagConstraints.HORIZONTAL;
87 89
			gridBagConstraints12.weightx = 1.0;
88
			gridBagConstraints12.insets = new java.awt.Insets(0, 5, 0, 0);
90
			gridBagConstraints12.insets = new java.awt.Insets(5, 2, 2, 5);
89 91
			GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
90 92
			gridBagConstraints21.gridx = 1;
91 93
			gridBagConstraints21.gridy = 1;
92 94
			gridBagConstraints21.fill = java.awt.GridBagConstraints.HORIZONTAL;
93 95
			gridBagConstraints21.weightx = 1.0;
94
			gridBagConstraints21.insets = new java.awt.Insets(0, 5, 0, 0);
96
			gridBagConstraints21.insets = new java.awt.Insets(2, 2, 5, 2);
95 97
			GridBagConstraints gridBagConstraints22 = new GridBagConstraints();
96 98
			gridBagConstraints22.gridx = 2;
97 99
			gridBagConstraints22.gridy = 1;
98 100
			gridBagConstraints22.fill = java.awt.GridBagConstraints.HORIZONTAL;
99 101
			gridBagConstraints22.weightx = 1.0;
100
			gridBagConstraints22.insets = new java.awt.Insets(0, 5, 0, 0);
102
			gridBagConstraints22.insets = new java.awt.Insets(2, 2, 5, 5);
101 103

  
102 104
			pCoord = new JPanel();
103 105
			pCoord.setLayout(new GridBagLayout());
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/cutting/ui/ResolutionPanel.java
18 18
 */
19 19
package org.gvsig.rastertools.cutting.ui;
20 20

  
21
import java.awt.BorderLayout;
22
import java.awt.FlowLayout;
23 21
import java.awt.GridBagConstraints;
24
import java.awt.GridBagLayout;
25 22
import java.awt.event.ActionEvent;
26 23
import java.awt.event.ActionListener;
27 24

  
......
42 39
 */
43 40
public class ResolutionPanel extends JPanel implements ActionListener{
44 41
	private static final long serialVersionUID = 2570616093263451091L;
42
	private int                MARGIN           = 10;
43
	private int                wHalf            = (int) Math.floor((420 - MARGIN) >> 1) - 4, hHalf = 92;
44
	private int                hData            = (int) Math.floor(hHalf / 3);
45
	private JPanel             pButtons         = null;
46
	private DataInputContainer cCellSize        = null;
47
	private DataInputContainer cHeight          = null;
48
	private DataInputContainer cWidth           = null;
49
	private JRadioButton       rSize            = null;
50
	private JRadioButton       rWidthH          = null;
51
	private JComboBox          cInterpolation   = null;
45 52

  
46
	private int					MARGIN = 10;
47
	private int					wHalf = (int)Math.floor((420 - MARGIN) >> 1) - 4, hHalf = 92;
48
	private int					hData = (int)Math.floor(hHalf/3);
49

  
50
	private JPanel 				pResolution = null;
51
	private JPanel 				pOption = null;
52
	private JPanel 				pDataInput = null;
53
	private JPanel 				pRatio = null;
54
	private JPanel 				pInterpolation = null;
55
	private JPanel 				pCellSize = null;
56
	private JPanel 				pWidth = null;
57
	private JPanel 				pHeight = null;
58
	private DataInputContainer 	cCellSize = null;
59
	private DataInputContainer 	cHeight = null;
60
	private DataInputContainer 	cWidth = null;
61
	private JPanel 				pButtons = null;
62
	private JRadioButton 		rSize = null;
63
	private JRadioButton 		rWidthH = null;
64
	private JComboBox 			cInterpolation = null;
65

  
66 53
	/**
67 54
	 * This is the default constructor
68 55
	 */
......
77 64
	 * @return void
78 65
	 */
79 66
	private void initialize() {
80
		this.setLayout(new BorderLayout());
81
		this.add(getPResolution(), BorderLayout.CENTER);
82
		this.getRSize().addActionListener(this);
83
		this.getRWidthH().addActionListener(this);
84
		this.getRSize().setSelected(true);
85
		this.getCWidth().setControlEnabled(false);
86
		this.getCHeight().setControlEnabled(false);
87
	}
67
		GridBagConstraints gridBagConstraints;
88 68

  
89
	/**
90
	 * This method initializes jPanel
91
	 *
92
	 * @return javax.swing.JPanel
93
	 */
94
	private JPanel getPResolution() {
95
		if (pResolution == null) {
96
			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
97
			gridBagConstraints1.gridx = 1;
98
			gridBagConstraints1.gridy = 0;
99
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
100
			gridBagConstraints.gridx = 0;
101
			gridBagConstraints.gridy = 0;
102
			pResolution = new JPanel();
103
			pResolution.setLayout(new GridBagLayout());
104
			pResolution.add(getPOption(), gridBagConstraints);
105
			pResolution.add(getPDataInput(), gridBagConstraints1);
106
		}
107
		return pResolution;
108
	}
69
		setLayout(new java.awt.GridBagLayout());
109 70

  
110
	/**
111
	 * This method initializes jPanel
112
	 *
113
	 * @return javax.swing.JPanel
114
	 */
115
	private JPanel getPOption() {
116
		if (pOption == null) {
117
			GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
118
			gridBagConstraints6.gridx = 0;
119
			gridBagConstraints6.gridy = 1;
120
			GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
121
			gridBagConstraints2.gridx = 0;
122
			gridBagConstraints2.gridy = 0;
123
			pOption = new JPanel();
124
			pOption.setLayout(new GridBagLayout());
125
			pOption.setPreferredSize(new java.awt.Dimension(wHalf,hHalf));
126
			pOption.add(getPRatio(), gridBagConstraints2);
127
			pOption.add(getPWidth(), gridBagConstraints6);
128
		}
129
		return pOption;
130
	}
71
		gridBagConstraints = new java.awt.GridBagConstraints();
72
		gridBagConstraints.gridheight = 2;
73
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
74
		gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
75
		gridBagConstraints.weightx = 1.0;
76
		gridBagConstraints.insets = new java.awt.Insets(5, 5, 2, 2);
77
		add(getPButtons(), gridBagConstraints);
131 78

  
132
	/**
133
	 * This method initializes jPanel1
134
	 *
135
	 * @return javax.swing.JPanel
136
	 */
137
	private JPanel getPDataInput() {
138
		if (pDataInput == null) {
139
			GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
140
			gridBagConstraints5.gridx = 0;
141
			gridBagConstraints5.gridy = 2;
142
			GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
143
			gridBagConstraints4.gridx = 0;
144
			gridBagConstraints4.gridy = 1;
145
			GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
146
			gridBagConstraints3.gridx = 0;
147
			gridBagConstraints3.gridy = 0;
148
			pDataInput = new JPanel();
149
			pDataInput.setLayout(new GridBagLayout());
150
			pDataInput.setPreferredSize(new java.awt.Dimension(wHalf,hHalf));
151
			pDataInput.add(getPInterpolation(), gridBagConstraints3);
152
			pDataInput.add(getPCellSize(), gridBagConstraints4);
153
			pDataInput.add(getPHeight(), gridBagConstraints5);
154
		}
155
		return pDataInput;
156
	}
79
		gridBagConstraints = new java.awt.GridBagConstraints();
80
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
81
		gridBagConstraints.weightx = 1.0;
82
		gridBagConstraints.insets = new java.awt.Insets(5, 2, 2, 5);
83
		add(getJComboBox(), gridBagConstraints);
157 84

  
158
	/**
159
	 * This method initializes jPanel
160
	 *
161
	 * @return javax.swing.JPanel
162
	 */
163
	private JPanel getPRatio() {
164
		if (pRatio == null) {
165
			pRatio = new JPanel();
166
			FlowLayout flowLayout3 = new FlowLayout();
167
			flowLayout3.setAlignment(java.awt.FlowLayout.RIGHT);
168
			flowLayout3.setVgap(0);
169
			flowLayout3.setHgap(0);
170
			pRatio.setLayout(flowLayout3);
171
			pRatio.setPreferredSize(new java.awt.Dimension(wHalf - MARGIN, (2 * hData)));
172
			pRatio.add(getPButtons(), null);
173
		}
174
		return pRatio;
175
	}
176 85

  
177
	/**
178
	 * This method initializes jPanel
179
	 *
180
	 * @return javax.swing.JPanel
181
	 */
182
	private JPanel getPInterpolation() {
183
		if (pInterpolation == null) {
184
			FlowLayout flowLayout3 = new FlowLayout();
185
			flowLayout3.setAlignment(java.awt.FlowLayout.RIGHT);
186
			flowLayout3.setVgap(0);
187
			flowLayout3.setHgap(0);
188
			pInterpolation = new JPanel();
189
			pInterpolation.setLayout(flowLayout3);
190
			pInterpolation.setPreferredSize(new java.awt.Dimension(wHalf - MARGIN, hData));
191
			pInterpolation.add(getJComboBox(), null);
192
		}
193
		return pInterpolation;
194
	}
86
		gridBagConstraints = new java.awt.GridBagConstraints();
87
		gridBagConstraints.gridx = 1;
88
		gridBagConstraints.gridy = 1;
89
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
90
		gridBagConstraints.weightx = 1.0;
91
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 5);
92
		add(getCCellSize(), gridBagConstraints);
195 93

  
196
	/**
197
	 * This method initializes getPCellSize
198
	 *
199
	 * @return javax.swing.JPanel
200
	 */
201
	public JPanel getPCellSize() {
202
		if (pCellSize == null) {
203
			FlowLayout flowLayout3 = new FlowLayout();
204
			flowLayout3.setAlignment(java.awt.FlowLayout.RIGHT);
205
			flowLayout3.setVgap(0);
206
			flowLayout3.setHgap(0);
207
			pCellSize = new JPanel();
208
			pCellSize.setLayout(flowLayout3);
209
			pCellSize.setPreferredSize(new java.awt.Dimension(wHalf - MARGIN, hData));
210
			pCellSize.add(getCCellSize(), null);
211
		}
212
		return pCellSize;
213
	}
94
		gridBagConstraints = new java.awt.GridBagConstraints();
95
		gridBagConstraints.gridx = 0;
96
		gridBagConstraints.gridy = 2;
97
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
98
		gridBagConstraints.weightx = 1.0;
99
		gridBagConstraints.insets = new java.awt.Insets(2, 5, 5, 2);
100
		add(getCWidth(), gridBagConstraints);
214 101

  
215
	/**
216
	 * This method initializes getPHeight
217
	 *
218
	 * @return javax.swing.JPanel
219
	 */
220
	public JPanel getPHeight() {
221
		if (pHeight == null) {
222
			FlowLayout flowLayout1 = new FlowLayout();
223
			flowLayout1.setAlignment(java.awt.FlowLayout.RIGHT);
224
			flowLayout1.setHgap(0);
225
			flowLayout1.setVgap(0);
226
			pHeight = new JPanel();
227
			pHeight.setLayout(flowLayout1);
228
			pHeight.setPreferredSize(new java.awt.Dimension(wHalf - MARGIN, hData));
229
			pHeight.add(getCHeight(), null);
230
		}
231
		return pHeight;
232
	}
102
		gridBagConstraints = new java.awt.GridBagConstraints();
103
		gridBagConstraints.gridx = 1;
104
		gridBagConstraints.gridy = 2;
105
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
106
		gridBagConstraints.weightx = 1.0;
107
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 5, 5);
108
		add(getCHeight(), gridBagConstraints);
233 109

  
234
	/**
235
	 * This method initializes getPWidth
236
	 *
237
	 * @return javax.swing.JPanel
238
	 */
239
	public JPanel getPWidth() {
240
		if (pWidth == null) {
241
			FlowLayout flowLayout2 = new FlowLayout();
242
			flowLayout2.setAlignment(java.awt.FlowLayout.RIGHT);
243
			flowLayout2.setVgap(0);
244
			flowLayout2.setHgap(0);
245
			pWidth = new JPanel();
246
			pWidth.setLayout(flowLayout2);
247
			pWidth.setPreferredSize(new java.awt.Dimension(wHalf - MARGIN, hData));
248
			pWidth.add(getCWidth(), null);
249
		}
250
		return pWidth;
110
		getRSize().addActionListener(this);
111
		getRWidthH().addActionListener(this);
112
		getRSize().setSelected(true);
113
		getCWidth().setControlEnabled(false);
114
		getCHeight().setControlEnabled(false);
251 115
	}
252 116

  
253 117
	/**
......
300 164
	private JPanel getPButtons() {
301 165
		if (pButtons == null) {
302 166
			pButtons = new JPanel();
303
			FlowLayout flowLayout2 = new FlowLayout();
304
			flowLayout2.setAlignment(java.awt.FlowLayout.LEFT);
305
			flowLayout2.setVgap(2);
306
			flowLayout2.setHgap(5);
307
			pButtons.setLayout(flowLayout2);
167
			pButtons.setLayout(new java.awt.GridBagLayout());
308 168
			pButtons.setPreferredSize(new java.awt.Dimension(wHalf - 10, (2 * hData) - 6));
309 169
			pButtons.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
310
			pButtons.add(getRSize(), null);
311
			pButtons.add(getRWidthH(), null);;
170

  
171
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
172
			gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
173
			gridBagConstraints.weightx = 1.0;
174
			gridBagConstraints.insets = new java.awt.Insets(5, 5, 2, 0);
175
			pButtons.add(getRSize(), gridBagConstraints);
176

  
177
			gridBagConstraints = new java.awt.GridBagConstraints();
178
			gridBagConstraints.gridx = 0;
179
			gridBagConstraints.gridy = 1;
180
			gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
181
			gridBagConstraints.weightx = 1.0;
182
			gridBagConstraints.insets = new java.awt.Insets(2, 5, 5, 0);
183
			pButtons.add(getRWidthH(), gridBagConstraints);;
312 184
		}
313 185
		return pButtons;
314 186
	}
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/cutting/ui/CuttingPanel.java
306 306
		GridBagConstraints gridBagConstraints = new GridBagConstraints();
307 307
		gridBagConstraints.gridx = 0;
308 308
		gridBagConstraints.gridy = 0;
309
		gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
310
		gridBagConstraints.weightx = 1.0;
309 311
		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
310 312
		gridBagConstraints1.gridx = 0;
311 313
		gridBagConstraints1.gridy = 1;
314
		gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
315
		gridBagConstraints1.weightx = 1.0;
316

  
312 317
		GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
313 318
		gridBagConstraints2.gridx = 0;
314 319
		gridBagConstraints2.gridy = 2;
320
		gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST;
315 321
		gridBagConstraints2.insets = new java.awt.Insets(5, 0, 0, 0);
316 322

  
317 323
		JPanel jpanel1 = new JPanel();
trunk/extensions/extRasterTools-SE/src/org/gvsig/fmap/layers/FLyrRasterSE.java
46 46
import org.gvsig.raster.dataset.NotSupportedExtensionException;
47 47
import org.gvsig.raster.dataset.RasterDataset;
48 48
import org.gvsig.raster.dataset.RasterDriverException;
49
import org.gvsig.raster.dataset.io.rmf.RmfBlocksManager;
50 49
import org.gvsig.raster.dataset.properties.DatasetMetadata;
51 50
import org.gvsig.raster.grid.Grid;
52 51
import org.gvsig.raster.grid.GridPalette;
......
107 106
	private int                   r                  = 0;
108 107
	private int                   g                  = 0;
109 108
	private int                   b                  = 0;
110
		
111 109

  
110

  
112 111
	static {
113 112
		 RasterLibrary.wakeUp();
114 113
	}
......
147 146
	public Object getLoadParams() {
148 147
		return params;
149 148
	}
150
	
149

  
151 150
	/**
152 151
	 * Redefine wakeUp de FLyrDefault
153 152
	 */
......
209 208

  
210 209
	/**
211 210
	 * Crea el objeto renderizador de raster
212
	 * @return Rendering 
211
	 * @return Rendering
213 212
	 */
214 213
	public Rendering getRender() {
215 214
		if (render == null)
......
715 714
		} catch (IOException e) {
716 715
			//No se ha salvado nada
717 716
		}
718
		
717

  
719 718
		//Cierra todas las ventanas asociadas a la capa
720 719
		IWindow[] wList = PluginServices.getMDIManager().getAllWindows();
721 720
		for (int i = 0; i < wList.length; i++) {
......
723 722
			if( name != null && name.compareTo(getName()) == 0)
724 723
				PluginServices.getMDIManager().closeWindow(wList[i]);
725 724
		}
726
		
725

  
727 726
		if (this.isRemoveRasterFlag()) {
728 727
			dataset.close();
729 728
			this.setRemoveRasterFlag(true);
......
1002 1001

  
1003 1002
	/**
1004 1003
	 * Obtiene el grid de la capa completa. Hay que tener cuidado porque cuando se hace esta
1005
	 * petici?n se carga un buffer con todos los datos de la capa. Este buffer puede ser 
1004
	 * petici?n se carga un buffer con todos los datos de la capa. Este buffer puede ser
1006 1005
	 * cacheado o no dependiendo del tama?o de esta.
1007 1006
	 * @param interpolated true si se solicita un grid interpolado y false si se solicita sin interpolar.
1008 1007
	 * @return Grid.

Also available in: Unified diff