Renderer Library

A renderer library is a general library that associates items with item renderers.

In order to let Digrammer use this Lib with the LibSelector component as a drag source, The developer should create the Lib manager and register it in the Diagrammer. It is also necessary to indicate the following properties for each item in the Lib: The following example explains how to use LibSelector with a RendererLib:
<fx:Declarations>
	<fx:Array id="libSource">
		<fx:Object uid="dataGrid" renderer="{LibDataGrid}" icon="assets/Grid.gif" group="Advanced"/>
		<fx:Object uid="tree" renderer="{LibTree}" icon="assets/Tree.gif" group="Advanced">
	</fx:Array>
	<lib:RendererLib id="libManager" rendererField="renderer" iconField="icon" idField="uid" groupField="group" libSource="{libSource}"/>	
</fx:Declarations>
.....
	<mx:HBox width="100%" height="100%">
	<mx:Panel width="300" height="100%" title="ToolBox">
		<components:LibSelector width="100%" height="120" lib="{libManager}"/>
	</mx:Panel>
	<mx:Panel width="100%" height="100%" title="Diagrammer">
		<diagrammer:Diagrammer id="diagrammer" width="100%" height="100%" lib="{libManager}"/>
	</mx:Panel>
</mx:HBox>

Renderers

When an item is dropped in the diagrammer, its type is determined based on the interfaces the item renderer implements. So the item renderer has to implement IGroupRenderer for groups and ITableRenderer for tables. See rendering section.