Revision 2993 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/Panels/SelectPointsPanel.java
SelectPointsPanel.java | ||
---|---|---|
481 | 481 |
//Si no hemos encontrado ninguna la creamos |
482 | 482 |
if(lyrPoints == null){ |
483 | 483 |
lyrPoints = new FLyrPoints(); |
484 |
lyrPoints.setName("layerPoints");
|
|
484 |
lyrPoints.setName("Points"); |
|
485 | 485 |
lyrPoints.setVisible(true); |
486 |
theView.getMapControl().getMapContext().beginAtomicEvent(); |
|
486 | 487 |
theView.getMapControl().getMapContext().getLayers().addLayer(lyrPoints); |
488 |
theView.getMapControl().getMapContext().endAtomicEvent(); |
|
487 | 489 |
} |
488 | 490 |
return lyrPoints; |
489 | 491 |
} |
... | ... | |
508 | 510 |
loadLyrPoint(); |
509 | 511 |
lyrPoints.setLastTool(theView.getMapControl().getTool()); |
510 | 512 |
GeorefPointerListener.posPoint = getCPoint().getSelectedIndex(); |
513 |
System.out.println("---->"+GeorefPointerListener.posPoint); |
|
511 | 514 |
GeorefPointerListener.firstPoint = true; |
512 | 515 |
theView.getMapControl().setTool("pointLyrSelection"); |
513 | 516 |
} |
... | ... | |
816 | 819 |
} |
817 | 820 |
return pSelectFromView; |
818 | 821 |
} |
822 |
|
|
823 |
/** |
|
824 |
* Carga el panel desde los datos contenidos en una capa de puntos |
|
825 |
* @param lyr |
|
826 |
*/ |
|
827 |
public void loadFromLyrPoints(FLyrPoints lyr){ |
|
828 |
if(lyr != null){ |
|
829 |
lyrPoints = lyr; |
|
830 |
View theView = (View) PluginServices.getMDIManager().getActiveView(); |
|
831 |
theView.getMapControl().getMapContext().beginAtomicEvent(); |
|
832 |
theView.getMapControl().getMapContext().getLayers().addLayer(lyr); |
|
833 |
theView.getMapControl().getMapContext().endAtomicEvent(); |
|
834 |
|
|
835 |
this.getCPoint().removeAllItems(); |
|
836 |
for(int i=0;i<lyr.getCountPoints();i++) |
|
837 |
this.getCPoint().addItem("" + (i + 1)); |
|
838 |
if(lyr.getCountPoints() >= 1){ |
|
839 |
changePoint(true, 0); |
|
840 |
getBSelectFromView().setEnabled(true); |
|
841 |
getBClear().setEnabled(true); |
|
842 |
getBDelPoint().setEnabled(true); |
|
843 |
} |
|
844 |
} |
|
845 |
} |
|
819 | 846 |
|
820 | 847 |
} |
Also available in: Unified diff