* @param subProperty The keep type of the property to be returned.
* @return The keep-with-previous property.
*/
public int getKeepWithPrevious(final FObj fobj, final FoContext context,
final AbstractKeep.Type subProperty) {
final AbstractKeep property = (AbstractKeep) getProperty(
FoProperty.KEEP_WITH_PREVIOUS);
if (property == null) {
return AbstractKeep.getValueNoInstance(context,
FoProperty.KEEP_WITH_PREVIOUS,
subProperty, fobj);
}
final PdPageBreakBefore enumProperty = (PdPageBreakBefore) getProperty(
FoProperty.PAGE_BREAK_BEFORE);
if (enumProperty != null) {
switch(enumProperty.getValue(context, fobj)) {
case AUTO: {
return Integer.MIN_VALUE;
}
case ALWAYS: {
return Integer.MIN_VALUE;
}
case AVOID: {
return Integer.MAX_VALUE;
}
case LEFT: {
return Integer.MIN_VALUE;
}
case RIGHT: {
return Integer.MIN_VALUE;
}
}
}
return property.getValue(context, subProperty, fobj);
}