当前位置: 首页>>代码示例>>Java>>正文


Java MoveHandle类代码示例

本文整理汇总了Java中org.eclipse.gef.handles.MoveHandle的典型用法代码示例。如果您正苦于以下问题:Java MoveHandle类的具体用法?Java MoveHandle怎么用?Java MoveHandle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MoveHandle类属于org.eclipse.gef.handles包,在下文中一共展示了MoveHandle类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
 * Create selection handles in the style as predefined in DeltaEcore
 * @see DEGraphicalEditorTheme
 */
@Override
protected List<Object> createSelectionHandles() {
	List<Object> list = new ArrayList<Object>();

	MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
	moveHandle.setDragTracker(getDragTracker());		
	
	if (isDragAllowed()) {
		moveHandle.setCursor(Cursors.SIZEALL);
	} else {
		moveHandle.setCursor(SharedCursors.ARROW);
	}
	
	// set line style to meet the predefined theme
	DEGraphicalEditorTheme theme = DEGraphicalEditor.getTheme();
	LineBorder border = new LineBorder();
	border.setColor(theme.getSelectionSecondaryColor());
	border.setWidth(theme.getLineWidth());
	moveHandle.setBorder(border);
	
	list.add(moveHandle);
	
	return list;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:29,代码来源:DwThemedNonResizableEditPolicy.java

示例2: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@Override
protected List<AbstractHandle> createSelectionHandles() {
	List<AbstractHandle> list = new ArrayList<AbstractHandle>();

	MoveHandle handle = new MoveHandle((GraphicalEditPart) getHost());
	handle.setBorder(new MarginBorder(5));
	list.add(handle);

	// BandButtonPadHandle buttonPadHandle=new BandButtonPadHandle((GraphicalEditPart)getHost());
	// buttonPadHandle.setBorder(null);
	// list.add(buttonPadHandle);
	// NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), list);
	// list.add(new CellResizeHandle2((GraphicalEditPart) getHost(), PositionConstants.SOUTH));
	// // if (hasNorth)
	// list.add(new CellResizeHandle2((GraphicalEditPart) getHost(), PositionConstants.NORTH));
	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:BandResizableEditPolicy.java

示例3: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@Override
protected List<AbstractHandle> createSelectionHandles() {
	List<AbstractHandle> list = new ArrayList<AbstractHandle>();

	MoveHandle handle = new MoveHandle((GraphicalEditPart) getHost());
	handle.setBorder(new MarginBorder(5));
	list.add(handle);
	
	//	 BandButtonPadHandle buttonPadHandle=new BandButtonPadHandle((GraphicalEditPart)getHost());
	//	 buttonPadHandle.setBorder(null);
	//	 list.add(buttonPadHandle);
	// NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), list);
	// list.add(new CellResizeHandle2((GraphicalEditPart) getHost(), PositionConstants.SOUTH));
	// // if (hasNorth)
	// list.add(new CellResizeHandle2((GraphicalEditPart) getHost(), PositionConstants.NORTH));
	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:BandResizableEditPolicy.java

示例4: activate

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@Override
public void activate() {
	super.activate();
	
	moveHandle = new MoveHandle((GraphicalEditPart)getHost()) {

		@Override
		protected void paintFigure(Graphics graphics) {
			if (getHostFigure().isShowing()) {
				graphics.setBackgroundColor(getHostFigure().getBackgroundColor());
				super.paintFigure(graphics);
			}
		}
		
	};
	moveHandle.setOpaque(true);
	moveHandle.setBorder(null);
	getLayer(TreeTimelineDataEditPart.LAYER_DATA_ROWS_LAYER).add(moveHandle);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:20,代码来源:RowDataBackgroundEditPolicy.java

示例5: createDefaultEditPolicies

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
 * @generated
 */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
            new LabelDirectEditPolicy());
    installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
            new DcaseTextSelectionEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
            new NonResizableLabelEditPolicy() {

                protected List createSelectionHandles() {
                    MoveHandle mh = new MoveHandle(
                            (GraphicalEditPart) getHost());
                    mh.setBorder(null);
                    return Collections.singletonList(mh);
                }
            });
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:21,代码来源:DcaseLink004Userdef001DescUserdef00EditPart.java

示例6: createDefaultEditPolicies

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
 * @generated
 */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE,
            new LabelDirectEditPolicy());
    installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
            new DcaseTextSelectionEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
            new NonResizableLabelEditPolicy() {

                protected List createSelectionHandles() {
                    MoveHandle mh = new MoveHandle(
                            (GraphicalEditPart) getHost());
                    mh.setBorder(null);
                    return Collections.singletonList(mh);
                }
            });
    installEditPolicy(EditPolicyRoles.OPEN_ROLE,
            new BasicLinkOpenEditPolicy());
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:23,代码来源:DcaseLink003Userdef001DescUserdef00EditPart.java

