I’m creating an inheritor from ComponentBoundsConstrainer, and trying to override checkBounds(), but hitting a problem. Normally I can copy and paste the body of the function I’m overriding into my class, and then alter it, but I can’t do that in this case.
For one, all the minima and maxima for height and width are private. Not a big deal, I can use the accessor functions for those as replacements.
checkBounds() also uses minOffTop and related private member variables, and I can’t access these in my public inheritor, as there are no accessor functions.
Is there a way around this? In my own classes I tend to make member variables protected rather than private, so that inheritors can access member variables directly, without having to use accessors. Is that bad design?