package es.iiia.sgi.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.ui.IWorkbenchPage;
import es.iiia.shapeeditor.ShapeEditor;
import es.iiia.shapeeditor.tools.CreateLineTool;
import es.iiia.shapeeditor.tools.ModifyBoundsTool;
public class ModifyLayoutAction extends Action {
private IWorkbenchPage page;
public ModifyLayoutAction(IWorkbenchPage page) {
super("Modify Layout", IAction.AS_RADIO_BUTTON);
this.page = page;
this.setChecked(true);
}
public void run() {
if (this.isChecked()) {
((ShapeEditor) page.getActiveEditor()).setTool(new ModifyBoundsTool());
}
}
}