Class RouterFactory
java.lang.Object
org.netbeans.api.visual.router.RouterFactory
This class creates built-in routers. All implementations can be shared by multiple widgets.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Router
Creates a direct router.static Router
Creates a free router.static Router
createOrthogonalSearchRouter
(CollisionsCollector collector) Creates an orthogonal search router.static Router
Creates an orthogonal search router.static Router
createOrthogonalSearchRouter
(LayerWidget... layers) Creates an orthogonal search router.
-
Method Details
-
createDirectRouter
Creates a direct router. The path is direct (single-segment) line between source and target anchor of a connection widget. The instance can be shared by multiple widgets.- Returns:
- the direct router
-
createFreeRouter
Creates a free router. The path persist control points created by users using AddRemoveControlPointAction. The instance can be shared by multiple widgets.- Returns:
- the free router
-
createOrthogonalSearchRouter
Creates an orthogonal search router. The router gathers collision regions from widget that are placed in specified layers. The instance can be shared by multiple widgets.- Parameters:
layers
- the layers with widgets taken as collisions regions- Returns:
- the orthogonal search router
-
createOrthogonalSearchRouter
Creates an orthogonal search router. The router uses collision regions from specified collector. The instance can be shared by multiple widgets.- Parameters:
collector
- the collision collector- Returns:
- the orthogonal search router
-
createOrthogonalSearchRouter
Creates an orthogonal search router. The router uses collision regions from specified collector with a connection widget context. The instance can be shared by multiple widgets.- Parameters:
collector
- the collision collector- Returns:
- the orthogonal search router
- Since:
- 2.2
-