Revision 5170 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/LineCADTool.java
LineCADTool.java | ||
---|---|---|
46 | 46 |
import java.awt.geom.Point2D; |
47 | 47 |
|
48 | 48 |
import com.iver.andami.PluginServices; |
49 |
import com.iver.cit.gvsig.fmap.core.FShape; |
|
49 | 50 |
import com.iver.cit.gvsig.fmap.core.GeneralPathX; |
50 | 51 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
51 | 52 |
import com.iver.cit.gvsig.gui.cad.DefaultCADTool; |
53 |
import com.iver.cit.gvsig.gui.cad.exception.CommadException; |
|
52 | 54 |
import com.iver.cit.gvsig.gui.cad.tools.smc.LineCADToolContext; |
53 | 55 |
import com.iver.cit.gvsig.gui.cad.tools.smc.LineCADToolContext.LineCADToolState; |
54 | 56 |
|
... | ... | |
97 | 99 |
/* (non-Javadoc) |
98 | 100 |
* @see com.iver.cit.gvsig.gui.cad.CADTool#transition(com.iver.cit.gvsig.fmap.layers.FBitSet, java.lang.String) |
99 | 101 |
*/ |
100 |
public void transition(String s) { |
|
102 |
public void transition(String s) throws CommadException {
|
|
101 | 103 |
if (!super.changeCommand(s)){ |
102 | 104 |
_fsm.addOption(s); |
103 | 105 |
} |
... | ... | |
209 | 211 |
public String toString() { |
210 | 212 |
return "_line"; |
211 | 213 |
} |
212 |
|
|
214 |
public boolean isApplicable(int shapeType) { |
|
215 |
switch (shapeType) { |
|
216 |
case FShape.POINT: |
|
217 |
case FShape.POLYGON: |
|
218 |
return false; |
|
219 |
} |
|
220 |
return true; |
|
221 |
} |
|
213 | 222 |
} |
Also available in: Unified diff