Revision 2243 org.gvsig.raster.wms/branches/org.gvsig.raster.wms_dataaccess_refactoring/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java

View differences:

WMSParamsPanel.java
133 133
	private WizardListenerSupport   listenerSupport;
134 134
	private JTabbedPane             jTabbedPane            = null;
135 135
	private JPanel                  tabLayers              = null;
136
	private JPanel                  jPanel1                = null;
137
	private JPanel                  jPanel5                = null;
138
	private JPanel                  jPanel6                = null;
136
	private JPanel                  jPanelFormats                = null;
137
	private JPanel                  jPanelSrsSelection                = null;
138
	private JPanel                  jPanelInfoByPointFormat                = null;
139 139
	private StylesPanel             tabStyle               = null;
140 140
	private JCheckBox               chkTransparency        = null;
141 141
	private InfoPanel               tabInfo                = null;
......
271 271
		if (tabFormats == null) {
272 272
			tabFormats = new JPanel();
273 273
			tabFormats.setLayout(null);
274
			tabFormats.add(getJPanel1(), null);
275
			tabFormats.add(getJPanel5(), null);
276
			tabFormats.add(getJPanel6(), null);
274
			tabFormats.add(getJPanelFormats(), null);
275
			tabFormats.add(getJPanelSrsSelection(), null);
276
			tabFormats.add(getJPanelInfoByPointFormat(), null);
277 277
		}
278 278

  
279 279
		return tabFormats;
......
380 380
	 *
381 381
	 * @return Panel
382 382
	 */
383
	private JPanel getJPanel1() {
384
		if (jPanel1 == null) {
385
			jPanel1 = new JPanel();
386
			jPanel1.setLayout(null);
387
			jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(
383
	private JPanel getJPanelFormats() {
384
		if (jPanelFormats == null) {
385
			jPanelFormats = new JPanel();
386
			jPanelFormats.setLayout(null);
387
			jPanelFormats.setBorder(javax.swing.BorderFactory.createTitledBorder(
388 388
					null, PluginServices.getText(this, "select_formats"),
389 389
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
390 390
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
391 391
					null));
392
			jPanel1.setBounds(5, 10, 485, 140);
393
			jPanel1.add(getJScrollPane6(), null);
394
			jPanel1.add(getChkTransparency(), null);
392
			jPanelFormats.setBounds(5, 10, 485, 140);
393
			jPanelFormats.add(getJScrollPane6(), null);
394
			jPanelFormats.add(getChkTransparency(), null);
395 395
		}
396
		return jPanel1;
396
		return jPanelFormats;
397 397
	}
398 398

  
399 399
	/**
......
401 401
	 *
402 402
	 * @return Panel
403 403
	 */
404
	private JPanel getJPanel5() {
405
		if (jPanel5 == null) {
406
			jPanel5 = new JPanel();
407
			jPanel5.setLayout(null);
408
			jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(
404
	private JPanel getJPanelSrsSelection() {
405
		if (jPanelSrsSelection == null) {
406
			jPanelSrsSelection = new JPanel();
407
			jPanelSrsSelection.setLayout(null);
408
			jPanelSrsSelection.setBorder(javax.swing.BorderFactory.createTitledBorder(
409 409
					null, PluginServices.getText(this, "seleccionar_srs"),
410 410
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
411 411
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
412 412
					null));
413
			jPanel5.setBounds(5, 150, 485, 140);
414
			jPanel5.add(getJScrollPane2(), null);
413
			jPanelSrsSelection.setBounds(5, 150, 485, 140);
414
			jPanelSrsSelection.add(getJScrollPane2(), null);
415 415
		}
416
		return jPanel5;
416
		return jPanelSrsSelection;
417 417
	}
418 418
	
419 419
	/**
......
421 421
	 *
422 422
	 * @return Panel
423 423
	 */
424
	private JPanel getJPanel6() {
425
		if (jPanel6 == null) {
426
			jPanel6 = new JPanel();
427
			jPanel6.setLayout(null);
428
			jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(
424
	private JPanel getJPanelInfoByPointFormat() {
425
		if (jPanelInfoByPointFormat == null) {
426
			jPanelInfoByPointFormat = new JPanel();
427
			jPanelInfoByPointFormat.setLayout(null);
428
			jPanelInfoByPointFormat.setBorder(javax.swing.BorderFactory.createTitledBorder(
429 429
					null, PluginServices.getText(this, "seleccionar_infobypoint_format"),
430 430
					javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
431 431
					javax.swing.border.TitledBorder.DEFAULT_POSITION, null,
432 432
					null));
433
			jPanel6.setBounds(5, 295, 485, 78);
434
			jPanel6.add(getJScrollPane3(), null);
433
			jPanelInfoByPointFormat.setBounds(5, 295, 485, 78);
434
			jPanelInfoByPointFormat.add(getJScrollPane3(), null);
435 435
		}
436
		return jPanel6;
436
		return jPanelInfoByPointFormat;
437 437
	}
438 438

  
439 439
	/**
......
769 769
			JDnDListModel modelo = (JDnDListModel) lstSelectedLayers.getModel();
770 770

  
771 771
			try {
772
				if (modelo.addElement(0, nodo.clone())) {
772
				if (modelo.addElement(modelo.getSize(), nodo.clone())) {
773 773
					alguno = true;
774 774
				}
775 775
			} catch (CloneNotSupportedException e) {
......
1306 1306
	 * @return Vector
1307 1307
	 */
1308 1308
	public Vector<RemoteWMSStyle> getStyles() {
1309
		Vector<RemoteWMSStyle> v = new Vector<RemoteWMSStyle>();
1310 1309
		WMSLayerNode[] layers = selectedLayersToArray();
1311
		for (int i = 0; i < layers.length; i++) {
1310
		Vector<RemoteWMSStyle> v = new Vector<RemoteWMSStyle>(layers.length);
1311
		int posInsertion = 0;
1312
		
1313
		for (int i = layers.length - 1; i >= 0; i--) {
1312 1314
			RemoteWMSStyle sty = layers[i].getSelectedStyle();
1313 1315
			if(sty != null)
1314
				v.add(0, sty);
1316
				v.add(posInsertion, sty);
1317
			else {
1318
				RemoteWMSStyle s = new RemoteWMSStyle();
1319
				s.name = "default";
1320
				v.add(posInsertion, s);
1321
			}
1322
			posInsertion ++;
1315 1323
		}
1316 1324
		return v;
1317 1325
	}

Also available in: Unified diff