setUndoActivity(createUndoActivity(view));
getUndoActivity().setAffectedFigures(new SingleFigureEnumerator(owner()));
}
public void invokeStep(InputEvent inputEvent, int x, int y, int anchorX, int anchorY, DrawingView view) {
TextFigure0 textOwner = (TextFigure0) owner();
UndoActivity activity = (UndoActivity) getUndoActivity();
double scale = view.getScale();
double realDeltaY = (y - anchorY) / scale;
int visualDeltaY = (int) realDeltaY;
System.out.println("visualDeltaY = " + visualDeltaY);
int newSize = activity.getFont().getSize() + visualDeltaY;
if (newSize < 1)
newSize = 1;
textOwner.setFont(new Font(activity.getFont().getName(), activity.getFont().getStyle(), newSize));
}