Search this API

y.layout
Class Intersections

java.lang.Object
  extended by y.layout.Intersections

public class Intersections
extends java.lang.Object

This class provides methods for finding intersections between graph items.

 

Field Summary
static byte ALL
          A graph item type that indicates that all items are taken in consideration for intersection calculation.
static byte EDGE
          A graph item type that indicates that edges are taken in consideration for intersection calculation.
static byte EDGE_LABEL
          A graph item type that indicates that edge labels are taken in consideration for intersection calculation.
static byte LABEL
          A graph item type that indicates that all labels are taken in consideration for intersection calculation.
static byte NODE
          A graph item type that indicates that nodes are taken in consideration for intersection calculation.
static byte NODE_LABEL
          A graph item type that indicates that node labels are taken in consideration for intersection calculation.
 
Method Summary
static java.util.List findIntersections(LayoutGraph graph, byte intersectionItemType, java.util.List affectedItems)
          Returns a list of intersections between the graph items or a subset of graph items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE

public static final byte NODE
A graph item type that indicates that nodes are taken in consideration for intersection calculation.

See Also:
Constant Field Values

EDGE

public static final byte EDGE
A graph item type that indicates that edges are taken in consideration for intersection calculation.

See Also:
Constant Field Values

NODE_LABEL

public static final byte NODE_LABEL
A graph item type that indicates that node labels are taken in consideration for intersection calculation.

See Also:
Constant Field Values

EDGE_LABEL

public static final byte EDGE_LABEL
A graph item type that indicates that edge labels are taken in consideration for intersection calculation.

See Also:
Constant Field Values

LABEL

public static final byte LABEL
A graph item type that indicates that all labels are taken in consideration for intersection calculation.

See Also:
Constant Field Values

ALL

public static final byte ALL
A graph item type that indicates that all items are taken in consideration for intersection calculation.

See Also:
Constant Field Values
Method Detail

findIntersections

public static java.util.List findIntersections(LayoutGraph graph,
                                               byte intersectionItemType,
                                               java.util.List affectedItems)
Returns a list of intersections between the graph items or a subset of graph items.

Finds only intersections where one or more items of the list of affected items are involved. Intersections involving only other items are ignored. If the list of affected items is empty or the items are excluded due to the intersection item type, the result will not contain any intersections.

Parameters:
graph - the input graph
intersectionItemType - the type(s) of graph items to consider
affectedItems - the list of items that must be involved in each intersection or null if all items should be considered; can contain instances of type Node, Edge, NodeLabelLayout, EdgeLabelLayout and LabelLayoutData
Returns:
a list of intersections (of type IntersectionInfo) between graph items

© Copyright 2000-2025,
yWorks GmbH.
All rights reserved.