if (this.backgroundPainted) {
paintBackground(g2D, backgroundColor);
}
Insets insets = getInsets();
// Clip component to avoid drawing in empty borders
g2D.clipRect(insets.left, insets.top,
getWidth() - insets.left - insets.right,
getHeight() - insets.top - insets.bottom);
// Change component coordinates system to plan system
Rectangle2D planBounds = getPlanBounds();
float paintScale = getScale();