Adding your own Node Realizers to yEd Lite

Questions & Answers

Summary

Adding custom node realizers to yEd Lite requires some adjustments to its source code.
For a better user experience, please go to the integrated documentation viewer to read this article.

Description

The yEd Lite class package yed.feature.realizerproperties is the place to add new realizers. This package already includes two custom realizers, namely ClassNodeRealizer and NoteNodeRealizer. These will serve you as examples on how to add your own realizers.

  1. To make your realizer known to the application, add it to the properties file yed.feature.realizerproperties.YEdPropertyConfig.properties. For ClassNodeRealizer the entries are NODEREALIZER.UML.NAME=UML NODEREALIZER.UML.CLASS=yed.feature.realizerproperties.ClassNodeRealizer NODEREALIZER.UML.HANDLER=yed.feature.realizerproperties.ClassNodePropertyHandler
    • The NAME is the name of the realizer type that you will be able to select through the combobox in the yEd properties pane.
    • The CLASS is the fully qualified class name of your realizer.
    • The HANDLER is the fully qualified class name of the PropertyHandler implementation for your own realizer. PropertyHandlers implement the properties editor for your realizer. ClassNodePropertyHandler will serve you as an example. If you don't want to add your own PropertyHandler, choose the PropertyHandler of your NodeRealizer's super class.

  2. If you want to add GraphML I/O support for your realizers, you need to provide a NodeRealizerSerializer implementation for your NodeRealizer. You will find NodeRealizerSerializer implementations for the classes ClassNodeRealizer and NoteNodeRealizer included. To make your own serializer known to the application you need to add a line like specialRealizerSerializers.add(new ClassNodeRealizerSerializer()); to the constructor of class yed.feature.realizerproperties.SpecialRealizerGraphMLSupport.
    Note:
    For yFiles for Java 2.7 and earlier, classes related to GraphML I/O support were located in the src/extra/java source tree.

Categories this article belongs to:
yFiles for Java > Other
Applies to:
yFiles for Java 2: 2.6, 2.7, 2.8, 2.9, 2.10, 2.11, 2.12, 2.13, 2.14, 2.15, 2.16, 2.17, 2.18
Keywords:
yEd - Lite - custom - node - realizer - PropertyHandler