Examples of AnchorContainer


Examples of org.eclipse.graphiti.mm.pictograms.AnchorContainer

    }
    EList<Connection> connections = d.getConnections();
    for (Connection connection : connections) {
     
      //Be wary about broken connections
      AnchorContainer source = null;
      if (connection.getStart() != null) {
        source = connection.getStart().getParent();
      }
     
      AnchorContainer target = null;
      if (connection.getEnd() != null) {
        target = connection.getEnd().getParent();
      }
     
      if (target == null || source == null) {
        break;
      }
     
      Node srcNode = shapeToNode.get(source);
      if (srcNode == null) {
        srcNode = shapeToNode.get(source.eContainer());
      }
     
      Node tgtNode = shapeToNode.get(target);
      if (tgtNode == null) {
        tgtNode = shapeToNode.get(target.eContainer());
      }
      Edge edge = new Edge(srcNode, tgtNode);
      edge.data = connection;
      edgeList.add(edge);
    }
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.AnchorContainer

   * @param element  the pictogram
   * @return  the anchor or null
   */
  public static Anchor getAnchor(PictogramElement element) {
    if (element instanceof AnchorContainer) {
      AnchorContainer container = (AnchorContainer) element;
      EList<Anchor> anchors = container.getAnchors();
      if (anchors != null && anchors.size() > 0) {
        Anchor answer = anchors.get(0);
        return answer;
      }
    }
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.AnchorContainer

      shapeToNode.put(shape, node);
      nodeList.add(node);
    }
    EList<Connection> connections = d.getConnections();
    for (Connection connection : connections) {
      AnchorContainer source = connection.getStart().getParent();
      AnchorContainer target = connection.getEnd().getParent();
      Edge edge = new Edge(shapeToNode.get(source), shapeToNode.get(target));
      edge.data = connection;
      edgeList.add(edge);
    }
    dg.nodes = nodeList;
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.