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

Examples of org.eclipse.sapphire.ui.swt.gef.presentation.ShapePresentation


    return (ContainerShapePresentation)parentPresentation;
  }
 
  protected IFigure getPartFigure(ShapePart shapePart)
  {
    ShapePresentation shapePresentation = ShapeModelUtil.getChildShapePresentation(
        getNodeEditPart().getCastedModel().getShapePresentation(), shapePart);
    return shapePresentation != null ? shapePresentation.getFigure() : null;
   
  }
View Full Code Here


 
  @Override
  public IFigure getContentPane()
  {
    ShapeFactoryModel model = (ShapeFactoryModel)getModel();
    ShapePresentation parentPresentation = getParentContainer(model.getShapePresentation());
    IFigure parentFigure = parentPresentation.getFigure();
    return parentFigure;
  }
View Full Code Here

    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

  public void deactivate() {
    if (isActive()) {
      ContextButtonManager contextButtonManager = getConfigurationManager().getDiagramEditor().getContextButtonManager();
      contextButtonManager.deRegister(this);
      getCastedModel().removePropertyChangeListener(this);
        ShapePresentation shapePresentation = getCastedModel().getShapePresentation();
        shapePresentation.dispose();
      super.deactivate();
    }
  }
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

  }

  @Override
  protected void refreshVisuals()
  {
    ShapePresentation shapePresentation = getCastedModel().getShapePresentation();
    shapePresentation.refreshVisuals();
    refreshNodeBounds();
  }
View Full Code Here

    ((GraphicalEditPart) getParent()).setLayoutConstraint(this,  getFigure(), bounds);   
  }
 
  private void updateShapeVisibility(ShapePart shapePart)
  {
    ShapePresentation nodePresentation = getCastedModel().getShapePresentation();
    ShapePresentation shapePresentation = ShapeModelUtil.getChildShapePresentation(nodePresentation, shapePart);
    ShapeUtil.updateFigureForShape(shapePresentation, getCastedModel().getDiagramModel().getResourceCache(), getConfigurationManager());

    refresh();
  }
View Full Code Here

    this.textPart = textPart;
    this.label = label;

    ShapeEditPart shapeEditPart = (ShapeEditPart)source;   
    DiagramNodeEditPart nodeEditPart = shapeEditPart.getNodeEditPart();   
    ShapePresentation shapePresentation = ShapeModelUtil.getChildShapePresentation(
        nodeEditPart.getCastedModel().getShapePresentation(), textPart);
    this.textFigure = shapePresentation.getFigure();
    this.parentFigure = shapePresentation.getParentFigure();
   
    this.diagramEditor = ((ShapeEditPart)source).getConfigurationManager().getDiagramEditor();
    this.property = FunctionUtil.getFunctionProperty(this.textPart.getLocalModelElement(),
        this.textPart.getContentFunction());
   
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.ui.swt.gef.presentation.ShapePresentation

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.