Examples of AddElementCommand


Examples of org.drools.eclipse.flow.common.editor.core.command.AddElementCommand

* Policy for performing layout of a process.
*/
public class ElementContainerLayoutEditPolicy extends XYLayoutEditPolicy {
   
    protected Command getCreateCommand(CreateRequest request) {
        AddElementCommand command = new AddElementCommand();
        command.setParent((ElementContainer) getHost().getModel());
        ElementWrapper element = (ElementWrapper) request.getNewObject();
        element.setConstraint((Rectangle) getConstraintFor(request));
        command.setChild(element);
        return command;
    }
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

    DiagramElement elem = editor.getDiagram().getChildAt(mx, my);
    if (elem instanceof Node && elem != source) {
      Connection connection =
        editor.getDiagram().getElementFactory().createDependency((Node) source,
          (Node) elem);
      AddElementCommand command = new AddElementCommand(editor,
        editor.getDiagram(), connection);
      editor.execute(command);
    }
    isDragging = false;
    editor.redraw();
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

          (UmlNode) source, (UmlNode) elem);
      } else if (associationType == RelationType.NOTE_CONNECTOR) {
        connection = editor.getDiagram().getElementFactory()
          .createNoteConnection((UmlNode) source, (UmlNode) elem);
      }
      AddElementCommand command = new AddElementCommand(editor,
        editor.getDiagram(), connection);
      editor.execute(command);
    }
    isDragging = false;
    editor.redraw();
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

      UmlConnection conn =
        editor.getDiagram().getElementFactory().createConnection(relationType,
          (UmlNode) source, (UmlNode) elem);
      connectMethod.generateAndSetPointsToConnection(conn, source,
        (UmlNode) elem, anchor, tmpPos);
      AddElementCommand command = new AddElementCommand(editor,
        editor.getDiagram(), conn);
      editor.execute(command);
    }
    isDragging = false;
    editor.redraw();
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

        line.setLine(points.get(points.size() - 2),
                     points.get(points.size() - 1));
      }
      target.calculateIntersection(line, linepoints.get(linepoints.size() - 1));
      assoc.setPoints(linepoints);
      AddElementCommand command = new AddElementCommand(editor,
        editor.getDiagram(), assoc);
      editor.execute(command);
    }
    isDragging = false;
    editor.redraw();
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

  public void mousePressed(EditorMouseEvent event) {
    CompositeElement parent = editor.getDiagram();
    Node element = createElement();
    element.setOrigin(parent.getMappedX(event.getX()), parent.getMappedY(
      event.getY()));
    AddElementCommand createCommand = new AddElementCommand(editor,
      editor.getDiagram(), element);
    editor.execute(createCommand);
  }
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

          (UmlNode) source, (UmlNode) elem);
      } else if (connectionType == ConnectionType.NOTE_CONNECTOR) {
        connection = editor.getDiagram().getElementFactory()
          .createNoteConnection((UmlNode) source, (UmlNode) elem);
      }
      AddElementCommand command = new AddElementCommand(editor,
        editor.getDiagram(), connection);
      editor.execute(command);
    }
    isDragging = false;
    editor.redraw();
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

        line.setLine(points.get(points.size() - 2),
                     points.get(points.size() - 1));
      }
      target.calculateIntersection(line, linepoints.get(linepoints.size() - 1));
      assoc.setPoints(linepoints);
      AddElementCommand command = new AddElementCommand(editor,
        editor.getDiagram(), assoc);
      editor.execute(command);
    }
    isDragging = false;
    editor.redraw();
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

  public void mousePressed(EditorMouseEvent event) {
    CompositeElement parent = editor.getDiagram();
    Node element = createElement();
    element.setOrigin(parent.getMappedX(event.getX()), parent.getMappedY(
      event.getY()));
    AddElementCommand createCommand = new AddElementCommand(editor,
      editor.getDiagram(), element);
    editor.execute(createCommand);
  }
View Full Code Here

Examples of org.tinyuml.ui.diagram.commands.AddElementCommand

  public void mousePressed(EditorMouseEvent event) {
    CompositeElement parent = editor.getDiagram();
    Node element = createElement();
    element.setOrigin(parent.getMappedX(event.getX()), parent.getMappedY(
      event.getY()));
    AddElementCommand createCommand = new AddElementCommand(editor,
      editor.getDiagram(), element);
    editor.execute(createCommand);
  }
View Full Code Here
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.