示例7: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected List<Figure> createSelectionHandles() {
	List<Figure> list=super.createSelectionHandles();
	List<IFigure> figures=this.getHostFigure().getChildren();
	for(IFigure figure:figures){
		if(figure instanceof Label){
			list.add(new MoveHandle((GraphicalEditPart)this.getHost(),new MoveHandleLocator(figure)));
		}
	}
	return list;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:13,代码来源:TransitionConnectionEndpointEditPolicy.java

示例8: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
 * @generated
 */
protected List createSelectionHandles() {
	MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
	moveHandle.setBorder(null);
	moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
	return Collections.singletonList(moveHandle);
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:10,代码来源:StatemachineTextNonResizableEditPolicy.java

示例9: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@Override
protected List<Handle> createSelectionHandles() {
	List<Handle> list = new ArrayList<Handle>();

	GraphicalEditPart geditPart = getHost();
	list.add(new CellResizeHandle2(geditPart, PositionConstants.SOUTH));
	list.add(new CellResizeHandle2(geditPart, PositionConstants.NORTH));
	list.add(new CellResizeHandle2(geditPart, PositionConstants.EAST));
	list.add(new CellResizeHandle2(geditPart, PositionConstants.WEST));

	MoveHandle hand = new CellMoveHandle(geditPart, true, true);
	list.add(hand);

	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:16,代码来源:CrosstabCellResizableEditPolicy.java

示例10: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@Override
protected List<Handle> createSelectionHandles() {
	List<Handle> list = new ArrayList<Handle>();

	GraphicalEditPart geditPart = getHost();
	list.add(new CellResizeHandle2(geditPart, PositionConstants.SOUTH));
	list.add(new CellResizeHandle2(geditPart, PositionConstants.NORTH));
	list.add(new CellResizeHandle2(geditPart, PositionConstants.EAST));
	list.add(new CellResizeHandle2(geditPart, PositionConstants.WEST));

	MoveHandle hand = new CellMoveHandle(geditPart, true, false, -3);
	list.add(hand);

	return list;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:16,代码来源:TableCellResizableEditPolicy.java

示例11: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
protected List createSelectionHandles() {
	List handles = super.createSelectionHandles();
	List<IFigure> children = (List<IFigure>) getHostFigure().getChildren();
	for (IFigure figure : children) {
		if (figure instanceof Label)
			handles.add(new MoveHandle((GraphicalEditPart) getHost(),
					new MoveHandleLocator(figure)));
	}
	return handles;
}
 
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:13,代码来源:ConnectionEndpointEditPolicy.java

示例12: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
* @generated
*/
protected List createSelectionHandles() {
	MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
	moveHandle.setBorder(null);
	moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
	return Collections.singletonList(moveHandle);
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:10,代码来源:ICSE15_SequenceDiagram_MAVOTextNonResizableEditPolicy.java

示例13: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
 * @generated
 */
@SuppressWarnings("rawtypes")
protected List createSelectionHandles() {
	MoveHandle h = new MoveHandle((GraphicalEditPart) getHost());
	h.setBorder(null);
	return Collections.singletonList(h);
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:10,代码来源:RelationalDatabaseEditPart.java

示例14: createSelectionHandles

import org.eclipse.gef.handles.MoveHandle; //导入依赖的package包/类
/**
 * @generated
 */
protected List createSelectionHandles() {
    MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
    moveHandle.setBorder(null);
    moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
    return Collections.singletonList(moveHandle);
}
 
开发者ID:d-case,项目名称:d-case_editor,代码行数:10,代码来源:DcaseTextNonResizableEditPolicy.java


注:本文中的org.eclipse.gef.handles.MoveHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。