Search this API

y.layout
Class NodeLabelingPolicy

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

public final class NodeLabelingPolicy
extends java.lang.Object

The NodeLabelingPolicy provides specifiers defining how node labels are placed by the integrated node labeling mechanism of algorithms BalloonLayouter, CactusGroupLayouter, CircularLayouter and RadialLayouter.

See Also:
BalloonLayouter.setNodeLabelingPolicy(byte), CactusGroupLayouter.setNodeLabelingPolicy(byte), CircularLayouter.setNodeLabelingPolicy(byte), RadialLayouter.setNodeLabelingPolicy(byte)
 

Field Summary
static byte NODE_LABELING_HORIZONTAL
          Node labeling policy for horizontal label placement at all nodes.
static byte NODE_LABELING_MIXED
          Node labeling policy for ray-like label placement at nodes with zero children or nodes that are placed on the perimeter of a circular component.
static byte NODE_LABELING_RAYLIKE
          Node labeling policy for ray-like label placement at nodes with zero or one child node or nodes that are placed on the perimeter of a circular component.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_LABELING_RAYLIKE

public static final byte NODE_LABELING_RAYLIKE
Node labeling policy for ray-like label placement at nodes with zero or one child node or nodes that are placed on the perimeter of a circular component.

Labels belonging to nodes with zero or exactly one successor (thus forming a sort of chain) will not be oriented horizontal but ray-like; they get the same orientation as their nodes' incoming edge. For the circular layout, nodes that are placed on the perimeter of a circular component and have neighbors connected only to this component will also be placed ray-like. The labels of the other nodes will be oriented horizontally and placed at the center of the corresponding node.

BalloonLayouter places the label of nodes in the inner circles ray-like inside the nodes with the same orientation as their nodes' incoming edge. RadialLayouter places these labels outside the nodes with the same angle as the nodes.

CircularLayouter places the label of nodes that belong to the perimeter of a circle ray-like outside the node with the same orientation as their nodes' incoming edge. If the partition style is CircularLayouter.BCC_COMPACT or CircularLayouter.BCC_ISOLATED, the labels of the nodes that are connected to more than one circular components will be also placed horizontal, even if they are placed on the perimeter of the circle. Labels of nodes that belong on a chain will be placed ray-like but inside the node with the same orientation as their nodes' incoming edge.

CactusGroupLayouter places the labels of inner nodes ray-like inside the nodes with the same orientation as their placement relative to their parent node. The labels of leaves are placed outside the nodes with the same angle as the leaves' placement relative to their parent node.

See Also:
Constant Field Values
Sample Graphs:

Ray-like labels for leaf nodes and nodes with outdegree = 1 (Balloon Layout)

Ray-like labels for leaf nodes and nodes with outdegree = 1 (Radial Layout)

Ray-like labels for nodes on the perimeter of a circle with neighbors connected to the same circle, for nodes that belong on chains or nodes with no children (Circular Layout)

Ray-like labels for leaf nodes and inner nodes, horizontal labels for the root (Cactus Group Layout)

NODE_LABELING_MIXED

public static final byte NODE_LABELING_MIXED
Node labeling policy for ray-like label placement at nodes with zero children or nodes that are placed on the perimeter of a circular component.

BalloonLayouter places the labels corresponding to leaf nodes outside the node (without overlaps) with the same orientation as their nodes' incoming edge. RadialLayouter places these labels also outside the nodes with the same angle as the nodes. CircularLayouter places the label of nodes with no children or of nodes that belong to the perimeter of a circle and have neighbors at the same circle ray-like outside the node with the same orientation as their nodes' incoming edge. The labels of the other nodes will be oriented horizontally and placed at the center of the corresponding node.

CactusGroupLayouter places the labels of inner nodes horizontally at the center of the corresponding node. The labels of leaves are placed outside the nodes with the same angle as the leaves' placement relative to their parent node.

See Also:
Constant Field Values
Sample Graphs:

Ray-like labels for leaf nodes (Radial Layout)

Ray-like labels for nodes on the perimeter of a circle with neighbors connected to the same circle and nodes with no children (Circular Layout)

Ray-like labels for leaf nodes, horizontal labels for all inner nodes (Cactus Group Layout)

NODE_LABELING_HORIZONTAL

public static final byte NODE_LABELING_HORIZONTAL
Node labeling policy for horizontal label placement at all nodes.

The node labels are placed at the center of the corresponding node.

See Also:
Constant Field Values
Sample Graphs:

Horizontal labels

Horizontal labels (Cactus Group Layout)

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