Geometry Pool

A GeometryPool is a runtime cache of objects that represent the named Geometry elements defined in your geometry.xml file.

Loading geometries into the GeometryPool is performed via the GeometryService class, as shown below.

Example 5.5.  Loading configured geometries into the GeometryPool

try
{
  GeometryService.loadGeometriesFromResource(
      RESOURCE_PATH + "geometry.xml", this.getClass());
  
  GeometryDescriptor gDesc = 
      GeometryPool.get("AppLabelGeometryDescriptor");
  
  VisualNode visualNode = 
      graphView.getVisualNodeByID(nodeA.getID());
    
  visualNode.getBaseComposite().applyGeometry(gDesc);
}
catch(Exception e)
{
    e.printStackTrace();
}

The source code in bold shows the static class method which allows you to load the xml-specified geometries into a pool object.