Revision 20840

View differences:

trunk/extensions/extRasterTools-SE/src/org/gvsig/raster/gui/wizards/FileOpenRaster.java
27 27
import org.cresques.cts.IProjection;
28 28
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
29 29
import org.gvsig.raster.Configuration;
30
import org.gvsig.raster.RasterProcess;
31
import org.gvsig.raster.UniqueProcessQueue;
32 30
import org.gvsig.raster.gui.wizards.projection.RasterProjectionActionsDialog;
33 31
import org.gvsig.raster.gui.wizards.projection.RasterProjectionActionsPanel;
34 32
import org.gvsig.raster.util.RasterToolsUtil;
35 33
import org.gvsig.raster.util.RasterUtilities;
36 34
import org.gvsig.rastertools.RasterModule;
37 35
import org.gvsig.rastertools.geolocation.ui.GeoLocationOpeningRasterDialog;
38
import org.gvsig.rastertools.overviews.OverviewsProcess;
39 36
import org.gvsig.rastertools.raw.ui.main.OpenRawFileDefaultView;
40 37
import org.kxml2.io.KXmlParser;
41 38
import org.xmlpull.v1.XmlPullParser;
......
122 119
			lyrRaster = FLyrRasterSE.createLayer(file.getName(), file, null);
123 120
			
124 121
			// Si hay que generar las overviews por el panel de preferencias
125
			if (Configuration.getValue("overviews_ask_before_loading", Boolean.FALSE).booleanValue() == true) {
126
				try {
127
					boolean generate = false;
128
					for (int i = 0; i < lyrRaster.getFileCount(); i++) {
129
						if (lyrRaster.getDataSource().getDataset(i)[0].getOverviewCount(0) == 0) {
130
							generate = true;
131
							break;
132
						}
133
					}
134
					if (generate) {
135
						if (firstTaskOverview) {
136
							execOverview = RasterToolsUtil.messageBoxYesOrNot("generar_overviews", this);
137
							firstTaskOverview = false;
138
						}
139
					
140
						if (execOverview) {
141
							RasterProcess process = new OverviewsProcess();
142
							process.setCancelable(false);
143
							process.addParam("layer", (FLyrRasterSE) lyrRaster);
144
							UniqueProcessQueue.getSingleton().add(process);
145
						}
146
					}
147
				} catch (Exception e) {
148
					// Si no se puede generar la overview no hacemos nada
149
				}
150
			}
122
//			if (Configuration.getValue("overviews_ask_before_loading", Boolean.FALSE).booleanValue() == true) {
123
//				try {
124
//					boolean generate = false;
125
//					for (int i = 0; i < lyrRaster.getFileCount(); i++) {
126
//						if (lyrRaster.getDataSource().getDataset(i)[0].getOverviewCount(0) == 0) {
127
//							generate = true;
128
//							break;
129
//						}
130
//					}
131
//					if (generate) {
132
//						if (firstTaskOverview) {
133
//							execOverview = RasterToolsUtil.messageBoxYesOrNot("generar_overviews", this);
134
//							firstTaskOverview = false;
135
//						}
136
//					
137
//						if (execOverview) {
138
//							RasterProcess process = new OverviewsProcess();
139
//							process.setCancelable(false);
140
//							process.addParam("layer", (FLyrRasterSE) lyrRaster);
141
//							UniqueProcessQueue.getSingleton().add(process);
142
//						}
143
//					}
144
//				} catch (Exception e) {
145
//					// Si no se puede generar la overview no hacemos nada
146
//				}
147
//			}
151 148

  
152 149
			//Mostramos el cuadro que pide la georreferenciaci?n si la capa no tiene y si la opci?n est? activa en preferencias
