Revision 5735 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/DefaultCADTool.java
DefaultCADTool.java | ||
---|---|---|
55 | 55 |
import com.hardcode.gdbms.engine.values.ValueFactory; |
56 | 56 |
import com.iver.andami.PluginServices; |
57 | 57 |
import com.iver.cit.gvsig.CADExtension; |
58 |
import com.iver.cit.gvsig.InsertPointExtension; |
|
59 | 58 |
import com.iver.cit.gvsig.fmap.ViewPort; |
60 | 59 |
import com.iver.cit.gvsig.fmap.core.DefaultFeature; |
61 | 60 |
import com.iver.cit.gvsig.fmap.core.FShape; |
... | ... | |
69 | 68 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
70 | 69 |
import com.iver.cit.gvsig.fmap.edition.DefaultRowEdited; |
71 | 70 |
import com.iver.cit.gvsig.fmap.edition.EditionEvent; |
72 |
import com.iver.cit.gvsig.fmap.edition.IEditableSource; |
|
73 | 71 |
import com.iver.cit.gvsig.fmap.edition.IRowEdited; |
74 | 72 |
import com.iver.cit.gvsig.fmap.edition.VectorialEditableAdapter; |
75 | 73 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
76 | 74 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
77 | 75 |
import com.iver.cit.gvsig.gui.View; |
78 |
import com.iver.cit.gvsig.gui.cad.exception.CommadException; |
|
79 |
import com.iver.cit.gvsig.gui.tokenmarker.ConsoleToken; |
|
76 |
import com.iver.cit.gvsig.gui.cad.exception.CommandException; |
|
80 | 77 |
import com.iver.cit.gvsig.layers.VectorialLayerEdited; |
81 | 78 |
import com.iver.utiles.console.JConsole; |
82 | 79 |
|
... | ... | |
334 | 331 |
public void setNextTool(String tool) { |
335 | 332 |
this.tool = tool; |
336 | 333 |
} |
337 |
public boolean changeCommand(String name)throws CommadException{ |
|
334 |
public boolean changeCommand(String name)throws CommandException{
|
|
338 | 335 |
CADTool[] cadtools=CADExtension.getCADTools(); |
339 | 336 |
for (int i=0;i<cadtools.length;i++){ |
340 | 337 |
CADTool ct=cadtools[i]; |
... | ... | |
354 | 351 |
JConsole.COMMAND); |
355 | 352 |
return true; |
356 | 353 |
}else{ |
357 |
throw new CommadException(name); |
|
354 |
throw new CommandException(name);
|
|
358 | 355 |
} |
359 | 356 |
} |
360 | 357 |
} |
... | ... | |
364 | 361 |
return true; |
365 | 362 |
} |
366 | 363 |
public abstract String toString(); |
364 |
|
|
365 |
public void throwValueException(String s,double d) { |
|
366 |
View vista = (View) PluginServices.getMDIManager() |
|
367 |
.getActiveView(); |
|
368 |
vista.getConsolePanel().addText(s+ " : " + d, JConsole.ERROR); |
|
369 |
} |
|
370 |
public void throwOptionException(String s,String o) { |
|
371 |
View vista = (View) PluginServices.getMDIManager() |
|
372 |
.getActiveView(); |
|
373 |
vista.getConsolePanel().addText(s+ " : " + o, JConsole.ERROR); |
|
374 |
} |
|
375 |
public void throwPointException(String s,double x,double y) { |
|
376 |
View vista = (View) PluginServices.getMDIManager() |
|
377 |
.getActiveView(); |
|
378 |
vista.getConsolePanel().addText(s+ " : " + " X = "+x+ ", Y = "+y, JConsole.ERROR); |
|
379 |
} |
|
380 |
|
|
367 | 381 |
} |
Also available in: Unified diff