Revision 8464 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/gui/preferencespage/ViewPage.java

View differences:

ViewPage.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.4.4.3  2006-10-31 17:09:59  luisw2
46
* Revision 1.4.4.4  2006-10-31 17:45:13  luisw2
47
* *** empty log message ***
48
*
49
* Revision 1.4.4.3  2006/10/31 17:09:59  luisw2
47 50
* Cambio de selecci?n de proyecci?nes al Panel extensible
48 51
*
49 52
* Revision 1.4.4.2  2006/09/29 14:12:56  luisw2
......
175 178
		id = this.getClass().getName();
176 179
		icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/Vista.png"));
177 180

  
178

  
179
		// default projection
180
		addComponent(getJPanelProj());
181
/*		lblDefaultProjection = new JLabel();
182
		lblDefaultProjection.setFont(new java.awt.Font(
183
			fontName, java.awt.Font.BOLD, 11));
184
		btnChangeProjection = new JButton(PluginServices.getText(this, "change"));
185
		btnChangeProjection.addActionListener(new ActionListener() {
186
			public void actionPerformed(ActionEvent e) {
187
				CSSelectionDialog csSelect = new CSSelectionDialog();
188
				csSelect.setProjection(	CRSFactory.getCRS(
189
						lblDefaultProjection.getText()));
190
				PluginServices.getMDIManager().addWindow(csSelect);
191

  
192
		        if (csSelect.isOkPressed()) {
193
		        	IProjection proj = csSelect.getProjection();
194
		        	lblDefaultProjection.setText(proj.getAbrev());
195
		        }
196
			}
197
		});
198
		addComponent(PluginServices.getText(this, "default_projection") + ":", lblDefaultProjection );
199
		JPanel aux = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
200
		aux.add(btnChangeProjection);
201
		addComponent("", aux);*/
202

  
203
		// just a separator
204
		addComponent(new JLabel(" "));
205

  
206
		// Adding Invisible New Layers
207
		chkInvisibleNewLayers = new JCheckBox(
208
				PluginServices.getText(this, "options.view.invisible_new_layers"));
209

  
210
		addComponent("", chkInvisibleNewLayers);
211
		chkKeepScaleOnResizing = new JCheckBox(
212
				PluginServices.getText(this, "options.view.keep_scale_on_resizing"));
213
		chkKeepScaleOnResizing.setEnabled(false);
214
		addComponent("", chkKeepScaleOnResizing);
215

  
216
		// just a separator
217
		addComponent(new JLabel(" "));
218

  
219
		// zoom in factor
220
		addComponent(PluginServices.getText(this, "zoom_in_factor") + ":",
221
			txtZoomInFactor = new JTextField("", 15));
222
		// zoom out factor
223
		addComponent(PluginServices.getText(this, "zoom_out_factor") + ":",
224
			txtZoomOutFactor = new JTextField("", 15));
225

  
226
		initializeValues();
227 181
	}
228 182

  
229 183
	/**
......
306 260
	}
307 261

  
308 262
	public JPanel getPanel() {
263
		// default projection
264
		addComponent(getJPanelProj());
265
/*		lblDefaultProjection = new JLabel();
266
		lblDefaultProjection.setFont(new java.awt.Font(
267
			fontName, java.awt.Font.BOLD, 11));
268
		btnChangeProjection = new JButton(PluginServices.getText(this, "change"));
269
		btnChangeProjection.addActionListener(new ActionListener() {
270
			public void actionPerformed(ActionEvent e) {
271
				CSSelectionDialog csSelect = new CSSelectionDialog();
272
				csSelect.setProjection(	CRSFactory.getCRS(
273
						lblDefaultProjection.getText()));
274
				PluginServices.getMDIManager().addWindow(csSelect);
275

  
276
		        if (csSelect.isOkPressed()) {
277
		        	IProjection proj = csSelect.getProjection();
278
		        	lblDefaultProjection.setText(proj.getAbrev());
279
		        }
280
			}
281
		});
282
		addComponent(PluginServices.getText(this, "default_projection") + ":", lblDefaultProjection );
283
		JPanel aux = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
284
		aux.add(btnChangeProjection);
285
		addComponent("", aux);*/
286

  
287
		// just a separator
288
		addComponent(new JLabel(" "));
289

  
290
		// Adding Invisible New Layers
291
		chkInvisibleNewLayers = new JCheckBox(
292
				PluginServices.getText(this, "options.view.invisible_new_layers"));
293

  
294
		addComponent("", chkInvisibleNewLayers);
295
		chkKeepScaleOnResizing = new JCheckBox(
296
				PluginServices.getText(this, "options.view.keep_scale_on_resizing"));
297
		chkKeepScaleOnResizing.setEnabled(false);
298
		addComponent("", chkKeepScaleOnResizing);
299

  
300
		// just a separator
301
		addComponent(new JLabel(" "));
302

  
303
		// zoom in factor
304
		addComponent(PluginServices.getText(this, "zoom_in_factor") + ":",
305
			txtZoomInFactor = new JTextField("", 15));
306
		// zoom out factor
307
		addComponent(PluginServices.getText(this, "zoom_out_factor") + ":",
308
			txtZoomOutFactor = new JTextField("", 15));
309

  
310
		initializeValues();
309 311
		return this;
310 312
	}
311 313

  
......
334 336
		xml.putProperty(ZOOM_OUT_FACTOR_KEY_NAME, zof);
335 337
		xml.putProperty(ADD_NEW_LAYERS_IN_INVISIBLE_MODE_KEY_NAME, invisibleNewLayers);
336 338
		xml.putProperty(KEEP_SCALE_ON_RESIZING_KEY_NAME, keepScaleOnResize);
337

  
338 339
	}
339 340

  
340

  
341 341
	public void initializeDefaults() {
342 342
		//projCode = FACTORY_DEFAULT_PROJECTION;
343 343
		txtZoomInFactor.setText(String.valueOf(MapContext.ZOOMINFACTOR));

Also available in: Unified diff