RectangleEdge edge, Graphics2D g2) {
TextBlock label = super.createLabel(category, width, edge, g2);
String s = this.sublabels.get(category);
if (s != null) {
if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
TextLine line = new TextLine(s, this.sublabelFont,
this.sublabelPaint);
label.addLine(line);
}
else if (edge == RectangleEdge.LEFT
|| edge == RectangleEdge.RIGHT) {
TextLine line = label.getLastLine();
if (line != null) {
line.addFragment(new TextFragment(" " + s,
this.sublabelFont, this.sublabelPaint));
}
}
}
return label;