Package es.iiia.sgi.actions

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

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.sgi.editors.RuleEditor;
import es.iiia.shapeeditor.tools.ModifyRuleTool;

public class ModifyRuleLayoutAction extends Action {
  private IWorkbenchPage page;
 
  public ModifyRuleLayoutAction(IWorkbenchPage page) {
    super("Modify Layout", IAction.AS_RADIO_BUTTON);
   
    this.page = page;
    this.setChecked(true);
  }
 
  public void run() {
    if (this.isChecked()) {
      ((RuleEditor) page.getActiveEditor()).setTool(new ModifyRuleTool());
    }
  }
}
TOP

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

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.