Class RouterFactory

java.lang.Object
org.netbeans.api.visual.router.RouterFactory

public final class RouterFactory extends Object
This class creates built-in routers. All implementations can be shared by multiple widgets.
  • Method Details

    • createDirectRouter

      public static Router 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

      public static 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

      public static Router createOrthogonalSearchRouter(LayerWidget... layers)
      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

      public static Router createOrthogonalSearchRouter(CollisionsCollector collector)
      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

      public static Router createOrthogonalSearchRouter(ConnectionWidgetCollisionsCollector collector)
      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