153 150
			if(RasterModule.askCoordinates) {
trunk/extensions/extRasterTools-SE/src/org/gvsig/raster/gui/preferences/panels/PreferenceOverviews.java
24 24

  
25 25
import javax.swing.BorderFactory;
26 26
import javax.swing.DefaultComboBoxModel;
27
import javax.swing.JCheckBox;
28 27
import javax.swing.JComboBox;
29 28
import javax.swing.JLabel;
30 29

  
......
39 38
 * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
40 39
 */
41 40
public class PreferenceOverviews extends PanelBase {
42
	private JCheckBox jCheckBoxAsk      = null;
41
//	private JCheckBox jCheckBoxAsk      = null;
43 42
	private JComboBox comboBoxRate      = null;
44 43
	private JComboBox comboBoxNumber    = null;
45 44
	private JComboBox comboBoxAlgorithm = null;
......
60 59
		getLabelNumber().setText(getText(this, "num_overviews") + ":");
61 60
		getLabelRate().setText(getText(this, "proporcion_overviews") + ":");
62 61
		getLabelAlgorithm().setText(getText(this, "algorithm") + ":");
63
		getCheckBoxAsk().setText(getText(this, "generacion_overviews"));
64
		getCheckBoxAsk().setToolTipText(getCheckBoxAsk().getText());
62
//		getCheckBoxAsk().setText(getText(this, "generacion_overviews"));
63
//		getCheckBoxAsk().setToolTipText(getCheckBoxAsk().getText());
65 64
		getComboAlgorithm().setModel(new DefaultComboBoxModel(new String[] { getText(this, "vecino_cercano"), getText(this, "media"), getText(this, "media_phase") }));
66 65
	}
67 66

  
......
70 69

  
71 70
		getPanel().setLayout(new GridBagLayout());
72 71

  
73
		gridBagConstraints = new GridBagConstraints();
74
		gridBagConstraints.gridwidth = 2;
75
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
76
		gridBagConstraints.weightx = 1.0;
77
		gridBagConstraints.insets = new Insets(5, 5, 2, 5);
78
		getPanel().add(getCheckBoxAsk(), gridBagConstraints);
72
		int posy = 0;
73
		
74
//		gridBagConstraints = new GridBagConstraints();
75
//		gridBagConstraints.gridx = 0;
76
//		gridBagConstraints.gridy = posy;
77
//		gridBagConstraints.gridwidth = 2;
78
//		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
79
//		gridBagConstraints.weightx = 1.0;
80
//		gridBagConstraints.insets = new Insets(5, 5, 2, 5);
81
//		getPanel().add(getCheckBoxAsk(), gridBagConstraints);
79 82

  
83
//		posy++;
80 84
		gridBagConstraints = new GridBagConstraints();
81 85
		gridBagConstraints.gridx = 0;
82
		gridBagConstraints.gridy = 1;
86
		gridBagConstraints.gridy = posy;
83 87
		gridBagConstraints.anchor = GridBagConstraints.EAST;
84 88
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
85 89
		getPanel().add(getLabelNumber(), gridBagConstraints);
86 90

  
87 91
		gridBagConstraints = new GridBagConstraints();
88 92
		gridBagConstraints.gridx = 1;
89
		gridBagConstraints.gridy = 1;
93
		gridBagConstraints.gridy = posy;
90 94
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
91 95
		gridBagConstraints.anchor = GridBagConstraints.WEST;
92 96
		gridBagConstraints.weightx = 1.0;
93 97
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
94 98
		getPanel().add(getComboNumber(), gridBagConstraints);
95 99

  
100
		posy++;
96 101
		gridBagConstraints = new GridBagConstraints();
97 102
		gridBagConstraints.gridx = 0;
98
		gridBagConstraints.gridy = 2;
103
		gridBagConstraints.gridy = posy;
99 104
		gridBagConstraints.anchor = GridBagConstraints.EAST;
100 105
		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
101 106
		getPanel().add(getLabelRate(), gridBagConstraints);
102 107

  
103 108
		gridBagConstraints = new GridBagConstraints();
104 109
		gridBagConstraints.gridx = 1;
105
		gridBagConstraints.gridy = 2;
110
		gridBagConstraints.gridy = posy;
106 111
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
107 112
		gridBagConstraints.anchor = GridBagConstraints.WEST;
108 113
		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
109 114
		getPanel().add(getComboRate(), gridBagConstraints);
110 115

  
116
		posy++;
111 117
		gridBagConstraints = new GridBagConstraints();
112 118
		gridBagConstraints.gridx = 0;
113
		gridBagConstraints.gridy = 3;
119
		gridBagConstraints.gridy = posy;
114 120
		gridBagConstraints.anchor = GridBagConstraints.EAST;
115 121
		gridBagConstraints.insets = new Insets(2, 5, 5, 2);
116 122
		getPanel().add(getLabelAlgorithm(), gridBagConstraints);
117 123

  
118 124
		gridBagConstraints = new GridBagConstraints();
119 125
		gridBagConstraints.gridx = 1;
120
		gridBagConstraints.gridy = 3;
126
		gridBagConstraints.gridy = posy;
121 127
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
122 128
		gridBagConstraints.anchor = GridBagConstraints.WEST;
123 129
		gridBagConstraints.insets = new Insets(2, 2, 5, 5);
......
142 148
		return labelNumber;
143 149
	}
