return baseline;
}
@Override
public void paint(Graphics2D graphics) {
Checkbox checkbox = (Checkbox)getComponent();
int width = getWidth();
int height = getHeight();
// Paint the button
Graphics2D buttonGraphics = (Graphics2D)graphics.create();
paintButton(buttonGraphics, checkbox, height);
buttonGraphics.dispose();
// Paint the content
Button.DataRenderer dataRenderer = checkbox.getDataRenderer();
dataRenderer.render(checkbox.getButtonData(), checkbox, false);
dataRenderer.setSize(Math.max(width - (CHECKBOX_SIZE + spacing * 2), 0), height);
Graphics2D contentGraphics = (Graphics2D)graphics.create();
contentGraphics.translate(CHECKBOX_SIZE + spacing, 0);
contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
dataRenderer.paint(contentGraphics);
contentGraphics.dispose();
// Paint the focus state
if (checkbox.isFocused()) {
BasicStroke dashStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND, 1.0f, new float[] {0.0f, 2.0f}, 0.0f);
graphics.setStroke(dashStroke);
graphics.setColor(buttonBorderColor);