本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}