Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Custom Label Style Tutorial

This tutorial explores the creation of custom label styles in yFiles for Java (Swing), ranging from basic text rendering to complex, multi-line labels with custom shapes. The covered topics include:

  • Implementing the ILabelStyle interface
  • Using text utilities for efficient text rendering and measuring
  • Adding background shapes and customizing label appearance
  • Handling preferred size and automatic label resizing
  • Optimizing performance with visual reuse in Java 2D
  • Configuring text alignment and supporting multi-line text with line wrapping
  • Applying item-specific customizations using label tags
  • Implementing custom hit-testing, visibility, and bounds providers This tutorial provides the knowledge needed to create polished and highly functional label visualizations that perfectly fit your application's requirements.