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