Package org.eclipse.gef

Examples of org.eclipse.gef.GraphicalEditPart


    // default
    return super.keyPressed(event);
  }
 
  protected boolean navigateNext(KeyEvent event, int direction) {
    GraphicalEditPart currentPart = (GraphicalEditPart)viewer.getFocusEditPart();
   
    // TODO: we should cache this list
    List flatList = new ArrayList();
    buildFlatList(flatList, viewer.getContents());
   
View Full Code Here


    if (part instanceof MainTrayEditPart) return (MainTrayEditPart)part;
    return getMainTrayEditPart(part.getParent());
  }
 
  protected boolean activateDirectEdit(KeyEvent event) {
    GraphicalEditPart currentPart = (GraphicalEditPart)viewer.getFocusEditPart();
    currentPart.performRequest(new DirectEditRequest());
    return true;
  }
View Full Code Here

*/
public class TraySelectionEditPolicy extends NonResizableEditPolicy {
 
  protected List createSelectionHandles() {
    List result = new ArrayList();
    GraphicalEditPart owner = (GraphicalEditPart)getHost();
    result.add(createHandle(owner));
    return result;
  }
View Full Code Here

      GraphicalViewer viewer = getGraphicalViewer();
      // Bug 370869 - DND from the tool palette would show an invalid cursor before placing the new node
      // in direct edit mode. TODO why?
      //viewer.getControl().forceFocus();
     
      GraphicalEditPart editpart = getGraphicalEditPart(part);
      ISapphirePart parentPart = part.parent();
      while ((editpart == null || !editpart.isSelectable()) && parentPart != null)
      {
        editpart = getGraphicalEditPart(parentPart);
        parentPart = parentPart.parent();
      }
      if (editpart != null)
View Full Code Here

       
        Collection editPartsToProcess = new HashSet();
        editPartsToProcess.addAll(EditPartUtilities.getAllChildren(getNodeEditPart(fromEditPart)));
        List<EditPart> selectedEditParts = new ArrayList<EditPart>();
        for (Iterator iterator = editPartsToProcess.iterator(); iterator.hasNext();) {
          GraphicalEditPart editPart = (GraphicalEditPart) iterator.next();
          if (editPart.isSelectable()  && FigureUtilities.isNotFullyClipped(editPart.getFigure()) && isEditPartInRect(editPart, rect)) {
            selectedEditParts.add(editPart);
          }
        }
        filterEditParts(selectedEditParts, fromEditPart, getSourceEditPart());
        for (EditPart editPart : selectedEditParts) {
View Full Code Here

  private boolean isLayoutHorizontal(Request request)
  {
    ChangeBoundsRequest cbReq = (ChangeBoundsRequest)request;
    List<?> editParts = cbReq.getEditParts();
    GraphicalEditPart shapeEditPart = (GraphicalEditPart)editParts.get(0);   
    IFigure figure = shapeEditPart.getContentPane().getParent();
    return ((SapphireSequenceLayout) figure.getLayoutManager()).isHorizontal();
  }
View Full Code Here

  @Override
  public void buildContextMenu( final IMenuManager menuManager )
  {
    final ISapphirePart part;
    final DiagramPresentation presentation;
        final GraphicalEditPart editPart;
        final String context;

        final List<GraphicalEditPart> selection = this.editor.getSelectedEditParts();
       
        List<ISapphirePart> emptySelection = new ArrayList<ISapphirePart>();
View Full Code Here

        DiagramNodePresentation nodePresentation = (DiagramNodePresentation)context;
        SapphireDiagramEditor diagramEditor = nodePresentation.getConfigurationManager().getDiagramEditor();

        if( diagramEditor != null )
        {
          GraphicalEditPart sourceEditPart = diagramEditor.getGraphicalEditPart(nodePresentation.part());
        DefaultEditDomain editDomain = diagramEditor.getEditDomain();
        DiagramNodeConnectionCreationTool connectionTool = new DiagramNodeConnectionCreationTool();
        connectionTool.setEditDomain(editDomain);
        editDomain.setActiveTool(connectionTool);
       
View Full Code Here

 
  @Override
  protected List<?> createSelectionHandles()
  {
    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());
View Full Code Here

  @Override
  protected List<?> createSelectionHandles()
  {
    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)
View Full Code Here

TOP

Related Classes of org.eclipse.gef.GraphicalEditPart

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.