144 150

  
145
	private JCheckBox getCheckBoxAsk() {
146
		if (jCheckBoxAsk == null) {
147
			jCheckBoxAsk = new JCheckBox();
148
			jCheckBoxAsk.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
149
			jCheckBoxAsk.setMargin(new Insets(0, 0, 0, 0));
150
		}
151
		return jCheckBoxAsk;
152
	}
151
//	private JCheckBox getCheckBoxAsk() {
152
//		if (jCheckBoxAsk == null) {
153
//			jCheckBoxAsk = new JCheckBox();
154
//			jCheckBoxAsk.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
155
//			jCheckBoxAsk.setMargin(new Insets(0, 0, 0, 0));
156
//		}
157
//		return jCheckBoxAsk;
158
//	}
153 159

  
154 160
	private JComboBox getComboRate() {
155 161
		if (comboBoxRate == null) {
......
178 184
	 */
179 185
	public void initializeDefaults() {
180 186
		int pos = 0;
181
		getCheckBoxAsk().setSelected(((Boolean) Configuration.getDefaultValue("overviews_ask_before_loading")).booleanValue());
187
//		getCheckBoxAsk().setSelected(((Boolean) Configuration.getDefaultValue("overviews_ask_before_loading")).booleanValue());
182 188

  
183 189
		pos = ((Integer) Configuration.getDefaultValue("overviews_number")).intValue() - 2;
184 190
		if ((pos < 0) || (pos >= getComboNumber().getItemCount()))
......
208 214
	 */
209 215
	public void initializeValues() {
210 216
		int pos = 0;
211
		getCheckBoxAsk().setSelected(Configuration.getValue("overviews_ask_before_loading", Boolean.FALSE).booleanValue());
217
//		getCheckBoxAsk().setSelected(Configuration.getValue("overviews_ask_before_loading", Boolean.FALSE).booleanValue());
212 218

  
213 219
		pos = Configuration.getValue("overviews_number", Integer.valueOf(4)).intValue() - 2;
214 220
		if ((pos < 0) || (pos >= getComboNumber().getItemCount()))
......
237 243
	 * Guarda los valores definidos por el usuario
238 244
	 */
239 245
	public void storeValues() {
240
		Configuration.setValue("overviews_ask_before_loading", Boolean.valueOf(getCheckBoxAsk().isSelected()));
246
//		Configuration.setValue("overviews_ask_before_loading", Boolean.valueOf(getCheckBoxAsk().isSelected()));
241 247
		if (getComboRate().getSelectedIndex() > -1)
242 248
			Configuration.setValue("overviews_rate", Integer.valueOf(getComboRate().getSelectedIndex() + 2));
243 249
		if (getComboNumber().getSelectedIndex() > -1)
trunk/extensions/extRasterTools-SE/src/org/gvsig/raster/beans/createlayer/CreateLayerPanel.java
50 50
 * @version 10/03/2008
51 51
 * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
52 52
 */
53
public class CreateLayerPanel extends JPanel implements PropertyListener {
53
public class CreateLayerPanel implements PropertyListener {
54 54
	private static final long serialVersionUID = 3921564127360827156L;
55
	private JPanel       panel             = null;
55 56
	private JRadioButton jRBOnlyView       = null;
56 57
	private JRadioButton jRBNewLayer       = null;
57 58
	private JRadioButton jRBFileGenerate   = null;
58 59
	private JRadioButton jRBOpenMemory     = null;
59

  
60 60
	private JPanel       jPNameFile        = null;
61 61
	private JLabel       labelFilename     = null;
62 62
	private JTextField   filenameTextField = null;
......
69 69
		initialize();
70 70
		translate();
71 71
	}
72
	
73
	/**
74
	 * Devuelve el panel principal
75
	 * @return
76
	 */
77
	public JPanel getJPanel() {
78
		if (panel == null) {
79
			panel = new JPanel();
80
		}
81
		return panel;
82
	}
72 83

  
73 84
	/**
74 85
	 * Seccion donde ir?n todas las traducciones invariables del componente
......
86 97
		ButtonGroup buttonGroup2;
87 98
		GridBagConstraints gridBagConstraints;
88 99

  
89
		setLayout(new GridBagLayout());
100
		getJPanel().setLayout(new GridBagLayout());
90 101
		
91 102
		buttonGroup1 = new ButtonGroup();
92 103
		buttonGroup1.add(getRadioOnlyView());
......
96 107
		gridBagConstraints.gridy = 0;
97 108
		gridBagConstraints.anchor = GridBagConstraints.WEST;
98 109
		gridBagConstraints.insets = new Insets(3, 3, 3, 3);
99
		add(getRadioOnlyView(), gridBagConstraints);
110
		getJPanel().add(getRadioOnlyView(), gridBagConstraints);
100 111

  
101 112
		buttonGroup1.add(getRadioNewLayer());
102 113

  
......
105 116
		gridBagConstraints.gridy = 1;
106 117
		gridBagConstraints.anchor = GridBagConstraints.WEST;
107 118
		gridBagConstraints.insets = new Insets(3, 3, 3, 3);
108
		add(getRadioNewLayer(), gridBagConstraints);
119
		getJPanel().add(getRadioNewLayer(), gridBagConstraints);
109 120
		
110 121
		JPanel jPanel2 = new JPanel();
111 122
		jPanel2.setLayout(new GridBagLayout());
......
132 143
		gridBagConstraints.gridy = 2;
133 144
		gridBagConstraints.anchor = GridBagConstraints.WEST;
134 145
		gridBagConstraints.insets = new Insets(3, 3, 3, 3);
135
		add(jPanel2, gridBagConstraints);
146
		getJPanel().add(jPanel2, gridBagConstraints);
136 147
	}
137 148
	
138 149
	/**
......
178 189
	 * Devuelve el JRadioButton de Abrir en memoria
179 190
	 * @return
180 191
	 */
181
	public JRadioButton getRadioOpenMemory() {
192
	private JRadioButton getRadioOpenMemory() {
182 193
		if (jRBOpenMemory == null) {
183 194
			jRBOpenMemory = new JRadioButton();
184 195
			jRBOpenMemory.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
......
198 209
	 * Devuelve el JRadioButton de generar fichero
199 210
	 * @return
200 211
	 */
201
	public JRadioButton getRadioFileGenerate() {
212
	private JRadioButton getRadioFileGenerate() {
202 213
		if (jRBFileGenerate == null) {
203 214
			jRBFileGenerate = new JRadioButton();
204 215
			jRBFileGenerate.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
......
211 222
	 * Devuelve el JRadioButton de Solo vista
212 223
	 * @return
213 224
	 */
214
	public JRadioButton getRadioOnlyView() {
225
	private JRadioButton getRadioOnlyView() {
215 226
		if (jRBOnlyView == null) {
216 227
			jRBOnlyView = new JRadioButton();
217 228
			jRBOnlyView.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
......
224 235
	 * Devuelve el JRadioButton de nueva capa
225 236
	 * @return
226 237
	 */
227
	public JRadioButton getRadioNewLayer() {
238
	private JRadioButton getRadioNewLayer() {
228 239
		if (jRBNewLayer == null) {
229 240
			jRBNewLayer = new JRadioButton();
230 241
			jRBNewLayer.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
......
244 255
	 *
245 256
	 * @return javax.swing.JTextField
246 257
	 */
247
	public JTextField getFilenameTextField() {
258
	private JTextField getFilenameTextField() {
248 259
		if (filenameTextField == null) {
249 260
			filenameTextField = new JTextField();
250 261
			filenameTextField.setPreferredSize(new Dimension(150, filenameTextField.getPreferredSize().height));
......
253 264
		return filenameTextField;
254 265
	}
255 266

  
256
	public JLabel getLabelFilename() {
267
	private JLabel getLabelFilename() {
257 268
		if (labelFilename == null) {
258 269
			labelFilename = new JLabel();
259 270
		}
......
293 304
		getFilenameTextField().setEnabled(value);
294 305
		getLabelFilename().setEnabled(value);
295 306
	}
307
	
308
	/**
309
	 * Establece el texto de la etiqueta del nombre de fichero
310
	 * @param text
311
	 */
312
	public void setLabelFilename(String text) {
313
		getLabelFilename().setText(text);
314
	}
315
	
316
	public boolean isNewLayerSelected() {
317
		return getRadioNewLayer().isSelected();
318
	}
296 319

  
320
	public boolean isOnlyViewSelected() {
321
		return getRadioOnlyView().isSelected();
322
	}
323

  
297 324
	/**
298 325
	 * Cuando alguien ha cambiado la propiedad del nombre de la 
299 326
	 * capa se actualiza autom?ticamente
......
328 355
			for (int i = 0; i < extList.length; i++)
329 356
				chooser.addChoosableFileFilter(new ExtendedFileFilter(extList[i]));
330 357

  
331
			if (chooser.showOpenDialog(this) != JFileChooser.APPROVE_OPTION)
358
			if (chooser.showOpenDialog(getJPanel()) != JFileChooser.APPROVE_OPTION)
332 359
				return null;
333 360

  
334 361
			FileOpenWizard.setLastPath(chooser.getSelectedFile().getPath().substring(0, chooser.getSelectedFile().getPath().lastIndexOf(File.separator)));
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/overviews/OverviewsTocMenuEntry.java
26 26
import org.gvsig.fmap.raster.layers.FLyrRasterSE;
27 27
import org.gvsig.fmap.raster.layers.ILayerState;
28 28
import org.gvsig.fmap.raster.layers.IRasterLayerActions;
29
import org.gvsig.raster.IProcessActions;
29 30
import org.gvsig.raster.RasterProcess;
30 31
import org.gvsig.raster.dataset.BandAccessException;
31 32
import org.gvsig.raster.dataset.io.RasterDriverException;
......
33 34
import org.gvsig.raster.util.RasterToolsUtil;
34 35

  
35 36
import com.iver.andami.PluginServices;
37
import com.iver.cit.gvsig.exceptions.layers.ReloadLayerException;
36 38
import com.iver.cit.gvsig.fmap.layers.FLayer;
37 39
import com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction;
38 40
import com.iver.cit.gvsig.project.documents.view.toc.ITocItem;
39

  
40 41
/**
41 42
 * Herramienta del men? contextual para la generaci?n de overviews.
42 43
 * 
43 44
 * 10-dic-2007
44 45
 * @author Nacho Brodin (nachobrodin@gmail.com)
45 46
 */
46
public class OverviewsTocMenuEntry extends AbstractTocContextMenuAction implements PropertyChangeListener, IGenericToolBarMenuItem {
47
public class OverviewsTocMenuEntry extends AbstractTocContextMenuAction implements PropertyChangeListener, IGenericToolBarMenuItem, IProcessActions {
47 48
	static private OverviewsTocMenuEntry singleton  = null;
48 49

  
49 50
	/**
......
131 132
	 */
132 133
	public void execute(ITocItem item, FLayer[] selectedItems) {		
133 134
		FLayer lyr = selectedItems[0];
134
		if(lyr instanceof FLyrRasterSE) {
135
			if(RasterToolsUtil.messageBoxYesOrNot("sobreescribir_datos_overview", this)) {
136
				
135
		if (lyr instanceof FLyrRasterSE) {
136
			if (RasterToolsUtil.messageBoxYesOrNot("sobreescribir_datos_overview", this)) {
137

  
137 138
				try {
138
					if(((FLyrRasterSE)lyr).getDataSource().getOverviewCount(0) > 0 ) {
139
						if(!RasterToolsUtil.messageBoxYesOrNot("sobreescribir_overviews", this))
139
					if (((FLyrRasterSE) lyr).getDataSource().getOverviewCount(0) > 0) {
140
						if (!RasterToolsUtil.messageBoxYesOrNot("sobreescribir_overviews", this))
140 141
							return;
141 142
					}
142 143
				} catch (BandAccessException e) {
143
					//Actuamos como si no tubiera overviews pero salvamos un Log
144
					// Actuamos como si no tubiera overviews pero salvamos un Log
144 145
					RasterToolsUtil.debug("Error accediendo a la banda en getOverViewCount", this, e);
145
					
146

  
146 147
				} catch (RasterDriverException e) {
147
					//Actuamos como si no tubiera overviews pero salvamos un Log
148
					// Actuamos como si no tubiera overviews pero salvamos un Log
148 149
					RasterToolsUtil.debug("Error en getOverViewCount", this, e);
149 150
				}
150
				
151

  
151 152
				RasterProcess process = new OverviewsProcess();
152
				process.addParam("layer", (FLyrRasterSE)lyr);
153
				process.addParam("layer", (FLyrRasterSE) lyr);
153 154
				process.setCancelable(false);
155
				process.setActions(this);
154 156
				process.start();
155 157
			}
156 158
		}
......
164 166
		return PluginServices.getIconTheme().get("overviews-icon");
165 167
	}
166 168

  
169
	/*
170
	 * (non-Javadoc)
171
	 * @see org.gvsig.raster.IProcessActions#end(java.lang.Object)
172
	 */
173
	public void end(Object param) {
174
		try {
175
			((FLyrRasterSE) param).reload();
176
		} catch (ReloadLayerException e) {
177
		}
178
//		try {
179
//			FLyrRasterSE layer = (FLyrRasterSE) param;
180
//			MapContext context = layer.getMapContext();
181
//			context.getLayers().removeLayer(layer);
182
//			layer = FLyrRasterSE.createLayer(layer.getName(), layer.getLoadParams(), layer.getProjection());
183
//			context.getLayers().addLayer(layer);
184
//		} catch (Exception e) {
185
//		}
186
	}
187

  
167 188
	public void propertyChange(PropertyChangeEvent evt) {}
189
	public void interrupted() {}
168 190
}
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/overviews/OverviewsProcess.java
76 76
				insertLineLog(" Dataset: " + i);
77 77
				build.buildOverviews(resamplingAlg, rasterSE.getFileName()[i], overviews);
78 78
			}
79
			if (externalActions != null)
80
				externalActions.end(rasterSE);
79 81
		} catch (BuildingOverviewsException e) {
80 82
			Logger.getLogger(this.getClass().getName()).debug("No se han podido generar las overviews", e);
81 83
		} catch (WritingException e) {
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/enhanced/ui/EnhancedDialog.java
99 99
			list.add(graphicsPanel);
100 100
			
101 101
			JPanel downPreview = new JPanel();
102
			getNewOrSaveLayerPanel().getLabelFilename().setText("");
102
			getNewOrSaveLayerPanel().setLabelFilename("");
103 103
			downPreview.setLayout(new GridBagLayout());
104 104
			
105 105
			GridBagConstraints gridBagConstraints = new GridBagConstraints();
106 106
			gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
107
			downPreview.add(getNewOrSaveLayerPanel(), gridBagConstraints);
107
			downPreview.add(getNewOrSaveLayerPanel().getJPanel(), gridBagConstraints);
108 108
			
109 109
			gridBagConstraints = new GridBagConstraints();
110 110
			gridBagConstraints.gridx = 0;
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/enhanced/ui/EnhancedListener.java
441 441
			return;
442 442

  
443 443
		String path = null;
444
		if (!enhancedDialog.getNewOrSaveLayerPanel().getRadioOnlyView().isSelected()) {
444
		if (!enhancedDialog.getNewOrSaveLayerPanel().isOnlyViewSelected()) {
445 445
			path = enhancedDialog.getNewOrSaveLayerPanel().getFileSelected();
446 446
			if (path == null)
447 447
				return;
......
453 453
		// Array para guardar los filtros que se van a usar en forma de ParamStruct
454 454
		ArrayList listFilterUsed = enhancedDialog.getFilteredPreview().applyFilters(rendering);
455 455

  
456
		if (enhancedDialog.getNewOrSaveLayerPanel().getRadioOnlyView().isSelected()) {
456
		if (enhancedDialog.getNewOrSaveLayerPanel().isOnlyViewSelected()) {
457 457
			try {
458 458
				FilterProcess.addSelectedFilters(rendering.getRenderFilterList(), listFilterUsed);
459 459
				((FLyrRasterSE) enhancedDialog.getLayer()).setRenderFilterList(rendering.getRenderFilterList());
......
486 486
	 * Este m?todo es llamado por el thread TailRasterProcess al finalizar.
487 487
	 */
488 488
	public void loadLayerInToc(String fileName) {
489
		if (!enhancedDialog.getNewOrSaveLayerPanel().getRadioNewLayer().isSelected())
489
		if (!enhancedDialog.getNewOrSaveLayerPanel().isNewLayerSelected())
490 490
			return;
491 491
		if(!new File(fileName).exists())
492 492
			return;
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/filter/FilterListener.java
326 326
			return;
327 327

  
328 328
		String path = null;
329
		if (!getFilterDialog().getNewLayerPanel().getRadioOnlyView().isSelected()) {
329
		if (!getFilterDialog().getNewLayerPanel().isOnlyViewSelected()) {
330 330
			path = getFilterDialog().getNewLayerPanel().getFileSelected();
331 331
			if (path == null)
332 332
				return;
......
338 338
		// Array para guardar los filtros que se van a usar en forma de ParamStruct
339 339
		ArrayList listFilterUsed = applyFilters(rendering);
340 340

  
341
		if (filterDialog.getNewLayerPanel().getRadioOnlyView().isSelected()) {
341
		if (filterDialog.getNewLayerPanel().isOnlyViewSelected()) {
342 342
			try {
343 343
				FilterProcess.addSelectedFilters(rendering.getRenderFilterList(), listFilterUsed);
344 344
				((FLyrRasterSE) getFilterDialog().getLayer()).setRenderFilterList(rendering.getRenderFilterList());
......
370 370
	 * Este m?todo es llamado por el thread TailRasterProcess al finalizar.
371 371
	 */
372 372
	public void loadLayerInToc(String fileName) {
373
		if (!getFilterDialog().getNewLayerPanel().getRadioNewLayer().isSelected())
373
		if (!getFilterDialog().getNewLayerPanel().isNewLayerSelected())
374 374
			return;
375 375
		if(!new File(fileName).exists())
376 376
			return;
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/filter/ui/FilterPanel.java
151 151
			gridBagConstraints.gridy = 4;
152 152
			gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
153 153
			gridBagConstraints.insets = new Insets(3, 3, 3, 3);
154
			jPanelOptions.add(getNewLayerPanel(), gridBagConstraints);
154
			jPanelOptions.add(getNewLayerPanel().getJPanel(), gridBagConstraints);
155 155

  
156 156
			gridBagConstraints = new GridBagConstraints();
157 157
			gridBagConstraints.gridx = 0;
trunk/extensions/extRasterTools-SE/src/org/gvsig/fmap/raster/layers/FLyrRasterSE.java
86 86
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
87 87
import com.iver.andami.PluginServices;
88 88
import com.iver.cit.gvsig.exceptions.layers.LoadLayerException;
89
import com.iver.cit.gvsig.exceptions.layers.ReloadLayerException;
89 90
import com.iver.cit.gvsig.fmap.ViewPort;
90 91
import com.iver.cit.gvsig.fmap.core.FShape;
91 92
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
......
1619 1620
					return false;
1620 1621
				break;
1621 1622
			case IRasterLayerActions.CREATEOVERVIEWS:
1622
				if (getDataSource().overviewsSupport())
1623
				if ((getDataSource() != null) && (getDataSource().overviewsSupport()))
1623 1624
					return true;
1624 1625
				else
1625 1626
					return false;
......
1791 1792
	static public void setConfiguration(IConfiguration configuration) {
1792 1793
		FLyrRasterSE.configuration = configuration;
1793 1794
	}
1795
	
1796
	/*
1797
	 * (non-Javadoc)
1798
	 * @see com.iver.cit.gvsig.fmap.layers.FLyrDefault#reload()
1799
	 */
1800
	public void reload() throws ReloadLayerException {
1801
		try {
1802
			super.reload();
1803
			load();
1804
			getMapContext().invalidate();
1805
		} catch (LoadLayerException e) {
1806
			setAvailable(false);
1807
			throw new ReloadLayerException(getName(), e);
1808
		}
1809
	}
1794 1810

  
1795 1811
	/*****************************************************/
1796 1812

  

Also available in: Unified diff