Revision 31285

View differences:

branches/v2_0_0_prep/extensions/extGeocoding/src/org/gvsig/geocoding/gui/newpattern/NewPatternPanel.java
274 274
				.getClassLoader().getBaseDir()
275 275
				+ File.separator
276 276
				+ "images"
277
				+ File.separator
278
				+ "new"
279
				+ File.separator + "centroid.png"));
277
				+ File.separator + "multi_centroid.png"));
280 278
		gridBagConstraints = new java.awt.GridBagConstraints();
281 279
		gridBagConstraints.gridx = 0;
282 280
		gridBagConstraints.gridy = 0;
......
599 597
	 */
600 598
	private void evChangeType(java.awt.event.ActionEvent evt) {
601 599
		ComboShowName selected = (ComboShowName) jComboType.getSelectedItem();
600
		
601
		String baseDir = PluginServices.getPluginServices(this)
602
		.getClassLoader().getBaseDir();
603
		
602 604
		if (selected instanceof SimpleCentroidStyle) {
603 605
			jTextTypeInfo.setText(PluginServices.getText(null, "simcenstyle"));
604 606
			insertDynamicPanel(null);
605
			jLabType.setIcon(new ImageIcon(PluginServices.getPluginServices(
606
					this).getClassLoader().getBaseDir()
607
					+ File.separator
608
					+ "images"
609
					+ File.separator
610
					+ "new"
611
					+ File.separator + "centroid.png"));
607
			String path = baseDir
608
			+ File.separator
609
			+ "images"
610
			+ File.separator + "multi_centroid.png";
611
			jLabType.setIcon(new ImageIcon(path));
612 612
			jLabType.validate();
613
			this.validate();
613 614
		}
614 615
		if (selected instanceof SimpleRangeStyle) {
615 616
			jTextTypeInfo
......
617 618
			insertDynamicPanel(srange);
618 619
			List<String> desc = getLayerDescriptors();
619 620
			srange.setComboValues(desc);
620
			jLabType.setIcon(new ImageIcon(PluginServices.getPluginServices(
621
					this).getClassLoader().getBaseDir()
622
					+ File.separator
623
					+ "images"
624
					+ File.separator
625
					+ "new"
626
					+ File.separator + "simplerange.png"));
621
			String path = baseDir
622
			+ File.separator
623
			+ "images"
624
			+ File.separator + "single_rank.png";
625
			jLabType.setIcon(new ImageIcon(path));
627 626
			jLabType.validate();
627
			this.validate();
628 628
		}
629 629
		if (selected instanceof DoubleRangeStyle) {
630 630
			jTextTypeInfo
......
632 632
			insertDynamicPanel(drange);
633 633
			List<String> desc = getLayerDescriptors();
634 634
			drange.setComboValues(desc);
635
			jLabType.setIcon(new ImageIcon(PluginServices.getPluginServices(
636
					this).getClassLoader().getBaseDir()
637
					+ File.separator
638
					+ "images"
639
					+ File.separator
640
					+ "new"
641
					+ File.separator + "doublerange.png"));
635
			String path = baseDir
636
			+ File.separator
637
			+ "images"
638
			+ File.separator + "double_rank.png";
639
			jLabType.setIcon(new ImageIcon(path));
642 640
			jLabType.validate();
641
			this.validate();
643 642
		}
644 643
		if (selected instanceof ComposedStyle) {
645 644
			jTextTypeInfo.setText(PluginServices.getText(null, "compostyle"));
646 645
			insertDynamicPanel(null);
647
			jLabType.setIcon(new ImageIcon(PluginServices.getPluginServices(
648
					this).getClassLoader().getBaseDir()
649
					+ File.separator
650
					+ "images"
651
					+ File.separator
652
					+ "new"
653
					+ File.separator + "composed.png"));
646
			String path = baseDir
647
			+ File.separator
648
			+ "images"
649
			+ File.separator + "composed.png";
650
			jLabType.setIcon(new ImageIcon(path));
654 651
			jLabType.validate();
652
			this.validate();
655 653
		}
656 654

  
657 655
	}
branches/v2_0_0_prep/extensions/extGeocoding/src/org/gvsig/geocoding/extension/GeocodingController.java
186 186
		PatternLoaderThread load = new PatternLoaderThread(thefile);
187 187
		load.run();
188 188
		ok = load.isOk();
189
		if (ok) {			
189
		if (ok) {
190 190
			this.gmodel.setPatternFile(load.getFile());
191 191
			this.gmodel.setPattern(load.getPattern());
192 192
		}
......
509 509
			Point pto1 = new Point2D(minX, minY);
510 510
			Point pto2 = new Point2D(minX + width, minY + height);
511 511
			Envelope enve = new Envelope2D(pto1, pto2);
512
			mapControl.getViewPort().setEnvelope(enve);
512
			if(enve != null){
513
				mapControl.getViewPort().setEnvelope(enve);
514
			}
515
			
513 516
		}
514 517

  
515 518
	}
......
616 619
		MapControl mapControl = new MapControl();
617 620
		mapControl.setMapContext(mapContext);
618 621
		GraphicLayer grphclyr = mapControl.getMapContext().getGraphicsLayer();
619
		grphclyr.clearAllGraphics();
622
		long siz = 0;
623
		try {
624
			siz = ((FeatureSet) grphclyr.getDataStore().getDataSet()).getSize();
625
		} catch (DataException e) {
626
			e.printStackTrace();
627
		}
628
		if (siz > 0) {
629
			grphclyr.clearAllGraphics();
630
		}
620 631

  
621 632
		int idSymbol;
622 633
		int i = 1;

Also available in: Unified diff