org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx Java Examples
The following examples show how to use
org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransitionFigure.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected void setTolerance() { // Have to use reflection here, PolylineConnectionEx#calculateTolerance() is // private.... try { Field declaredField = PolylineConnectionEx.class.getDeclaredField("TOLERANCE"); declaredField.setAccessible(true); declaredField.set(null, TOLERANCE); } catch (Exception e) { e.printStackTrace(); } }
Example #2
Source File: TypeExtendingEditPart.java From scava with Eclipse Public License 2.0 | 4 votes |
/** * @generated */ public PolylineConnectionEx getPrimaryShape() { return (PolylineConnectionEx) getFigure(); }
Example #3
Source File: StreamTypeEditPart.java From scava with Eclipse Public License 2.0 | 4 votes |
/** * @generated */ public PolylineConnectionEx getPrimaryShape() { return (PolylineConnectionEx) getFigure(); }
Example #4
Source File: BonitaUnspecifiedTypeCreationTool.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
@Override protected boolean updateTargetUnderMouse() { if (!isTargetLocked()) { EditPart editPart = null; if(figure != null){ final Rectangle copy = figure.getBounds().getCopy(); final Rectangle shrink = copy; for(Object v : getCurrentViewer().getEditPartRegistry().keySet()){ if(v instanceof Connector){ ConnectionEditPart ep = (ConnectionEditPart) getCurrentViewer().getEditPartRegistry().get(v); int lineWidth = ((PolylineConnectionEx)ep.getFigure()).getLineWidth(); Rectangle bound = ((PolylineConnectionEx)ep.getFigure()).getSimpleBounds().getCopy().expand(new Insets(lineWidth, lineWidth, 0, 0)); if(bound.intersects(shrink)){ editPart = ep; } } } } if(editPart == null){ editPart = getCurrentViewer().findObjectAtExcluding( getLocation(), getExclusionSet(), getTargetingConditional()); if (editPart != null) { editPart = editPart.getTargetEditPart(getTargetRequest()); } } boolean changed = getTargetEditPart() != editPart; //In order to create additional Lanes in the diagram, we change the target edit part when we want to create a //lane and when the mouse is already over a lane if(eClass != null){ if(eClass.equals(ProcessPackage.eINSTANCE.getLane()) && ((IGraphicalEditPart)editPart).resolveSemanticElement() instanceof Lane){ setTargetEditPart(editPart.getParent().getParent());//set the target edit part as the CustomPoolCompartmentEditPart }else{ setTargetEditPart(editPart); } }else{ setTargetEditPart(editPart); } return changed; } else { return false; } }
Example #5
Source File: TypeExtendingEditPart.java From scava with Eclipse Public License 2.0 | 2 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected Connection createConnectionFigure() { return new PolylineConnectionEx(); }
Example #6
Source File: StreamTypeEditPart.java From scava with Eclipse Public License 2.0 | 2 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected Connection createConnectionFigure() { return new PolylineConnectionEx(); }