Package org.eclipse.gmf.runtime.notation

Examples of org.eclipse.gmf.runtime.notation.Location


    this.node = node;
    LayoutConstraint layout = node.getLayoutConstraint();
    if (!(layout instanceof Location))
      // TODO
      throw new RuntimeException("wrong layout constrait"); //$NON-NLS-1$
    Location location = (Location) layout;
    EObject eObject = node.getElement();
    if (!(eObject instanceof EClass))
      // TODO
      throw new RuntimeException("wrong EObject"); //$NON-NLS-1$
    EClass eClass = (EClass) eObject;

    xPos = location.getX() * GMF_TO_OO_FACTOR;
    yPos = location.getY() * GMF_TO_OO_FACTOR;

    name = eClass.getName();
    for (EAttribute eAttribute : eClass.getEAttributes()) {
      System.out.println(eAttribute);
    }
View Full Code Here


    }
    Node label6002 = createLabel(edge, Fd2VisualIDRegistry
        .getType(XorConnectionLabel2EditPart.VISUAL_ID));
    label6002.setLayoutConstraint(NotationFactory.eINSTANCE
        .createLocation());
    Location location6002 = (Location) label6002.getLayoutConstraint();
    location6002.setX(0);
    location6002.setY(40);
    return edge;
  }
View Full Code Here

    }
    Node label6003 = createLabel(edge, Fd2VisualIDRegistry
        .getType(XorConnectionLabelEditPart.VISUAL_ID));
    label6003.setLayoutConstraint(NotationFactory.eINSTANCE
        .createLocation());
    Location location6003 = (Location) label6003.getLayoutConstraint();
    location6003.setX(0);
    location6003.setY(40);
    return edge;
  }
View Full Code Here

    }
    Node label6002 = createLabel(edge, Fd2VisualIDRegistry
        .getType(XorConnectionLabel2EditPart.VISUAL_ID));
    label6002.setLayoutConstraint(NotationFactory.eINSTANCE
        .createLocation());
    Location location6002 = (Location) label6002.getLayoutConstraint();
    location6002.setX(0);
    location6002.setY(40);
    return edge;
  }
View Full Code Here

    }
    Node label6003 = createLabel(edge, Fd2VisualIDRegistry
        .getType(XorConnectionLabelEditPart.VISUAL_ID));
    label6003.setLayoutConstraint(NotationFactory.eINSTANCE
        .createLocation());
    Location location6003 = (Location) label6003.getLayoutConstraint();
    location6003.setX(0);
    location6003.setY(40);
    return edge;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.notation.Location

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.