*/
public int getValue(final FoContext context, final LengthRange subProperty,
final FObj fobj) {
if (value() instanceof DtLengthRange) {
final DtLengthRange lengthRange = (DtLengthRange) value();
PropertyValue length = null;
switch (subProperty) {
case MINIMUM: {
length = lengthRange.getLengthMinimum();
break;
}
case OPTIMUM: {
length = lengthRange.getLengthOptimum();
break;
}
case MAXIMUM: {
length = lengthRange.getLengthMaximum();
break;
}
default: {
return 0;
}
}
if (length == null) {
return 0;
}
if (length.canEvalLength()) {
return length.evalLength(fobj.traitFontSize(context));
}
if (length.canEvalPercentage()) {
final float percent = length.evalPercentage();
return Math.round(context.ipdAncestorBlockOrRa() * percent
/ WKConstants.PERCENT_CONVERSION);
}
throw this.unexpectedRetrieval();
}