Package org.eclipse.sapphire.ui.diagram.editor

Examples of org.eclipse.sapphire.ui.diagram.editor.ContainerShapePart


 
  @Override
  protected void createEditPolicies()
  {
    ContainerShapeModel model = getCastedModel();
    ContainerShapePart containerPart = (ContainerShapePart)model.getSapphirePart();
    // Create direct edit policy if it contains non-active sapphire text part. Active
    // Sapphire text part has its own GEF editpart.
    if (containerPart.isEditable())
    {
      installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new NodeLabelDirectEditPolicy());
    }
  }
View Full Code Here


  }

  @Override
  protected List<TextPart> getContainedTextParts()
  {
    ContainerShapePart containerPart = (ContainerShapePart)getCastedModel().getSapphirePart();
    return (ShapePart.getContainedShapeParts(containerPart, TextPart.class));
  }
View Full Code Here

  }
 
  @Override
  protected List<ImagePart> getContainedImageParts()
  {
    ContainerShapePart containerPart = (ContainerShapePart)getCastedModel().getSapphirePart();
    return (ShapePart.getContainedShapeParts(containerPart, ImagePart.class));
  }
View Full Code Here

  }
 
  public void refreshChildren()
  {
    List<ShapePresentation> refreshedChildren = new ArrayList<ShapePresentation>();
    ContainerShapePart containerShapePart = part();
    for (ShapePart shapePart : containerShapePart.getChildren())
    {
      if (canAddShapePart(shapePart))
      {
        ShapePresentation childPresentation = getChildShapePresentation(shapePart);
        if (childPresentation == null) {
View Full Code Here

  public String getLabel()
  {
    ShapePart shapePart = getModelPart().getShapePart();
    if (shapePart instanceof ContainerShapePart)
    {
      ContainerShapePart containerShapePart = (ContainerShapePart)shapePart;
      List<TextPart> textParts = ShapePart.getContainedShapeParts(containerShapePart, TextPart.class);
      if (!textParts.isEmpty())
      {
        return textParts.get(0).getContent();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.diagram.editor.ContainerShapePart

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.