Indeterminate CheckBox

Is there any way I can create a third, indeterminate state for a check box without addons?

Ideally I’d just like to add some CSS and then be able to do:

CheckBox cb = new CheckBox();

I’d like it to look something like the top checkbox in the bottom right panel from this example:

Unfortunately there seems to be no way to enable indeterminate state just by css, you need to change the property of the checkbox. If you’re on vaadin 7 you could probably do this with a simple extension.