@Override
public void paint(Graphics2D graphics) {
super.paint(graphics);
Menu menu = (Menu)getComponent();
int width = getWidth();
int height = getHeight();
// Paint the margin
if (marginColor != null) {
graphics.setColor(marginColor);
graphics.fillRect(0, 0, margin, height);
}
Menu.SectionSequence sections = menu.getSections();
for (int i = 0, n = sections.getLength(); i < n; i++) {
Menu.Section section = sections.get(i);
if (section.getLength() > 0) {