本文整理汇总了Java中org.eclipse.gef.tools.DragEditPartsTracker类的典型用法代码示例。如果您正苦于以下问题:Java DragEditPartsTracker类的具体用法?Java DragEditPartsTracker怎么用?Java DragEditPartsTracker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DragEditPartsTracker类属于org.eclipse.gef.tools包,在下文中一共展示了DragEditPartsTracker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
@Override
public DragTracker getDragTracker(Request request) {
return new DragEditPartsTracker(this) {
protected EditPart getTargetEditPart() {
return getParent();
}
};
}
示例2: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
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;
}
};
}
示例3: initialize
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
/**
* 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()));
}
示例4: createNonResizableHandle
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
static Handle createNonResizableHandle(GraphicalEditPart owner, int direction)
{
ResizeHandle handle = new ResizeHandle(owner, direction);
handle.setCursor(Cursors.SIZEALL);
handle.setDragTracker(new DragEditPartsTracker(owner));
return handle;
}
示例5: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
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;
}
示例6: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
public DragTracker getDragTracker( Request req )
{
return new DragEditPartsTracker( this ) {
protected boolean handleDragInProgress( )
{
return true;
}
};
}
示例7: createHandle
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
static Handle createHandle( GraphicalEditPart owner, int direction )
{
ReportResizeHandle handle = new ReportResizeHandle( owner, direction );
handle.setCursor( SharedCursors.SIZEALL );
handle.setDragTracker( new DragEditPartsTracker( owner ) );
return handle;
}
示例8: createHandle
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
static Handle createHandle(GraphicalEditPart owner, int direction) {
ResizeHandle handle = new ResizeHandle(owner, direction);
handle.setCursor(SharedCursors.SIZEALL);
handle.setDragTracker(new DragEditPartsTracker(owner));
return handle;
}
示例9: createDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
/**
* 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;
}
示例10: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
public DragTracker getDragTracker( Request req )
{
DragEditPartsTracker track = new DragEditPartsTracker( this );
return track;
}
示例11: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
public DragTracker getDragTracker( Request req )
{
DragEditPartsTracker track = new ReportElementDragTracker( this );
return track;
}
示例12: createHandle
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
/**
* 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;
}
示例13: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
/**
* 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());
}
示例14: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
/**
* 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());
}
示例15: getDragTracker
import org.eclipse.gef.tools.DragEditPartsTracker; //导入依赖的package包/类
/**
* 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());
}