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


Java BendpointRequest.getIndex方法代码示例

本文整理汇总了Java中org.eclipse.gef.requests.BendpointRequest.getIndex方法的典型用法代码示例。如果您正苦于以下问题:Java BendpointRequest.getIndex方法的具体用法?Java BendpointRequest.getIndex怎么用?Java BendpointRequest.getIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.gef.requests.BendpointRequest的用法示例。


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

示例1: getCreateBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的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.requests.BendpointRequest; //导入方法依赖的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.requests.BendpointRequest; //导入方法依赖的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.requests.BendpointRequest; //导入方法依赖的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: getCreateBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
@Override
protected Command getCreateBendpointCommand(BendpointRequest request) {
	CreateBendpointCommand command=new CreateBendpointCommand();
	Point point = request.getLocation();
	int index=request.getIndex();
	Transition transition=(Transition)getHost().getModel();
	command.setIndex(index);
	command.setPoint(point);
	command.setTransition(transition);
	return command;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:12,代码来源:TransitionBendpointEditPolicy.java

示例6: getDeleteBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
@Override
protected Command getDeleteBendpointCommand(BendpointRequest request) {
	DeleteBendpointCommand command=new DeleteBendpointCommand();
	int index=request.getIndex();
	Transition transition=(Transition)getHost().getModel();
	command.setIndex(index);
	command.setTransition(transition);
	return command;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:10,代码来源:TransitionBendpointEditPolicy.java

示例7: getMoveBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
@Override
protected Command getMoveBendpointCommand(BendpointRequest request) {
	MoveBendpointCommand command=new MoveBendpointCommand();
	Point point = request.getLocation();
	int index=request.getIndex();
	Transition transition=(Transition)getHost().getModel();
	command.setIndex(index);
	command.setPoint(point);
	command.setTransition(transition);
	return command;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:12,代码来源:TransitionBendpointEditPolicy.java

示例8: getDeleteBendpointCommand

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

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

    final DeleteBendpointCommand command = new DeleteBendpointCommand(connection, bendpointrequest.getIndex());

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

示例9: getMoveBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getMoveBendpointCommand(final BendpointRequest bendpointrequest) {
    final ConnectionEditPart editPart = (ConnectionEditPart) getHost();

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

    final MoveBendpointCommand command = new MoveBendpointCommand(editPart, point.x, point.y, bendpointrequest.getIndex());

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

示例10: getDeleteBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getDeleteBendpointCommand(
		BendpointRequest bendpointrequest) {
	ConnectionElement connection = (ConnectionElement) getHost().getModel();

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

	DeleteBendpointCommand command = new DeleteBendpointCommand(
			diagram, connection, bendpointrequest.getIndex());

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

示例11: getMoveBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getMoveBendpointCommand(BendpointRequest bendpointrequest) {
	ConnectionEditPart editPart = (ConnectionEditPart) this.getHost();

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

	MoveBendpointCommand command = new MoveBendpointCommand(
			diagram, editPart, point.x, point.y, bendpointrequest.getIndex());

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

示例12: getDeleteBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
@Override
protected Command getDeleteBendpointCommand(BendpointRequest bendpointrequest) {
    final WalkerConnection connection = (WalkerConnection) getHost().getModel();

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

    final DeleteBendpointCommand command = new DeleteBendpointCommand(connection, bendpointrequest.getIndex());

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

示例13: getMoveBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
@Override
protected Command getMoveBendpointCommand(BendpointRequest bendpointrequest) {
    final ConnectionEditPart editPart = (ConnectionEditPart) getHost();

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

    final MoveBendpointCommand command = new MoveBendpointCommand(editPart, point.x, point.y, bendpointrequest.getIndex());

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

示例14: getDeleteBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getDeleteBendpointCommand(
		BendpointRequest bendpointrequest) {
	ConnectionElement connection = (ConnectionElement) getHost().getModel();

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

	DeleteBendpointCommand command = new DeleteBendpointCommand(connection,
			bendpointrequest.getIndex());

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

示例15: getMoveBendpointCommand

import org.eclipse.gef.requests.BendpointRequest; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Command getMoveBendpointCommand(BendpointRequest bendpointrequest) {
	ConnectionEditPart editPart = (ConnectionEditPart) this.getHost();

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

	MoveBendpointCommand command = new MoveBendpointCommand(editPart,
			point.x, point.y, bendpointrequest.getIndex());

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


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