Enum ConnectionWidget.RoutingPolicy

java.lang.Object
java.lang.Enum<ConnectionWidget.RoutingPolicy>
org.netbeans.api.visual.widget.ConnectionWidget.RoutingPolicy
All Implemented Interfaces:
Serializable, Comparable<ConnectionWidget.RoutingPolicy>, java.lang.constant.Constable
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 Details

    • 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 Details

    • values

      public static ConnectionWidget.RoutingPolicy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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