Checkbox inside CheckboxGroup

Is it possible to manipulate the Checkbox inside CheckboxGroup like a standalone object. E.g. make it disabled, readonly or hidden.

I’ve tried this way, but it doesn’t work properly.
Optional first = checkboxGroup.getChildren().findFirst();
Component component = first.get();
Checkbox checkbox = (Checkbox)component;
checkbox.setEnabled(false);

Technically speaking it would be possible, but I would argue against it. There is no public API for it and easy to break in future updates without you noticing

If you only need to change enable to disable or vice versa, you can use setItemEnabledProvider