org.netbeans.api.visual 2.21.1

org.netbeans.api.visual.router
Class RouterFactory

java.lang.Object
  extended by 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 Summary
static Router createDirectRouter()
          Creates a direct router.
static Router createFreeRouter()
          Creates a free router.
static Router createOrthogonalSearchRouter(CollisionsCollector collector)
          Creates an orthogonal search router.
static Router createOrthogonalSearchRouter(ConnectionWidgetCollisionsCollector collector)
          Creates an orthogonal search router.
static Router createOrthogonalSearchRouter(LayerWidget... layers)
          Creates an orthogonal search router.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

org.netbeans.api.visual 2.21.1

Built on March 26 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.