Package org.tinyuml.ui.diagram.commands

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


          (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

      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

        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

  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

          (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

        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

  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

  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

  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

Related Classes of org.tinyuml.ui.diagram.commands.AddElementCommand

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.