java plugin development legend

Hello guys, I need your help,
I create a plugin for cameo systems modeler (which have the same libraries in java than MgicDraw) and I've one big problem.
I need to create a legend (so I created a block that i've stereotyped 'legend') but I don't know how to create an item into this legend and how to fill my constraints block into this item.
So it's very simple to do that directly on cameo but I've to do all of this in java for my plugin
If you have any idea about how to do this in java
Thank you guys !!!
I create a plugin for cameo systems modeler (which have the same libraries in java than MgicDraw) and I've one big problem.
I need to create a legend (so I created a block that i've stereotyped 'legend') but I don't know how to create an item into this legend and how to fill my constraints block into this item.
So it's very simple to do that directly on cameo but I've to do all of this in java for my plugin

If you have any idea about how to do this in java

Thank you guys !!!