Package org.eclipse.gmf.runtime.diagram.ui.editparts

Examples of org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart


      ShapeNodeEditPart part = assertHasFrame(editor, "Home");
      Frame e = (Frame) part.resolveSemanticElement();
      assertFalse(e.isIsGenerated());
      assertFalse(e.isOverridden());
     
      GraphicalEditPart name = (GraphicalEditPart) part.getChildren().get(0);
     
      // check the label name
      assertEquals("Home", ((IAccessibleTextAwareEditPart) name).getLabelText());
     
      // and check that it is NOT bold
      assertIsBold(name.getFigure().getFont().getFontData(), false);
    }
   
    {
      ShapeNodeEditPart part = assertHasFrame(editor, "Overridden Frame");
      Frame e = (Frame) part.resolveSemanticElement();
      assertFalse(e.isIsGenerated());
      assertTrue(e.isOverridden());
     
      GraphicalEditPart name = (GraphicalEditPart) part.getChildren().get(0);
     
      // check the label name
      assertEquals("Overridden Frame", ((IAccessibleTextAwareEditPart) name).getLabelText());
     
      // and check that it is bold
      assertIsBold(name.getFigure().getFont().getFontData(), true);
    }
   
  }
View Full Code Here


      ShapeNodeEditPart part = assertHasOperation(frame, "Normal Operation");
      ActivityOperation e = (ActivityOperation) part.resolveSemanticElement();
      assertFalse(e.isIsGenerated());
      assertFalse(e.isOverridden());
     
      GraphicalEditPart name = (GraphicalEditPart) part.getChildren().get(0);
     
      // check the label name
      assertEquals("Normal Operation", ((IAccessibleTextAwareEditPart) name).getLabelText());
     
      // and check that it is NOT bold
      assertIsBold(name.getFigure().getFont().getFontData(), false);
    }
   
    {
      ShapeNodeEditPart part = assertHasOperation(frame, "Overridden Operation");
      ActivityOperation e = (ActivityOperation) part.resolveSemanticElement();
      assertFalse(e.isIsGenerated());
      assertTrue(e.isOverridden());
     
      GraphicalEditPart name = (GraphicalEditPart) part.getChildren().get(0);
     
      // check the label name
      assertEquals("Overridden Operation", ((IAccessibleTextAwareEditPart) name).getLabelText());
     
      // and check that it is bold
      assertIsBold(name.getFigure().getFont().getFontData(), true);
    }
   
  }
View Full Code Here

      if (shouldHalt(imagesSaved)) {
        break;    // halt
      }     

      if (obj instanceof GraphicalEditPart) {
        GraphicalEditPart child = (GraphicalEditPart) obj;
       
        // only select children with open policies
        if (child.getEditPolicy(EditPolicyRoles.OPEN_ROLE) != null) {
         
          DiagramDocumentEditor newEd = openSubDiagram(child);
          if (newEd == null || newEd == editor) {
            // didn't do anything: continue
            continue;
View Full Code Here

     
      // save all the children now
      List<RenderedChildInformation> children = new ArrayList<RenderedChildInformation>();
      for (Object o : part.getChildren()) {
        if (o instanceof GraphicalEditPart) {
          GraphicalEditPart gep = (GraphicalEditPart) o;
         
          RenderedChildInformation info = new RenderedChildInformation(
              gep.resolveSemanticElement(),
              gep.getContentPane().getBounds(),
              IamlBreadcrumb.getEObjectBreadcrumbString(gep.resolveSemanticElement()) );
          children.add(info);
        }
      }
      partChildrenListMap.put(part, children);
     
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart

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.