Revision 12148 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/EditVertexCADTool.java
EditVertexCADTool.java | ||
---|---|---|
55 | 55 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException; |
56 | 56 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileWriteException; |
57 | 57 |
import com.iver.cit.gvsig.exceptions.validate.ValidateRowException; |
58 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
58 | 59 |
import com.iver.cit.gvsig.fmap.core.DefaultFeature; |
59 | 60 |
import com.iver.cit.gvsig.fmap.core.FGeometryCollection; |
60 | 61 |
import com.iver.cit.gvsig.fmap.core.FPoint2D; |
... | ... | |
177 | 178 |
* @param y par?metro x del punto que se pase para dibujar. |
178 | 179 |
*/ |
179 | 180 |
public void drawOperation(Graphics g, double x, double y) { |
180 |
//EditVertexCADToolState actualState = ((EditVertexCADToolContext) _fsm).getState(); |
|
181 |
//String status = actualState.getName(); |
|
182 |
//VectorialEditableAdapter vea = getCadToolAdapter().getVectorialAdapter(); |
|
183 |
//FBitSet selection = vea.getSelection(); |
|
184 |
|
|
185 |
try { |
|
186 |
drawVertex(g,getCadToolAdapter().getMapControl().getViewPort() |
|
187 |
.getAffineTransform()); |
|
188 |
} catch (DriverIOException e) { |
|
189 |
e.printStackTrace(); |
|
190 |
} |
|
191 |
|
|
181 |
drawVertex(g,getCadToolAdapter().getMapControl().getViewPort()); |
|
192 | 182 |
} |
193 | 183 |
|
194 | 184 |
/** |
... | ... | |
272 | 262 |
} |
273 | 263 |
} |
274 | 264 |
} |
275 |
private void drawVertex(Graphics g,AffineTransform at) throws DriverIOException{
|
|
265 |
private void drawVertex(Graphics g,ViewPort vp){
|
|
276 | 266 |
ArrayList selectedRows=getSelectedRows(); |
277 | 267 |
for (int i = 0; i<selectedRows.size(); |
278 | 268 |
i++) { |
... | ... | |
280 | 270 |
.get(i)).getLinkedRow(); |
281 | 271 |
IGeometry ig = fea.getGeometry().cloneGeometry(); |
282 | 272 |
if (ig == null) continue; |
283 |
Handler[] handlers=ig.getHandlers(IGeometry.SELECTHANDLER); |
|
284 |
if (numSelect>=handlers.length) |
|
285 |
numSelect=0; |
|
286 |
FGraphicUtilities.DrawVertex((Graphics2D)g,at,handlers[numSelect]); |
|
273 |
ig.drawInts((Graphics2D)g,vp,DefaultCADTool.geometrySelectSymbol); |
|
274 |
Handler[] handlers=ig.getHandlers(IGeometry.SELECTHANDLER); |
|
275 |
if (numSelect>=handlers.length) |
|
276 |
numSelect=0; |
|
277 |
FGraphicUtilities.DrawVertex((Graphics2D)g,vp.getAffineTransform(),handlers[numSelect]); |
|
287 | 278 |
} |
288 | 279 |
} |
289 | 280 |
|
Also available in: Unified diff