Revision 43510 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/tools/Behavior/Behavior.java
Behavior.java | ||
---|---|---|
37 | 37 |
import org.gvsig.fmap.geom.GeometryManager; |
38 | 38 |
import org.gvsig.fmap.geom.primitive.Arc; |
39 | 39 |
import org.gvsig.fmap.geom.primitive.Circle; |
40 |
import org.gvsig.fmap.geom.primitive.Curve; |
|
41 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
|
42 | 40 |
import org.gvsig.fmap.geom.primitive.Point; |
43 | 41 |
import org.gvsig.fmap.mapcontrol.MapControl; |
44 | 42 |
import org.gvsig.fmap.mapcontrol.MapControlDrawer; |
... | ... | |
83 | 81 |
*/ |
84 | 82 |
private MapControl mapControl; |
85 | 83 |
|
86 |
private static final Logger LOG = LoggerFactory.getLogger(Behavior.class);
|
|
84 |
protected static final Logger LOG = LoggerFactory.getLogger(Behavior.class);
|
|
87 | 85 |
|
88 |
protected GeometryManager geomManager = GeometryLocator |
|
89 |
.getGeometryManager(); |
|
86 |
protected GeometryManager geomManager = GeometryLocator.getGeometryManager();
|
|
87 |
|
|
90 | 88 |
|
91 | 89 |
private int mouseButton = BUTTON_LEFT; |
92 | 90 |
private boolean isMyButton = false; |
... | ... | |
384 | 382 |
return circle; |
385 | 383 |
} |
386 | 384 |
|
387 |
/** |
|
388 |
* Create a lineString from a GeneralPath. If there is an |
|
389 |
* error return <code>null</code> and add the error |
|
390 |
* to the log |
|
391 |
* |
|
392 |
* @param gpx |
|
393 |
* The GeneralPath |
|
394 |
* @return |
|
395 |
* The LineString |
|
396 |
*/ |
|
397 |
protected Curve createLineString(GeneralPathX gpx) { |
|
398 |
Curve curve = null; |
|
399 |
try { |
|
400 |
curve = (Curve) geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D); |
|
401 |
curve.setGeneralPath(gpx); |
|
402 |
} catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) { |
|
403 |
LOG.error("Error creating lineString with GeneralPathX=" + gpx, |
|
404 |
new CreateGeometryException(TYPES.CURVE, SUBTYPES.GEOM2D, e)); |
|
405 |
} |
|
406 |
return curve; |
|
407 |
} |
|
385 |
// /**
|
|
386 |
// * Create a lineString from a GeneralPath. If there is an
|
|
387 |
// * error return <code>null</code> and add the error
|
|
388 |
// * to the log
|
|
389 |
// *
|
|
390 |
// * @param gpx
|
|
391 |
// * The GeneralPath
|
|
392 |
// * @return
|
|
393 |
// * The LineString
|
|
394 |
// */
|
|
395 |
// protected Curve createLineString(GeneralPathX gpx) {
|
|
396 |
// Curve curve = null;
|
|
397 |
// try {
|
|
398 |
// curve = (Curve) geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D);
|
|
399 |
// curve.setGeneralPath(gpx);
|
|
400 |
// } catch (org.gvsig.fmap.geom.exception.CreateGeometryException e) {
|
|
401 |
// LOG.error("Error creating lineString with GeneralPathX=" + gpx,
|
|
402 |
// new CreateGeometryException(TYPES.CURVE, SUBTYPES.GEOM2D, e));
|
|
403 |
// }
|
|
404 |
// return curve;
|
|
405 |
// }
|
|
408 | 406 |
|
409 | 407 |
public void resetMyButton() { |
410 | 408 |
this.isMyButton = false; |
Also available in: Unified diff