protected void paintFoldingMark(final NodeView nodeView, final Graphics2D g) {
if (! hasChildren())
return;
final MapView map = getMap();
final MapController mapController = map.getModeController().getMapController();
final NodeModel node = nodeView.getModel();
final FoldingMark markType = foldingMarkType(mapController, node);
Point mousePosition = null;
try {
mousePosition = getMousePosition();
}
catch (Exception e) {
}
if(mousePosition != null && ! map.isPrinting()){
final int width = Math.max(FOLDING_CIRCLE_WIDTH, getZoomedFoldingSymbolHalfWidth() * 2);
final Point p = getNodeView().isLeft() ? getLeftPoint() : getRightPoint();
if(p.y + width/2 > getHeight())
p.y = getHeight() - width;
else
p.y -= width/2;
if(nodeView.isLeft())
p.x -= width;
final FoldingMark foldingCircle;
if(markType.equals(FoldingMark.UNFOLDED)) {
if(mapController.hasHiddenChildren(node))
foldingCircle = FoldingMark.FOLDING_CIRCLE_HIDDEN_CHILD;
else
foldingCircle = FoldingMark.FOLDING_CIRCLE_UNFOLDED;
}
else{