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

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


  {
    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

Related Classes of org.eclipse.sapphire.ui.swt.gef.utils.SapphireSurroundingHandle

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.