Modeling T-Connections Using Edge Labels
Applies to: yFiles 2.5 print article email article

Type: Tips & Tricks

T-style connections like they are described in modeling notations such as UML can be easily realized using edge labels.

T-style connections as shown in the below figure can be modeled using an edge label having an additional line that visually links the label box to its edge.

T-connection

Tutorial demo application YLabelConfigurationDemo.java presents the setup for a label configuration that uses a customized implementation for the YLabel.Painter interface which draws a light gray line between the edge and the label. A special helper class ensures that the line is drawn perpendicular to the edge's path.

When used in conjuction with a layout algorithm that provides support for integrated edge labeling, like, e.g., orthogonal layout, the edge label is placed near its edge and the T-style connection can be nicely observed.

Please note that the scheme presented in YLabelConfigurationDemo only suits for modeling annotations that belong to a single edge. Tutorial demo application EdgeConnectorDemo.java shows a solution that allows to model annotations belonging to multiple edges.


Keywords: T-connector - T-connection - edge - label - EdgeLabel - BPMN - UML - link - notation - modeling - configuration - painter - integrated - labeling

Provide feedback:
How useful was this article?    less 1 2 3 4 5 more
Email address (optional):
COPYRIGHT © 2008 yWorks · ALL RIGHTS RESERVED imprint | top | home