Package org.eclipse.sapphire.ui.swt.gef.model

Examples of org.eclipse.sapphire.ui.swt.gef.model.ShapeModel


  {
    IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
   
    ShapeFactoryPresentation factory = (ShapeFactoryPresentation)getCastedModel().getShapePresentation();
    int newIndex = index + factory.getIndex();
    ShapeModel shapeModel = (ShapeModel)childEditPart.getModel();
    ShapePresentation shapePresentation = shapeModel.getShapePresentation();
    ContainerShapePresentation parentPresentation = getParentContainer(shapePresentation);
    Object layoutConstraint = ShapeUtil.getLayoutConstraint(shapePresentation,
        parentPresentation.getLayout());
    IFigure parentFigure = parentPresentation.getFigure();
    parentFigure.add(child, layoutConstraint, newIndex);
View Full Code Here


  {
    IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
    if (child == null)
      return;
   
    ShapeModel shapeModel = (ShapeModel)childEditPart.getModel();
    ShapePresentation shapePresentation = shapeModel.getShapePresentation();
    ContainerShapePresentation parentPresentation = getParentContainer(shapePresentation);
    IFigure parentFigure = parentPresentation.getFigure();
    Object layoutConstraint = ShapeUtil.getLayoutConstraint(shapePresentation,
        parentPresentation.getLayout());
    // find the offset for figure in presentation without an editpart
View Full Code Here

  {
    IFigure child = ((GraphicalEditPart) childEditPart).getFigure();
    if (child == null)
      return;
   
    ShapeModel shapeModel = (ShapeModel)childEditPart.getModel();
    ContainerShapePresentation parentPresentation = getParentContainer(shapeModel.getShapePresentation());
    IFigure parentFigure = parentPresentation.getFigure();
    parentFigure.remove(child);   
  }
View Full Code Here

  @Override
  protected List<ShapeModel> getModelChildren()
  {
    List<ShapeModel> returnedModelChildren = new ArrayList<ShapeModel>();
    DiagramNodeModel nodeModel = (DiagramNodeModel)getModel();
    ShapeModel shapeModel = nodeModel.getShapeModel();
    if (shapeModel instanceof ContainerShapeModel)
    {
      ContainerShapeModel containerModel = (ContainerShapeModel)shapeModel;
      returnedModelChildren.addAll(ShapeModelUtil.collectActiveChildrenRecursively(containerModel));
    }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.swt.gef.model.ShapeModel

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.