Package org.eclipse.graphiti.mm.algorithms

Examples of org.eclipse.graphiti.mm.algorithms.Text


    PictogramElement pictogramElement = context.getPictogramElement();
    if (pictogramElement instanceof ContainerShape) {
      ContainerShape cs = (ContainerShape) pictogramElement;
      for (Shape shape : cs.getChildren()) {
        if (shape.getGraphicsAlgorithm() instanceof Text) {
          Text text = (Text) shape.getGraphicsAlgorithm();
          pictogramName = text.getValue();
        }
      }
    }

    // retrieve name from business model
View Full Code Here


    // Set name in pictogram model
    if (pictogramElement instanceof ContainerShape) {
      ContainerShape cs = (ContainerShape) pictogramElement;
      for (Shape shape : cs.getChildren()) {
        if (shape.getGraphicsAlgorithm() instanceof Text) {
          Text text = (Text) shape.getGraphicsAlgorithm();
          text.setValue(businessName);
          return true;
        }
        if (shape.getGraphicsAlgorithm() instanceof MultiText) {
          MultiText text = (MultiText) shape.getGraphicsAlgorithm();
          text.setValue(businessName);
          return true;
        }
      }
    }
View Full Code Here

  }
 
  protected void centerText(ContainerShape shape) {
    for (Shape shapeChild : shape.getChildren()) {
      if (shapeChild.getGraphicsAlgorithm() instanceof Text) {
        Text text = (Text) shapeChild.getGraphicsAlgorithm();
        Graphiti.getGaService().setLocationAndSize(text, 0, 0, 20, shape.getGraphicsAlgorithm().getHeight());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.algorithms.Text

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.