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

项目:PDFReporter-Studio    文件:ElementResizableEditPolicy.java   
protected void createDragHandle(List handles, int direction) {
    if (isDragAllowed()) {
        // display 'resize' handles to allow dragging (drag tracker)
        NonResizableHandleKit.addHandle((GraphicalEditPart) getHost(), handles, direction, getDragTracker(),
                SharedCursors.SIZEALL);
    } else {
        // display 'resize' handles to indicate selection only (selection
        // tracker)
        NonResizableHandleKit.addHandle((GraphicalEditPart) getHost(), handles, direction, getSelectTracker(),
                SharedCursors.ARROW);
    }
}
项目:gef-gwt    文件:NonResizableEditPolicy.java   
/**
 * Creates a 'resize'/'drag' 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 resize handle to
 * @param direction
 *            A position constant indicating the direction to create the
 *            handle for
 * @since 3.7
 */
protected void createDragHandle(List handles, int direction) {
    if (isDragAllowed()) {
        // display 'resize' handles to allow dragging (drag tracker)
        NonResizableHandleKit
                .addHandle((GraphicalEditPart) getHost(), handles,
                        direction, getDragTracker(), SharedCursors.SIZEALL);
    } else {
        // display 'resize' handles to indicate selection only (selection
        // tracker)
        NonResizableHandleKit
                .addHandle((GraphicalEditPart) getHost(), handles,
                        direction, getSelectTracker(), SharedCursors.ARROW);
    }
}