Package org.eclipse.gef.commands

Examples of org.eclipse.gef.commands.Command


    }

    public Command getCommand() {
        if (value == null)
            return null;
        return new Command(){

            private LabelBoxPrinter labelBox = getLabelBoxPrinter();
            private String oldValue = getLabelBoxPrinter().getText();
            private String newValue = value;
View Full Code Here


        this.original = null;
       
        final Layer layer = getSelectedLayer();
        final StyleBlackboard newBlackboard = layer.getStyleBlackboard();
       
        return new Command(){
            @Override
            public String getLabel() {
                return "Change Style";
            }
            @Override
View Full Code Here

                }
            }
            if( !action.isDone() )
                return;
           
            Command command = action.getCommand();
           
            if( command!=null && command.canExecute() ){
                getViewer().getEditDomain().getCommandStack().execute(command);
            }
        }
    }
View Full Code Here

        final MapGraphicResource newGraphic = graphic;
        graphic = null;
        final MapGraphicBoxPrinter boxPrinter = getBoxPrinter();
        final MapGraphicResource old = boxPrinter.getMapGraphic();
       
        return new Command(){
            @Override
            public void execute() {
                boxPrinter.setMapGraphic(newGraphic);
            }
           
View Full Code Here

    public Command getCommand() {
        final double newScale = scale;
        scale = null;

        final double oldScale = calculateScale();
        return new Command(){
            private void setScale( double scale ) {
                applyNewScale(scale);
            }
            @Override
            public void execute() {
View Full Code Here

public class UpdateJpdlVersionAction extends BaseActionDelegate {

    public void run(IAction action) {
         DesignerEditor editor = getActiveDesignerEditor();
         Command command = new UpdateJpdlVersionCommand(editor, editor.getDefinitionFile(), editor.getDefinition());
         executeCommand(command);
    }
View Full Code Here

import org.jbpm.ui.common.model.Transition;

public class DeleteDelegate extends BaseActionDelegate {

    public void run(IAction action) {
        Command command = createDeleteCommand((GraphElement) selectedPart.getModel());
        executeCommand(command);
    }
View Full Code Here

      protected void handleDrop() {
        updateTargetRequest();
        updateTargetEditPart();

        if (getTargetEditPart() != null) {
          Command command = getCommand();
          if (command != null && command.canExecute())
            getViewer().getEditDomain().getCommandStack()
                .execute(command);
          else
            getCurrentEvent().detail = DND.DROP_NONE;
        } else
View Full Code Here

    return cmd;
  }

  @Override
  protected boolean calculateEnabled() {
    Command cmd = createCopyCommand(getSelectedObjects());
    if (cmd == null)
      return false;
    return cmd.canExecute();
  }
View Full Code Here

    return cmd.canExecute();
  }

  @Override
  public void run() {
    Command cmd = createCopyCommand(getSelectedObjects());
    if (cmd != null && cmd.canExecute()) {
      cmd.execute();
      // force an updateActions for paste command
      if (getWorkbenchPart().getSite().getPage().getActivePart() instanceof SarosWhiteboardView) {
        ((SarosWhiteboardView) getWorkbenchPart().getSite().getPage()
            .getActivePart()).getEditor().updateSelectionActions();
      } else if (getWorkbenchPart().getSite().getPage().getActivePart() instanceof WhiteboardEditor) {
View Full Code Here

TOP

Related Classes of org.eclipse.gef.commands.Command

Copyright © 2018 www.massapicom. 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.