Revision 11427 branches/v10/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/DefaultCADTool.java
DefaultCADTool.java | ||
---|---|---|
66 | 66 |
import com.iver.cit.gvsig.fmap.core.IFeature; |
67 | 67 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
68 | 68 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
69 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
|
69 | 70 |
import com.iver.cit.gvsig.fmap.core.v02.FGraphicUtilities; |
71 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
70 | 72 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
71 | 73 |
import com.iver.cit.gvsig.fmap.edition.DefaultRowEdited; |
72 | 74 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
... | ... | |
76 | 78 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
77 | 79 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
78 | 80 |
import com.iver.cit.gvsig.gui.cad.exception.CommandException; |
79 |
import com.iver.cit.gvsig.gui.cad.tools.SelectionCADTool; |
|
80 | 81 |
import com.iver.cit.gvsig.layers.VectorialLayerEdited; |
81 | 82 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
82 | 83 |
import com.iver.utiles.console.JConsole; |
... | ... | |
87 | 88 |
* @author Vicente Caballero Navarro |
88 | 89 |
*/ |
89 | 90 |
public abstract class DefaultCADTool implements CADTool { |
91 |
public static FSymbol drawingSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT, |
|
92 |
new Color(255, 0,0, 100)); // Le ponemos una transparencia |
|
93 |
public static FSymbol modifySymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT, |
|
94 |
new Color(100, 100, 100, 100)); |
|
95 |
public static FSymbol selectSymbol = new FSymbol(FConstant.SYMBOL_TYPE_POINT, |
|
96 |
Color.ORANGE); |
|
97 |
|
|
90 | 98 |
private static Logger logger = Logger.getLogger(DefaultCADTool.class |
91 | 99 |
.getName()); |
92 | 100 |
|
... | ... | |
99 | 107 |
private String tool = "selection"; |
100 | 108 |
|
101 | 109 |
private DefaultCADTool previousTool; |
102 |
|
|
103 | 110 |
/** |
104 | 111 |
* DOCUMENT ME! |
105 | 112 |
*/ |
... | ... | |
108 | 115 |
BufferedImage img = getCadToolAdapter().getMapControl().getImage(); |
109 | 116 |
Graphics2D gImag = (Graphics2D) img.getGraphics(); |
110 | 117 |
ViewPort vp = getCadToolAdapter().getMapControl().getViewPort(); |
111 |
geometry.draw(gImag, vp, CADTool.drawingSymbol); |
|
118 |
geometry.draw(gImag, vp, DefaultCADTool.drawingSymbol);
|
|
112 | 119 |
} |
113 | 120 |
} |
114 | 121 |
|
... | ... | |
152 | 159 |
elShape.lineTo(endPoint.getX(), endPoint.getY()); |
153 | 160 |
ShapeFactory.createPolyline2D(elShape).draw(g, |
154 | 161 |
getCadToolAdapter().getMapControl().getViewPort(), |
155 |
CADTool.drawingSymbol); |
|
162 |
DefaultCADTool.drawingSymbol);
|
|
156 | 163 |
} |
157 | 164 |
|
158 | 165 |
/** |
... | ... | |
194 | 201 |
IRowEdited.STATUS_ADDED, inversedIndex )); |
195 | 202 |
vea.getSelection().set(inversedIndex); |
196 | 203 |
IGeometry geom = df.getGeometry(); |
197 |
geom.cloneGeometry().draw(gs, vp, CADTool.drawingSymbol); |
|
204 |
geom.cloneGeometry().draw(gs, vp, DefaultCADTool.drawingSymbol);
|
|
198 | 205 |
vle.drawHandlers(geom.cloneGeometry(), gs, vp); |
199 | 206 |
vea.setSelectionImage(selectionImage); |
200 | 207 |
} catch (IOException e) { |
... | ... | |
333 | 340 |
} |
334 | 341 |
|
335 | 342 |
public void init() { |
336 |
CADTool.drawingSymbol.setOutlined(true); |
|
337 |
CADTool.drawingSymbol.setOutlineColor(Color.GREEN); |
|
343 |
DefaultCADTool.drawingSymbol.setOutlined(true);
|
|
344 |
DefaultCADTool.drawingSymbol.setOutlineColor(Color.GREEN);
|
|
338 | 345 |
|
339 | 346 |
} |
340 | 347 |
|
Also available in: Unified diff