org.netbeans.api.visual 2.21.1

org.netbeans.api.visual.widget
Enum ConnectionWidget.RoutingPolicy

java.lang.Object
  extended by java.lang.Enum<ConnectionWidget.RoutingPolicy>
      extended by org.netbeans.api.visual.widget.ConnectionWidget.RoutingPolicy
All Implemented Interfaces:
Serializable, Comparable<ConnectionWidget.RoutingPolicy>
Enclosing class:
ConnectionWidget

public static enum ConnectionWidget.RoutingPolicy
extends Enum<ConnectionWidget.RoutingPolicy>

This enum represents a policy which is used for re-routing control points of a ConnectionWidget.

Since:
2.9

Enum Constant Summary
ALWAYS_ROUTE
          All control points are rerouted when it is necessary.
DISABLE_ROUTING
          Disable routing completely, so control points are kept at their previous location.
DISABLE_ROUTING_UNTIL_END_POINT_IS_MOVED
          Temporarily disables routing until any end point changes its location.
UPDATE_END_POINTS_ONLY
          All control points (except end points) are kept at the same location.
 
Method Summary
static ConnectionWidget.RoutingPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ConnectionWidget.RoutingPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ALWAYS_ROUTE

public static final ConnectionWidget.RoutingPolicy ALWAYS_ROUTE
All control points are rerouted when it is necessary. This is the default policy.

Since:
2.9

UPDATE_END_POINTS_ONLY

public static final ConnectionWidget.RoutingPolicy UPDATE_END_POINTS_ONLY
All control points (except end points) are kept at the same location. End points are updated to locations resolved by source and target anchors. Note: This is used when an user customizes/adds/removes control points and the change has to be kept until it is reset by the user (setting policy to ALWAYS_ROUTE.

Since:
2.9

DISABLE_ROUTING_UNTIL_END_POINT_IS_MOVED

public static final ConnectionWidget.RoutingPolicy DISABLE_ROUTING_UNTIL_END_POINT_IS_MOVED
Temporarily disables routing until any end point changes its location. Locations are the first and the last point of control points. When an end point location is changed, then the policy is automatically changed to ALWAYS_ROUTE. Note: This is used by GraphLayouts which routes the path (control points) by themselves and would like to keep the path until user moves with source or target widget/anchor.

Since:
2.9

DISABLE_ROUTING

public static final ConnectionWidget.RoutingPolicy DISABLE_ROUTING
Disable routing completely, so control points are kept at their previous location. Note: This is not often used unless you have to freeze a ConnectionWidget

Since:
2.9
Method Detail

values

public static ConnectionWidget.RoutingPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ConnectionWidget.RoutingPolicy c : ConnectionWidget.RoutingPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ConnectionWidget.RoutingPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

org.netbeans.api.visual 2.21.1

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