@Test public void testGetSourcePositionWithNoWaypoint() { when(edge.getWaypoint()).thenReturn(Collections.emptyList()); Point2D point = PropertyReaderUtils.getSourcePosition(definitionResolver, EDGE_ID, SHAPE_ID); assertPoint(BOUNDS_WIDTH, BOUNDS_HEIGHT / 2, point); }
public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); return waypoint.isEmpty() ? sourcePosition(sourceBounds, resolutionFactor) : offsetPosition(sourceBounds, waypoint.get(0), resolutionFactor); }
PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); return waypoint.isEmpty() ? sourcePosition(sourceBounds, resolutionFactor) : offsetPosition(sourceBounds, waypoint.get(0), resolutionFactor); } }
PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); return waypoint.isEmpty() ? sourcePosition(sourceBounds, resolutionFactor) : offsetPosition(sourceBounds, waypoint.get(0), resolutionFactor); }  }
PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); return waypoint.isEmpty() ? sourcePosition(sourceBounds, resolutionFactor) : offsetPosition(sourceBounds, waypoint.get(0), resolutionFactor); }  static Point2D getSourcePosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String sourceId); static Point2D getTargetPosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String targetId); static List<Point2D> getControlPoints(DefinitionResolver definitionResolver,
                                                 String edgeId); static boolean isAutoConnectionSource(BaseElement element); static boolean isAutoConnectionTarget(BaseElement element); static WSDLImport toWSDLImports(Import imp); }
PropertyReaderUtils { public static Point2D getSourcePosition(DefinitionResolver definitionResolver, String edgeId, String sourceId) { final double resolutionFactor = definitionResolver.getResolutionFactor(); final Bounds sourceBounds = definitionResolver.getShape(sourceId).getBounds(); final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint(); return waypoint.isEmpty() ? sourcePosition(sourceBounds, resolutionFactor) : offsetPosition(sourceBounds, waypoint.get(0), resolutionFactor); }  static Point2D getSourcePosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String sourceId); static Point2D getTargetPosition(DefinitionResolver definitionResolver,
                                            String edgeId,
                                            String targetId); static List<Point2D> getControlPoints(DefinitionResolver definitionResolver,
                                                 String edgeId); static boolean isAutoConnectionSource(BaseElement element); static boolean isAutoConnectionTarget(BaseElement element); static WSDLImport toWSDLImports(Import imp);  }