Java 类org.eclipse.gef.handles.ResizableHandleKit 实例源码

项目:PDFReporter-Studio    文件:ElementResizableEditPolicy.java   
protected void createMoveHandle(List handles) {
    if (isDragAllowed()) {
        // display 'move' handle to allow dragging
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getDragTracker(), Cursors.SIZEALL);
    } else {
        // display 'move' handle only to indicate selection
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles, getSelectTracker(), SharedCursors.ARROW);
    }
}
项目:gef-gwt    文件:NonResizableEditPolicy.java   
/**
 * Creates a 'move' handle, which uses a {@link DragEditPartsTracker} in
 * case {@link #isDragAllowed()} returns true, and a
 * {@link SelectEditPartTracker} otherwise.
 * 
 * @param handles
 *            The list of handles to add the move handle to.
 * @since 3.7
 */
protected void createMoveHandle(List handles) {
    if (isDragAllowed()) {
        // display 'move' handle to allow dragging
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
                handles, getDragTracker(), Cursors.SIZEALL);
    } else {
        // display 'move' handle only to indicate selection
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
                handles, getSelectTracker(), SharedCursors.ARROW);
    }
}
项目:PDFReporter-Studio    文件:NoSelectionEditPolicy.java   
/**
 * Creates a 'move' handle, which uses a {@link DragEditPartsTracker} in
 * case {@link #isDragAllowed()} returns true, and a
 * {@link SelectEditPartTracker} otherwise.
 * <p>
 * 
 * <i>NOTE</i>: <b>BACKCOMPABILITY SOLUTION FOR ECLIPSE 3.6.x</b>
 * 
 * @param handles
 *            The list of handles to add the move handle to.
 * @since 3.7 
 */
protected void createMoveHandle(List handles) {
    if (isDragAllowed()) {
        // display 'move' handle to allow dragging
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
                handles, getDragTracker(), Cursors.SIZEALL);
    } else {
        // display 'move' handle only to indicate selection
        ResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(),
                handles, getSelectTracker(), SharedCursors.ARROW);
    }
}
项目:gef-gwt    文件:ResizableEditPolicy.java   
/**
 * Creates a 'resize' handle, which uses a {@link ResizeTracker} in case
 * resizing is allowed in the respective direction, otherwise returns a drag
 * handle by delegating to
 * {@link NonResizableEditPolicy#createDragHandle(List, int)}.
 * 
 * @param handles
 *            The list of handles to add the resize handle to
 * @param direction
 *            A position constant indicating the direction to create the
 *            handle for
 * @since 3.7
 */
protected void createResizeHandle(List handles, int direction) {
    if ((resizeDirections & direction) == direction) {
        ResizableHandleKit.addHandle((GraphicalEditPart) getHost(),
                handles, direction, getResizeTracker(direction), Cursors
                        .getDirectionalCursor(direction, getHostFigure()
                                .isMirrored()));
    } else {
        // display 'resize' handle to allow dragging or indicate selection
        // only
        createDragHandle(handles, direction);
    }
}