Package org.eclipse.gef.handles

Examples of org.eclipse.gef.handles.MoveHandle


  /**
   * @generated
   */
  protected List createSelectionHandles() {
    MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
    moveHandle.setBorder(null);
    moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
    return Collections.singletonList(moveHandle);
  }
View Full Code Here


    /**
     * @generated
     */
    @SuppressWarnings("rawtypes")
    protected List createSelectionHandles() {
      MoveHandle h = new MoveHandle((GraphicalEditPart) getHost());
      h.setBorder(null);
      return Collections.singletonList(h);
    }
View Full Code Here

  @SuppressWarnings({ "rawtypes", "unchecked" })
  protected void createMoveHandle(List handles) {
    if (isDragAllowed()) {
      // display 'move' handle to allow dragging
      MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
      moveHandle.setDragTracker(getDragTracker());
      moveHandle.setCursor(Cursors.SIZEALL);
      LineBorder border = new LineBorder(resourceCache.getOutlineColor(), 1, Graphics.LINE_DASH);
      SelectionPresentation selectionPresentation = getSelectionPresentation();
      if (selectionPresentation != null) {
        border.setColor(resourceCache.getColor(selectionPresentation.getColor().content()));
        border.setStyle(FigureUtil.convertLineStyle(selectionPresentation.getStyle().content()));
        border.setWidth(selectionPresentation.getWeight().content());
      }
      moveHandle.setBorder(border);
      handles.add(moveHandle);
    } else {
      // display 'move' handle only to indicate selection
      ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
          handles, getSelectTracker(), SharedCursors.ARROW);
View Full Code Here

    }
    return handles;
  }

  public static Handle moveHandle(GraphicalEditPart owner, Cursor cursor) {
    MoveHandle moveHandle = new MoveHandle(owner);
    //moveHandle.setDragTracker(tracker);
    moveHandle.setCursor(cursor);

      DiagramResourceCache resourceCache = ((DiagramConnectionLabelEditPart)owner).getCastedModel().getDiagramModel().getResourceCache();
    moveHandle.setBorder(new LineBorder(resourceCache.getOutlineColor(), 1, Graphics.LINE_DASH));

    return moveHandle;
  }
View Full Code Here

        new Fd2TextSelectionEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
        new NonResizableLabelEditPolicy() {

          protected List createSelectionHandles() {
            MoveHandle mh = new MoveHandle(
                (GraphicalEditPart) getHost());
            mh.setBorder(null);
            return Collections.singletonList(mh);
          }
        });
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gef.handles.MoveHandle

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.