Revision 1763 branches/gvSIG_CAD_Layout_version/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/tools/ScaleCadTool.java

View differences:

ScaleCadTool.java
67 67
public class ScaleCadTool extends AbstractCadTool {
68 68
	private static Status[] STATUS = {
69 69
			new Status("Precise punto base"),
70
			new Status("Precise factor de escala"),
70
			new Status("Precise factor de escala[2]"),
71 71
		};
72 72
	private Escalar scaleStatus = new Escalar();
73 73
	private Point2D firstPoint;
......
140 140
			}
141 141

  
142 142
			ret = ret | scaleStatus.transition("cancel");
143
		}else if (status == 4) {
144
			try {
145
				for (int i = 0; i < editingSource.getGeometryCount(); i++) {
146
					if (selectedGeometries.get(i)) {
147
						IGeometry geometry = editingSource.getGeometry(i);
148
						geometry.scale(firstPoint, 2, 2);
149
						editingSource.modifyGeometry(i, geometry);
150
					}
151
				}
152
			} catch (DriverIOException e) {
153
				e.printStackTrace();
154
			} catch (IOException e1) {
155
				e1.printStackTrace();
156
			}
157

  
158
			ret = ret | scaleStatus.transition("cancel");
143 159
		}
144 160

  
161

  
145 162
		return ret;
146 163
	}
147 164

  
......
204 221
	public Automaton getAutomaton() {
205 222
		return scaleStatus;
206 223
	}
224

  
225
	/**
226
	 * @see com.iver.cit.gvsig.gui.cad.CadTool#getName()
227
	 */
228
	public String getName() {
229
		return "ESCALAR";
230
	}
207 231
}

Also available in: Unified diff