Package es.iiia.sgi.actions

Source Code of es.iiia.sgi.actions.CreateLineAction

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.CreateCurveTool;
import es.iiia.shapeeditor.tools.CreateLineTool;

public class CreateLineAction extends Action {
public static String ID = "es.iiia.sgi.actions.createcurve";
 
  private IWorkbenchPage page;
 
  public CreateLineAction(IWorkbenchPage page) {
    super("Create Line", IAction.AS_RADIO_BUTTON);
   
    this.page = page;
  }
 
  public void run() {
    ((ShapeEditor) page.getActiveEditor()).setTool(new CreateLineTool());
  }
}
TOP

Related Classes of es.iiia.sgi.actions.CreateLineAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.