}
else if (contextObject instanceof Style) {
Style style = (Style) contextObject;
if (elementName.equals(RenderConstants.group)) {
Group g = new Group();
style.setGroup(g);
return g;
}
}
else if (contextObject instanceof Polygon) {
Polygon polygon = (Polygon) contextObject;
SBase newElement = null;
if (elementName.equals(RenderConstants.listOfElements)) {
newElement = polygon.getListOfElements();
}
if (newElement != null) {
polygon.registerChild(newElement);
return newElement;
}
}
else if (contextObject instanceof LineEnding) {
LineEnding lineEnding = (LineEnding) contextObject;
if (elementName.equals(RenderConstants.boundingBox)) {
BoundingBox bbox = new BoundingBox();
lineEnding.setBoundingBox(bbox);
return bbox;
}
else if (elementName.equals(RenderConstants.group)) {
Group g = new Group();
lineEnding.setGroup(g);
return g;
}
}