Revision 23657
branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/layers/VectorialLayerEdited.java | ||
---|---|---|
31 | 31 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
32 | 32 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
33 | 33 |
import org.gvsig.fmap.mapcontext.rendering.symbols.FGraphicUtilities; |
34 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
34 | 35 |
import org.gvsig.tools.observer.Observable; |
35 | 36 |
import org.gvsig.tools.observer.Observer; |
36 | 37 |
|
... | ... | |
134 | 135 |
} |
135 | 136 |
// Se comprueba si se pincha en una gemometr?a |
136 | 137 |
ViewPort vp = getLayer().getMapContext().getViewPort(); |
137 |
double tol = vp.toMapDistance(SelectionCADTool.tolerance);
|
|
138 |
double tol = vp.toMapDistance(MapControl.tolerance);
|
|
138 | 139 |
|
139 | 140 |
FeatureCollection newSelection = ((FLyrVect) getLayer()) |
140 | 141 |
.queryByPoint(firstPoint, tol, getFeatureStore() |
... | ... | |
503 | 504 |
drawHandlers(geom.cloneGeometry(), gh, vp); |
504 | 505 |
// y miramos los handlers de cada entidad seleccionada |
505 | 506 |
min = cta.getMapControl().getViewPort().toMapDistance( |
506 |
SelectionCADTool.tolerance);
|
|
507 |
MapControl.tolerance);
|
|
507 | 508 |
for (int j = 0; j < handlers.length; j++) { |
508 | 509 |
Point2D handlerPoint = handlers[j].getPoint(); |
509 | 510 |
double distance = firstPoint.distance(handlerPoint); |
branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/gui/preferences/EditionPreferencePage.java | ||
---|---|---|
60 | 60 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
61 | 61 |
import org.gvsig.fmap.mapcontext.layers.SingleLayerIterator; |
62 | 62 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
63 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
63 | 64 |
|
64 | 65 |
import com.iver.andami.PluginServices; |
65 | 66 |
import com.iver.andami.preferences.AbstractPreferencePage; |
... | ... | |
375 | 376 |
} // while |
376 | 377 |
mapContext.invalidate(); |
377 | 378 |
try{ |
378 |
SelectionCADTool.tolerance = Integer.parseInt(getJTxtTolerance().getText());
|
|
379 |
MapControl.tolerance = Integer.parseInt(getJTxtTolerance().getText());
|
|
379 | 380 |
|
380 | 381 |
}catch (Exception e) { |
381 | 382 |
throw new StoreException(PluginServices.getText(this, "tolerancia_incorrecta"),e); |
... | ... | |
406 | 407 |
this.layers = mc.getLayers(); |
407 | 408 |
MyTableModel tm = new MyTableModel(layers); |
408 | 409 |
getJTableSnapping().setModel(tm); |
409 |
getJTxtTolerance().setText(String.valueOf(SelectionCADTool.tolerance));
|
|
410 |
getJTxtTolerance().setText(String.valueOf(MapControl.tolerance));
|
|
410 | 411 |
} |
411 | 412 |
|
412 | 413 |
/** |
branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/EditVertexCADTool.java | ||
---|---|---|
72 | 72 |
import org.gvsig.fmap.geom.util.Converter; |
73 | 73 |
import org.gvsig.fmap.mapcontext.ViewPort; |
74 | 74 |
import org.gvsig.fmap.mapcontext.rendering.symbols.FGraphicUtilities; |
75 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
75 | 76 |
|
76 | 77 |
import com.iver.andami.PluginServices; |
77 | 78 |
import com.iver.andami.messages.NotificationManager; |
... | ... | |
700 | 701 |
// ArrayList selectedRows = vle.getSelectedRow(); |
701 | 702 |
|
702 | 703 |
double tam = getCadToolAdapter().getMapControl().getViewPort() |
703 |
.toMapDistance(SelectionCADTool.tolerance);
|
|
704 |
.toMapDistance(MapControl.tolerance);
|
|
704 | 705 |
Rectangle2D rect = new Rectangle2D.Double(firstPoint.getX() - tam, |
705 | 706 |
firstPoint.getY() - tam, tam * 2, tam * 2); |
706 | 707 |
while (iterator.hasNext()) { |
branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/SelectionCADTool.java | ||
---|---|---|
66 | 66 |
import org.gvsig.fmap.mapcontext.ViewPort; |
67 | 67 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
68 | 68 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
69 |
import org.gvsig.fmap.mapcontrol.MapControl; |
|
69 | 70 |
|
70 | 71 |
import com.iver.andami.PluginServices; |
71 | 72 |
import com.iver.cit.gvsig.CADExtension; |
... | ... | |
82 | 83 |
* @author Vicente Caballero Navarro |
83 | 84 |
*/ |
84 | 85 |
public class SelectionCADTool extends DefaultCADTool { |
85 |
public static int tolerance = 4; |
|
86 |
// public static int tolerance = 4;
|
|
86 | 87 |
|
87 | 88 |
private SelectionCADToolContext _fsm; |
88 | 89 |
|
... | ... | |
507 | 508 |
PluginServices.getMDIManager().setWaitCursor(); |
508 | 509 |
|
509 | 510 |
double tam = getCadToolAdapter().getMapControl().getViewPort() |
510 |
.toMapDistance(tolerance); |
|
511 |
.toMapDistance(MapControl.tolerance);
|
|
511 | 512 |
|
512 | 513 |
Handler[] handlers = null; |
513 | 514 |
rowselectedHandlers.clear(); |
branches/v2_0_0_prep/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/ComplexSelectionCADTool.java | ||
---|---|---|
552 | 552 |
PluginServices.getMDIManager().setWaitCursor(); |
553 | 553 |
|
554 | 554 |
double tam = getCadToolAdapter().getMapControl().getViewPort() |
555 |
.toMapDistance(tolerance); |
|
555 |
.toMapDistance(MapControl.tolerance);
|
|
556 | 556 |
|
557 | 557 |
Handler[] handlers = null; |
558 | 558 |
rowselectedHandlers.clear(); |
Also available in: Unified diff