final String label = this.labelGenerator.generateSectionLabel(
this.dataset, leftKeys.getKey(i));
if (label != null) {
final TextBlock block = TextUtilities.createTextBlock(label,
this.labelFont, this.labelPaint);
final TextBox labelBox = new TextBox(block);
labelBox.setBackgroundPaint(this.labelBackgroundPaint);
labelBox.setOutlinePaint(this.labelOutlinePaint);
labelBox.setOutlineStroke(this.labelOutlineStroke);
labelBox.setShadowPaint(this.labelShadowPaint);
labelBox.setInteriorGap(this.labelPadding);
final double theta = Math.toRadians(leftKeys.getValue(i)
.doubleValue());
final double baseY = state.getPieCenterY() - Math.sin(theta)
* verticalLinkRadius;
final double hh = labelBox.getHeight(g2);
this.labelDistributor.addPieLabelRecord(new PieLabelRecord(
leftKeys.getKey(i), theta, baseY, labelBox, hh, lGap
/ 2.0 + lGap / 2.0 * -Math.cos(theta),
0.9 + this.getExplodePercent(leftKeys.getKey(i))));