Adding your own Node Realizers to yEd Lite
Questions & AnswersSummary
Adding custom node realizers to yEd Lite requires some adjustments to its source code.
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.
-
To make your realizer known to the application, add it to the properties file
yed.feature.realizerproperties.YEdPropertyConfig.properties. For ClassNodeRealizer the entries areNODEREALIZER.UML.NAME=UML NODEREALIZER.UML.CLASS=yed.feature.realizerproperties.ClassNodeRealizer NODEREALIZER.UML.HANDLER=yed.feature.realizerproperties.ClassNodePropertyHandler-
The
NAMEis the name of the realizer type that you will be able to select through the combobox in the yEd properties pane. -
The
CLASSis the fully qualified class name of your realizer. -
The
HANDLERis 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.
-
The
-
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 classyed.feature.realizerproperties.SpecialRealizerGraphMLSupport.
Note:
For yFiles for Java 2.7 and earlier, classes related to GraphML I/O support were located in thesrc/extra/javasource 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