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


Java AbstractConnectionEditPart类代码示例

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


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

示例1: getCreateBendpointCommand

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getCreateBendpointCommand(final BendpointRequest bendpointrequest) {
    final AbstractConnectionEditPart connectionEditPart = (AbstractConnectionEditPart) getHost();
    final ConnectionElement connection = (ConnectionElement) connectionEditPart.getModel();

    if (connection.getSource() == connection.getTarget()) {
        return null;
    }

    final Point point = bendpointrequest.getLocation();
    getConnection().translateToRelative(point);

    final CreateBendpointCommand createBendpointCommand = new CreateBendpointCommand(connection, point.x, point.y, bendpointrequest.getIndex());

    return createBendpointCommand;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:20,代码来源:ERDiagramBendpointEditPolicy.java

示例2: getCreateBendpointCommand

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getCreateBendpointCommand(
		BendpointRequest bendpointrequest) {
	AbstractConnectionEditPart connectionEditPart = (AbstractConnectionEditPart) this
			.getHost();
	ConnectionElement connection = (ConnectionElement) connectionEditPart
			.getModel();

	if (connection.getSource() == connection.getTarget()) {
		return null;
	}

	Point point = bendpointrequest.getLocation();
	this.getConnection().translateToRelative(point);

	CreateBendpointCommand createBendpointCommand = new CreateBendpointCommand(
			this.diagram.getCurrentCategory(),
			connection, point.x, point.y, bendpointrequest.getIndex());

	return createBendpointCommand;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:25,代码来源:ERDiagramBendpointEditPolicy.java

示例3: getCreateBendpointCommand

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
@Override
protected Command getCreateBendpointCommand(BendpointRequest bendpointrequest) {
    final AbstractConnectionEditPart connectionEditPart = (AbstractConnectionEditPart) getHost();
    final WalkerConnection connection = (WalkerConnection) connectionEditPart.getModel();

    if (connection.getSourceWalker() == connection.getTargetWalker()) {
        return null;
    }

    final Point point = bendpointrequest.getLocation();
    getConnection().translateToRelative(point);

    final CreateBendpointCommand createBendpointCommand =
            new CreateBendpointCommand(connection, point.x, point.y, bendpointrequest.getIndex());

    return createBendpointCommand;
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:18,代码来源:ERDiagramBendpointEditPolicy.java

示例4: getCreateBendpointCommand

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getCreateBendpointCommand(
		BendpointRequest bendpointrequest) {
	AbstractConnectionEditPart connectionEditPart = (AbstractConnectionEditPart) this
			.getHost();
	ConnectionElement connection = (ConnectionElement) connectionEditPart
			.getModel();

	if (connection.getSource() == connection.getTarget()) {
		return null;
	}

	Point point = bendpointrequest.getLocation();
	this.getConnection().translateToRelative(point);

	CreateBendpointCommand createBendpointCommand = new CreateBendpointCommand(
			connection, point.x, point.y, bendpointrequest.getIndex());

	return createBendpointCommand;
}
 
开发者ID:justinkwony,项目名称:ermaster-nhit,代码行数:24,代码来源:ERDiagramBendpointEditPolicy.java

示例5: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof SimpleBPMN.diagram.part.SimpleBPMNDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:bluezio,项目名称:simplified-bpmn-example,代码行数:26,代码来源:SimpleBPMNValidationDecoratorProvider.java

示例6: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed)
				.getEditorPart() instanceof edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.part.ICSE15_SequenceDiagram_MAVODiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:ICSE15_SequenceDiagram_MAVOValidationDecoratorProvider.java

示例7: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof edu.toronto.cs.se.modelepedia.necsis14_classdiagram.diagram.part.NECSIS14_ClassDiagramDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:NECSIS14_ClassDiagramValidationDecoratorProvider.java

示例8: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof edu.toronto.cs.se.modelepedia.necsis14_databaseschema.diagram.part.NECSIS14_DatabaseSchemaDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:NECSIS14_DatabaseSchemaValidationDecoratorProvider.java

示例9: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof MIDDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:MIDValidationDecoratorProvider.java

示例10: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof MIDDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:23,代码来源:MIDValidationDecoratorProvider.java

示例11: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed)
				.getEditorPart() instanceof edu.toronto.cs.se.modelepedia.relationaldatabase_mavo.diagram.part.RelationalDatabase_MAVODiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:RelationalDatabase_MAVOValidationDecoratorProvider.java

示例12: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof RelationalDatabaseDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:RelationalDatabaseValidationDecoratorProvider.java

示例13: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
* @generated
*/
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed)
				.getEditorPart() instanceof edu.toronto.cs.se.modelepedia.istar_mavo.diagram.part.IStar_MAVODiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:24,代码来源:IStar_MAVOValidationDecoratorProvider.java

示例14: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof IStarDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:IStarValidationDecoratorProvider.java

示例15: createDecorators

import org.eclipse.gef.editparts.AbstractConnectionEditPart; //导入依赖的package包/类
/**
 * @generated
 */
public void createDecorators(IDecoratorTarget decoratorTarget) {
	EditPart editPart = (EditPart) decoratorTarget
			.getAdapter(EditPart.class);
	if (editPart instanceof GraphicalEditPart
			|| editPart instanceof AbstractConnectionEditPart) {
		Object model = editPart.getModel();
		if ((model instanceof View)) {
			View view = (View) model;
			if (!(view instanceof Edge) && !view.isSetElement()) {
				return;
			}
		}
		EditDomain ed = editPart.getViewer().getEditDomain();
		if (!(ed instanceof DiagramEditDomain)) {
			return;
		}
		if (((DiagramEditDomain) ed).getEditorPart() instanceof StateMachineDiagramEditor) {
			decoratorTarget.installDecorator(KEY, new StatusDecorator(
					decoratorTarget));
		}
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:StateMachineValidationDecoratorProvider.java


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