*/
private int getValueInherited(final FoContext context,
final LengthRange subProperty, final FObj fobj) {
final RelativeCompass relativeDirection = this.getRelativeCompass();
if (relativeDirection == RelativeCompass.BEFORE) {
final FObj effectiveParent = fobj.effectiveParent(context);
switch (subProperty) {
case MINIMUM: {
return effectiveParent.traitSpaceBeforeMinimum(context);
}
case OPTIMUM: {
return effectiveParent.traitSpaceBeforeOptimum(context);
}
case MAXIMUM: {
return effectiveParent.traitSpaceBeforeMaximum(context);
}
default: {
return getValueNoInstance();
}
}
}
if (relativeDirection == RelativeCompass.AFTER) {
final FObj effectiveParent = fobj.effectiveParent(context);
switch (subProperty) {
case MINIMUM: {
return effectiveParent.traitSpaceAfterMinimum(context);
}
case OPTIMUM: {
return effectiveParent.traitSpaceAfterOptimum(context);
}
case MAXIMUM: {
return effectiveParent.traitSpaceAfterMaximum(context);
}
default: {
return getValueNoInstance();
}
}