Java 类org.eclipse.gef.tools.DragEditPartsTracker 实例源码

项目:bdf2    文件:TransitionLabelEditPart.java   
@Override
public DragTracker getDragTracker(Request request) {
    return new DragEditPartsTracker(this) {
        protected EditPart getTargetEditPart() {
            return getParent();
        }
    };
}
项目:PDFReporter-Studio    文件:JDGuideEditPart.java   
public DragTracker getDragTracker(Request request) {
    return new DragEditPartsTracker(this) {
        protected Cursor calculateCursor() {
            if (isInState(STATE_INVALID))
                return Cursors.NO;
            return getCurrentCursor();
        }

        protected boolean isMove() {
            return true;
        }
    };
}
项目:gef-gwt    文件:NonResizableHandle.java   
/**
 * Initializes the handle. Sets the {@link org.eclipse.gef.DragTracker} and
 * DragCursor.
 */
protected void initialize() {
    setOpaque(false);
    border = new CornerTriangleBorder(false);
    setBorder(border);
    setCursor(Cursors.SIZEALL);
    setDragTracker(new DragEditPartsTracker(getOwner()));
}
项目:gef-gwt    文件:GuideEditPart.java   
public DragTracker getDragTracker(Request request) {
    return new DragEditPartsTracker(this) {
        protected Cursor calculateCursor() {
            if (isInState(STATE_INVALID))
                return Cursors.NO;
            return getCurrentCursor();
        }

        protected boolean isMove() {
            return true;
        }
    };
}
项目:eclipsensis    文件:InstallOptionsHandleKit.java   
static Handle createNonResizableHandle(GraphicalEditPart owner, int direction)
{
    ResizeHandle handle = new ResizeHandle(owner, direction);
    handle.setCursor(Cursors.SIZEALL);
    handle.setDragTracker(new DragEditPartsTracker(owner));
    return handle;
}
项目:birt    文件:FirstLevelHandleDataItemEditPart.java   
public DragTracker getDragTracker( Request req )
{
    DragEditPartsTracker track = new ReportElementDragTracker( this ) {

        /*
         * (non-Javadoc)
         * 
         * @see org.eclipse.gef.tools.SelectEditPartTracker#handleButtonDown(int)
         */
        protected boolean handleButtonDown( int button )
        {
            if ( getCurrentViewer( ) instanceof DeferredGraphicalViewer )
            {
                ( (DeferredGraphicalViewer) getCurrentViewer( ) ).initStepDat( );
            }
            boolean bool = super.handleButtonDown( button );

            if ( ( button == 3 || button == 1 ) )
            // && isInState(STATE_INITIAL))
            {
                if ( getSourceEditPart( ) instanceof FirstLevelHandleDataItemEditPart )
                {
                    FirstLevelHandleDataItemEditPart first = (FirstLevelHandleDataItemEditPart) getSourceEditPart( );
                    if ( first.contains( getLocation( ) ) )
                    {
                        //MenuManager manager = new LevelCrosstabPopMenuProvider( getViewer( ) );
                        manager.createContextMenu( getViewer( ).getControl( ) );
                        Menu menu = manager.getMenu( );

                        menu.setVisible( true );
                        return true;
                    }
                }
            }
            return bool;
        }
    };
    return track;
}
项目:birt    文件:ListBandEditPart.java   
public DragTracker getDragTracker( Request req )
{

    return new DragEditPartsTracker( this ) {

        protected boolean handleDragInProgress( )
        {
            return true;
        }
    };
}
项目:birt    文件:ReportNonResizableHandleKit.java   
static Handle createHandle( GraphicalEditPart owner, int direction )
{
    ReportResizeHandle handle = new ReportResizeHandle( owner, direction );
    handle.setCursor( SharedCursors.SIZEALL );
    handle.setDragTracker( new DragEditPartsTracker( owner ) );
    return handle;
}
项目:gef-gwt    文件:NonResizableHandleKit.java   
static Handle createHandle(GraphicalEditPart owner, int direction) {
    ResizeHandle handle = new ResizeHandle(owner, direction);
    handle.setCursor(SharedCursors.SIZEALL);
    handle.setDragTracker(new DragEditPartsTracker(owner));
    return handle;
}
项目:gef-gwt    文件:MoveHandle.java   
/**
 * Overridden to create a {@link DragEditPartsTracker}.
 * 
 * @see org.eclipse.gef.handles.AbstractHandle#createDragTracker()
 */
protected DragTracker createDragTracker() {
    DragEditPartsTracker tracker = new DragEditPartsTracker(getOwner());
    tracker.setDefaultCursor(getCursor());
    return tracker;
}
项目:birt    文件:DatasetNodeEditPart.java   
public DragTracker getDragTracker( Request req )
{
    DragEditPartsTracker track = new DragEditPartsTracker( this );
    return track;
}
项目:birt    文件:HierarchyNodeEditPart.java   
public DragTracker getDragTracker( Request req )
{
    DragEditPartsTracker track = new DragEditPartsTracker( this );
    return track;
}
项目:birt    文件:ReportElementEditPart.java   
public DragTracker getDragTracker( Request req )
{
    DragEditPartsTracker track = new ReportElementDragTracker( this );
    return track;
}
项目:NEXCORE-UML-Modeler    文件:SequenceLineNonResizableHandleKit.java   
/**
 * createHandle
 *  
 * @param owner
 * @param direction
 * @return Handle
 */
static Handle createHandle(GraphicalEditPart owner, int direction) {
    ResizeHandle handle = new SequenceLineResizeHandle(owner, direction);
    handle.setCursor(SharedCursors.SIZEALL);
    handle.setDragTracker(new DragEditPartsTracker(owner));
    return handle;
}
项目:PDFReporter-Studio    文件:NoSelectionEditPolicy.java   
/**
 * Returns a drag tracker to use by a resize handle.
 * <p>
 * 
 * <i>NOTE</i>: <b>BACKCOMPABILITY SOLUTION FOR ECLIPSE 3.6.x</b>
 * 
 * @return a new {@link ResizeTracker}
 * @since 3.7
 */
protected DragEditPartsTracker getDragTracker() {
    return new DragEditPartsTracker(getHost());
}
项目:PDFReporter-Studio    文件:ElementResizableEditPolicy.java   
/**
 * Returns a drag tracker to use by a resize handle.
 * 
 * @return a new {@link SearchParentDragTracker}
 * @since 3.7
 */
protected DragEditPartsTracker getDragTracker() {
    return new SearchParentDragTracker(getHost());
}
项目:gef-gwt    文件:NonResizableEditPolicy.java   
/**
 * Returns a drag tracker to use by a resize handle.
 * 
 * @return a new {@link ResizeTracker}
 * @since 3.7
 */
protected DragEditPartsTracker getDragTracker() {
    return new DragEditPartsTracker(getHost());
}