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


Java ResizableEditPolicy类代码示例

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


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

示例1: eraseSourceFeedback

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.editparts.AbstractEditPart#eraseSourceFeedback(org.eclipse.gef.Request)
 */
public void eraseSourceFeedback(Request request) {
    if (isActive()) {
        EditPolicyIterator iter = getEditPolicyIterator();
        while (iter.hasNext()) {
            EditPolicy nextEditPolicy = iter.next();
            if(nextEditPolicy instanceof ResizableEditPolicy) {
                List<Object> feedbackList = getLayer(LayerConstants.FEEDBACK_LAYER).getChildren();
                if(null == feedbackList || feedbackList.isEmpty()){
                    continue;
                }
            }
            nextEditPolicy.eraseSourceFeedback(request);
        }
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:19,代码来源:LifeLineEditPart.java

示例2: getPrimaryDragEditPolicy

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
/**
 * @generated
 */
@Override
public EditPolicy getPrimaryDragEditPolicy() {
  EditPolicy result = super.getPrimaryDragEditPolicy();
  if (result instanceof ResizableEditPolicy) {
    ResizableEditPolicy ep = (ResizableEditPolicy) result;
    ep.setResizeDirections(PositionConstants.NONE);
  }
  return result;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:13,代码来源:RotativeImageEditPart.java

示例3: createChildEditPolicy

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
	if(child instanceof NodeElementEditPart){
		return new ResizableEditPolicy();
	}else{
		return new NonResizableEditPolicy();			
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:9,代码来源:NodeXYLayoutEditPolicy.java

示例4: deactivateEditPolicies

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.editparts.AbstractEditPart#deactivateEditPolicies()
 */
protected void deactivateEditPolicies() {
    EditPolicyIterator iter = getEditPolicyIterator();
    while (iter.hasNext()) {
        EditPolicy nextEditPolicy = iter.next();
        if(nextEditPolicy instanceof ResizableEditPolicy) {
            List<Object> feedbackList = getLayer(LayerConstants.FEEDBACK_LAYER).getChildren();
            if(null == feedbackList || feedbackList.isEmpty()){
                continue;
            }
        }
        nextEditPolicy.deactivate();
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:17,代码来源:LifeLineEditPart.java

示例5: getPrimaryDragEditPolicy

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
/**
 * @generated
 */
public EditPolicy getPrimaryDragEditPolicy() {
	EditPolicy result = super.getPrimaryDragEditPolicy();
	if (result instanceof ResizableEditPolicy) {
		ResizableEditPolicy ep = (ResizableEditPolicy) result;
		ep.setResizeDirections(PositionConstants.NONE);
	}
	return result;
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:12,代码来源:EndEvent2EditPart.java

示例6: createChildEditPolicy

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
protected EditPolicy createChildEditPolicy( EditPart child )
{
	return new ResizableEditPolicy( ) {

		protected IFigure createDragSourceFeedbackFigure( )
		{
			// Use a ghost rectangle for feedback
			Figure r = new Figure( ) {

				protected void paintFigure( Graphics graphics )
				{
					Rectangle rect = getBounds( ).getCopy( );

					graphics.setXORMode( true );
					graphics.setForegroundColor( ColorConstants.white );
					graphics.setBackgroundColor( ColorManager.getColor( 31,
							31,
							31 ) );

					graphics.translate( getLocation( ) );

					PointList outline = new PointList( );

					outline.addPoint( 0, 0 );
					outline.addPoint( rect.width, 0 );
					outline.addPoint( rect.width - 1, 0 );
					outline.addPoint( rect.width - 1, rect.height - 1 );
					outline.addPoint( 0, rect.height - 1 );

					graphics.fillPolygon( outline );

					// draw the inner outline
					PointList innerLine = new PointList( );

					innerLine.addPoint( rect.width - 0 - 1, 0 );
					innerLine.addPoint( rect.width - 0 - 1, 0 );
					innerLine.addPoint( rect.width - 1, 0 );
					innerLine.addPoint( rect.width - 0 - 1, 0 );
					innerLine.addPoint( 0, 0 );
					innerLine.addPoint( 0, rect.height - 1 );
					innerLine.addPoint( rect.width - 1, rect.height - 1 );
					innerLine.addPoint( rect.width - 1, 0 );

					graphics.drawPolygon( innerLine );

					graphics.drawLine( rect.width - 0 - 1,
							0,
							rect.width - 1,
							0 );

					graphics.translate( getLocation( ).getNegated( ) );
				}
			};

			r.setBounds( getInitialFeedbackBounds( ) );
			addFeedback( r );
			return r;
		}

	};
}
 
开发者ID:eclipse,项目名称:birt,代码行数:62,代码来源:JoinXYLayoutEditPolicy.java

示例7: createChildEditPolicy

import org.eclipse.gef.editpolicies.ResizableEditPolicy; //导入依赖的package包/类
protected EditPolicy createChildEditPolicy(EditPart child) {
    ResizableEditPolicy policy = new ResizableEditPolicy();
    policy.setResizeDirections(PositionConstants.EAST_WEST);
    return policy;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:6,代码来源:HorizontalBlocklayoutPolicy.java


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