public EdgeShape(Graph<V, E> g) { this.graph = g; this.box = new Box(); this.loop = new Loop(); this.simpleLoop = new SimpleLoop(); }
public static <V, E> EdgeShape<V, E>.Orthogonal orthogonal(Graph<V, E> graph) { return new EdgeShape<V, E>(graph).new Orthogonal(); }
@Override public AbstractEdgeShapeTransformer<AbstractType,String> getEdgeShapeTransformer() { return new EdgeShape.Line<AbstractType,String> (); }
@Override public void setEdgeIndexFunction(EdgeIndexFunction<N, E> parallelEdgeIndexFunction) { this.edgeIndexFunction = parallelEdgeIndexFunction; loop.setEdgeIndexFunction(parallelEdgeIndexFunction); }
@Override public AbstractEdgeShapeTransformer<AbstractType,String> getEdgeShapeTransformer() { return new EdgeShape.Loop<AbstractType,String> (); } }
public static <E> Wedge wedge(int width) { return new Wedge(width); }
public void setEdgeShapeFunction(Function<Context<Network<N, E>, E>, Shape> edgeShapeFunction) { this.edgeShapeFunction = edgeShapeFunction; if (edgeShapeFunction instanceof ParallelEdgeShapeFunction) { @SuppressWarnings("unchecked") ParallelEdgeShapeFunction<N, E> function = (ParallelEdgeShapeFunction<N, E>) edgeShapeFunction; function.setEdgeIndexFunction(this.parallelEdgeIndexFunction); } }
public Shape apply(Context<Network<N, E>, E> context) { Network graph = context.graph; E e = context.element; return isLoop(graph, e) ? box.apply(context) : LINE; } }
public void setEdgeShapeTransformer(Function<? super E, Shape> edgeShapeTransformer) { this.edgeShapeTransformer = edgeShapeTransformer; if (edgeShapeTransformer instanceof ParallelEdgeShapeTransformer) { @SuppressWarnings("unchecked") ParallelEdgeShapeTransformer<V, E> transformer = (ParallelEdgeShapeTransformer<V, E>)edgeShapeTransformer; if (transformer instanceof EdgeShape.Orthogonal) { transformer.setEdgeIndexFunction(this.incidentEdgeIndexFunction); } else { transformer.setEdgeIndexFunction(this.parallelEdgeIndexFunction); } } }
public static <E> CubicCurve cubicCurve() { return new CubicCurve(); }
public static <N, E> Line<N, E> line() { return new Line<N, E>(); }
public void setEdgeIndexFunction(EdgeIndexFunction<ONDEXConcept, ONDEXRelation> parallelEdgeIndexFunction) { this.parallelEdgeIndexFunction = parallelEdgeIndexFunction; loop.setEdgeIndexFunction(parallelEdgeIndexFunction); }
@Override public AbstractEdgeShapeTransformer<AbstractType,String> getEdgeShapeTransformer() { return new EdgeShape.Loop<AbstractType,String> (); } }
public void setEdgeIndexFunction(EdgeIndexFunction<N, E> edgeIndexFunction) { this.edgeIndexFunction = edgeIndexFunction; loop.setEdgeIndexFunction(edgeIndexFunction); }
public void setEdgeIndexFunction(EdgeIndexFunction<N, E> edgeIndexFunction) { this.edgeIndexFunction = edgeIndexFunction; loop.setEdgeIndexFunction(edgeIndexFunction); }