Examples of SapphireSurroundingHandle


Examples of org.eclipse.sapphire.ui.swt.gef.utils.SapphireSurroundingHandle

    List<AbstractHandle> list = new ArrayList<AbstractHandle>();
    GraphicalEditPart owner = (GraphicalEditPart) getHost();
    ShapeEditPart shapeEditPart = (ShapeEditPart)owner;
    SelectionPresentation selectionPresentation = shapeEditPart.getShapePresentation().getSelectionPresentation();
    DiagramResourceCache resourceCache = shapeEditPart.getNodeEditPart().getCastedModel().getDiagramModel().getResourceCache();
    SapphireSurroundingHandle selectionHandle = new SapphireSurroundingHandle(owner, shapeEditPart.getConfigurationManager(),
        resourceCache, isDragAllowed());
    if (selectionPresentation != null)
    {
      selectionHandle.setLineOffset(selectionPresentation.getOffset().content());
      selectionHandle.setLineWidth(selectionPresentation.getWeight().content());
      selectionHandle.setLineStyle(FigureUtil.convertLineStyle(selectionPresentation.getStyle().content()));
      selectionHandle.setLineColor(selectionPresentation.getColor().content());
    }
    list.add(selectionHandle);
    return list;
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.utils.SapphireSurroundingHandle

  {
    List<AbstractHandle> list = new ArrayList<AbstractHandle>();
    GraphicalEditPart owner = (GraphicalEditPart) getHost();
    DiagramResourceCache resourceCache = ((DiagramNodeEditPart)owner).getCastedModel().getDiagramModel().getResourceCache();
    SelectionPresentation selectionPresentation = ((DiagramNodeEditPart)owner).getCastedModel().getShapeModel().getShapePresentation().getSelectionPresentation();
    SapphireSurroundingHandle selectionHandle = new SapphireSurroundingHandle(owner, ((DiagramNodeEditPart)owner).getConfigurationManager(),
        resourceCache, isDragAllowed());
    if (selectionPresentation != null)
    {
      selectionHandle.setLineOffset(selectionPresentation.getOffset().content());
      selectionHandle.setLineWidth(selectionPresentation.getWeight().content());
      selectionHandle.setLineStyle(FigureUtil.convertLineStyle(selectionPresentation.getStyle().content()));
      selectionHandle.setLineColor(selectionPresentation.getColor().content());
    }
    list.add(selectionHandle);
    return list;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.