final int y = offset.getDeltaY();
final int contentWidth = contents.getWidth();
final int contentHeight = contents.getHeight();
final Canvas headerCanvasLeft = canvas.createSubcanvas(0, top, left, contentHeight);
headerCanvasLeft.offset(0, -y);
leftHeader.draw(headerCanvasLeft);
final Canvas headerCanvasRight = canvas.createSubcanvas(left, 0, contentWidth, top);
headerCanvasRight.offset(-x, 0);
topHeader.draw(headerCanvasRight);
final Color thumbColor = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
drawVerticalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
drawHorizontalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
final Canvas contentCanvas = canvas.createSubcanvas(left, top, contentWidth, contentHeight);
contentCanvas.offset(-x, -y);
if (Toolkit.debug) {
canvas.drawRectangle(contents.getX(), contents.getY(), contents.getWidth(), contents.getHeight(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
}