public abstract class AbstractEdgeRouter extends java.lang.Object implements EdgeRouter
Modifier and Type | Class and Description |
---|---|
static class |
AbstractEdgeRouter.RoundedPathMaker
Path maker that uses rounded corners
|
static class |
AbstractEdgeRouter.SimplePathMaker
Basic path maker that just uses straight line segments
|
Constructor and Description |
---|
AbstractEdgeRouter() |
Modifier and Type | Method and Description |
---|---|
protected abstract java.awt.Point |
getBlockLocation(java.util.UUID id) |
protected com.google.common.base.Function<java.util.List<java.awt.Point>,java.awt.geom.Path2D> |
newPathMaker()
Can override this to have a custom path maker.
|
java.awt.geom.Path2D |
route(AnchorPoint start,
AnchorPoint end)
Find a route starting and ending at an anchor point.
|
java.awt.geom.Path2D |
route(AnchorPoint start,
java.awt.Point end)
Find a route starting at an anchor point and ending at any arbitrary point
|
protected abstract java.util.List<java.awt.Point> |
route(java.awt.Point start,
java.awt.Point end,
java.awt.Point trueStart,
java.awt.Point trueEnd)
Find the route from start to end.
|
java.util.List<java.awt.geom.Path2D> |
routeAll(java.util.Collection<Connection> connections)
Calculate routes for all connections
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
paintDebug, setup
protected abstract java.awt.Point getBlockLocation(java.util.UUID id)
public java.awt.geom.Path2D route(AnchorPoint start, AnchorPoint end)
EdgeRouter
route
in interface EdgeRouter
public java.util.List<java.awt.geom.Path2D> routeAll(java.util.Collection<Connection> connections)
EdgeRouter
routeAll
in interface EdgeRouter
public java.awt.geom.Path2D route(AnchorPoint start, java.awt.Point end)
EdgeRouter
route
in interface EdgeRouter
protected abstract java.util.List<java.awt.Point> route(java.awt.Point start, java.awt.Point end, java.awt.Point trueStart, java.awt.Point trueEnd)
protected com.google.common.base.Function<java.util.List<java.awt.Point>,java.awt.geom.Path2D> newPathMaker()